Skip to content

Allow bots with RUN_TIME flash devices#5251

Open
Xeicker wants to merge 1 commit intogoogle:masterfrom
Xeicker:flash-pixels
Open

Allow bots with RUN_TIME flash devices#5251
Xeicker wants to merge 1 commit intogoogle:masterfrom
Xeicker:flash-pixels

Conversation

@Xeicker
Copy link
Copy Markdown

@Xeicker Xeicker commented Apr 21, 2026

Description

There is an assumption that id RUN_TIME is defined then flashing android devices is not needed, however, that's not always true.

This opens the possibility to allow flashing even if RUN_TIME is defined

  • Add log entries for future easier debugging

Testing

  • Tested in local that the code follows the expected path, didn't have a flashable device on hand to demonstrate flashing actually occurs, but that might be out of the scope of this PR
  • Test on dev was not possible since there are no Android bots available

@Xeicker Xeicker requested a review from a team as a code owner April 21, 2026 22:58
Comment thread src/clusterfuzz/_internal/platforms/android/flash.py Outdated
Copy link
Copy Markdown
Collaborator

@jardondiego jardondiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, overall. :)
Left a small question there.

@Xeicker Xeicker force-pushed the flash-pixels branch 2 times, most recently from 59096c7 to f0d3282 Compare April 22, 2026 17:49

run_timeout = environment.get_value('RUN_TIMEOUT')
if run_timeout:
force_flashing = str(environment.get_value('FORCE_ANDROID_FLASHING', 'false')).lower() == 'true'
Copy link
Copy Markdown
Collaborator

@jardondiego jardondiego Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I recall correctly, there is a utility function utils.string_is_true that already does this. I guess my next question would be, if we think of this envvar as boolean, I believe environment.get_value as is would return True directly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we name this as SHOULD_FORCE_ANDROID_FLASHING?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the code to use string is true, looks a lot better.

About the name if it is not too bad it would be great to keep it as is. I already, landed the change for it in the script that setups that env var

@jardondiego
Copy link
Copy Markdown
Collaborator

It seems we have failing tests.

@jardondiego jardondiego removed the request for review from javanlacerda April 22, 2026 19:01
There is an assumption that id RUN_TIME is defined then flashing android
devices is not needed, however, that's not always true.

This opens the possibility to allow flashing even if RUN_TIME is defined

Signed-off-by: Edgar Aguilar <eledgar@google.com>
@Xeicker
Copy link
Copy Markdown
Author

Xeicker commented Apr 22, 2026

It seems we have failing tests.

It is not failing, it is pending waiting for a collaborator to give the command /gcbrun . If you could help me with that while I obtain that title it would be great

@IvanBM18
Copy link
Copy Markdown
Collaborator

IvanBM18 commented Apr 23, 2026

It seems we have failing tests.

It is not failing, it is pending waiting for a collaborator to give the command /gcbrun . If you could help me with that while I obtain that title it would be great

I just relaunched the CI jobs. Overall changes LGTM

Comment on lines +112 to +113
force_flashing = utils.string_is_true(
environment.get_value('FORCE_ANDROID_FLASHING'))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
force_flashing = utils.string_is_true(
environment.get_value('FORCE_ANDROID_FLASHING'))
force_flashing = environment.get_value('FORCE_ANDROID_FLASHING')

Copy link
Copy Markdown
Collaborator

@letitz letitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % two things:

  • One comment in the code about a log
  • You misspelled RUN_TIMEOUT as RUN_TIME in the PR title and description

environment.get_value('FORCE_ANDROID_FLASHING'))

if run_timeout and not force_flashing:
logs.info('Skipping reimage: RUN_TIMEOUT is set.')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mention FORCE_ANDROID_FLASHING too.

@letitz
Copy link
Copy Markdown
Collaborator

letitz commented Apr 24, 2026

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants