Gclud argument --num-flaky-test-attempts not available

Description of the issue

Hi,

Today I have added new argument to my gcloud command in order to run android UI tests on Firebase Test Lab which is: –num-flaky-test-attempts

When I run locally the gcloud command with this argument “–num-flaky-test-attempts=1” as part of the python script I’m able to run the tests.

When I run it on Bitrise I get the error:
ERROR: (gcloud.firebase.test.android.run) unrecognized arguments: --num-flaky-test-attempts=1
Build:

I’m using gcloud 280 version which you use as well bitrise.io/linux-docker-android.log at master · bitrise-io/bitrise.io · GitHub hence I don’t know why this argument is not available to me on Bitrise.

From the error you are returning I cannot see the argument available. Why is that?

Usage: gcloud firebase [REDACTED] android run [ARGSPEC] [optional flags]
  optional flags may be  --app | --app-initial-activity | --app-package |
                         --async | --auto-google-login | --device |
                         --device-ids | --directories-to-pull |
                         --environment-variables | --filter | --help | --limit |
                         --locales | --max-depth | --max-steps | --obb-files |
                         --orientations | --os-version-ids | --page-size |
                         --performance-metrics | --record-video |
                         --results-bucket | --results-dir |
                         --results-history-name | --robo-directives |
                         --sort-by | --[REDACTED] | --[REDACTED]-package |
                         --[REDACTED]-runner-class | --[REDACTED]-targets | --timeout |
                         --type | --use-orchestrator

Reproducibility

Rebuild didn’t help.
Issue started once I added this flag

Local reproduction

It cannot be reproduced locally. Tests run fine.

Build log

This is part of the python script we run that has the argument added:

def run_tests():
for index, suite, device_id, device_version, annotation, locale in TEST_SUITES:
    print_device_info(device_id)
    apk_prefix = '-'.join([element.lower() for element in re.findall('[a-zA-Z][^A-Z]*', suite)])
    cmd = " ".join(["gcloud firebase test android run",
                    "--type instrumentation",
                    "--num-flaky-test-attempts=1",
                    "--timeout {}".format(str(TEST_TIMEOUT_SECONDS)),
                    "--environment-variables {}".format(annotation),
                    "--app {}".format(BUILD_ARTIFACTS_PATH)
                    + "{0}/debug/onfidosdktestapp-{1}-universal-debug.apk".format(suite, apk_prefix),
                    "--test {}".format(BUILD_ARTIFACTS_PATH)
                    + "androidTest/{0}/debug/onfidosdktestapp-{1}-debug-androidTest.apk".format(suite, apk_prefix),
                    get_device_flags(device_id, device_version, locale)
                    ])
    test_results[index] = subprocess.Popen(cmd, shell=True)

I found out the problem.

I checked the gcloud version you are on and it’s 200. Newest version of the gcloud is 280.

What’s the reason not to upgrade it to the newest one?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.