CircleCI-Public / android-orb

An orb for working with Android on CircleCI
https://circleci.com/developer/orbs/orb/circleci/android
MIT License
41 stars 27 forks source link

Job rejected because resource class doesn't exist for android-machine with latest orb version #86

Closed PetarKaukov closed 12 months ago

PetarKaukov commented 12 months ago

Orb version

2.3.0

What happened

I wanted to upgrade all of our CI executor images to the newest ones. When specifying version 2023.10.2, CircleCI fails with the error: Job was rejected because resource class xlarge, image android:2023.10.2 is not a valid resource class.

This happens only for the android-machine executor; android-docker runs with this version.

As per the official docs, both android-docker and android-machine support the resource class and many others:

https://circleci.com/developer/orbs/orb/circleci/android#executors-android-docker

https://circleci.com/developer/orbs/orb/circleci/android#executors-android-machine

After testing more, all versions after 2023.08.1 fail in the same exact way. The resource class just doesn't exist for the later images.

Expected behavior

The CI pipelines should run normally without any errors.

Our config (the important parts)

version: 2.1

orbs:
  android: circleci/android@2.3.0

jobs:
    android-test:
      executor:
        name: android/android-machine
        resource-class: xlarge
        tag: 2023.10.2

Here's the excerpt from the official docs:

parameters:
  resource-class:
    default: medium
    description: Resource class used for the executor.
    enum:
      - small
      - medium
      - medium+
      - large
      - xlarge
      - 2xlarge
      - 2xlarge+
    type: enum
  tag:
    description: >
      The Android image tag to use.

      Choose a tag from
      https://circleci.com/developer/images/image/cimg/android#image-tags.
    type: string
ryanbourdais commented 12 months ago

Hi @PetarKaukov this doesnt sound like an issue with the orb, can you fill out a support request? Do note that if you are a free customer you only have access up to a large resource class.

PetarKaukov commented 12 months ago

Hi @PetarKaukov this doesnt sound like an issue with the orb, can you fill out a support request? Do note that if you are a free customer you only have access up to a large resource class.

We're definitely not a free customer, as we, as a company, have been using CircleCI for a long time. We've used all kinds of resource classes in our pipelines.

And, as mentioned in the issue, it works flawlessly up to version 2023.08.1. And this issue only affects android-machine, android-docker runs without issues up to the latest version - 2023.10.2.

When I set the docker-machine job to use the older version, our pipelines passed, but that's not how I would expect it to work.

All of our jobs use xlarge if it's of any use.

Edit: I'll fill a support request, yes.

ryanbourdais commented 12 months ago

Hi @PetarKaukov, one last question before you reach out to support, are you attempting to use the tag 2023.10.2 for the machine executor as well? If so, that would explain the failures. There was only one version of the machine image released last month and it was tagged 2023.10.1. The docker image was rereleased because of an issue with the ndk variant and thats why there is a 2023.10.2 tag for the docker image.

PetarKaukov commented 12 months ago

I see. I attempted to run a pipeline with "2023.10", but it failed with the same error.

However, specifying "2023.10.1" actually passed the pipeline. A bit confusing, but I understand now why it's like that. Thanks for the replies, our pipelines are green again with 2023.10 :)

ryanbourdais commented 12 months ago

Awesome, glad I could get that sorted for you quickly, thank you for the quick updates!