Skip to content

fix: replace uses of Parameters.is_try() with level check#969

Merged
ahal merged 2 commits into
taskcluster:mainfrom
ahal:ahal/mkyyvzkzyxmn
Jun 3, 2026
Merged

fix: replace uses of Parameters.is_try() with level check#969
ahal merged 2 commits into
taskcluster:mainfrom
ahal:ahal/mkyyvzkzyxmn

Conversation

@ahal
Copy link
Copy Markdown
Collaborator

@ahal ahal commented Jun 2, 2026

In the Github world, what is considered "try" or not is much less defined than it is on hgmo. Currently we have "enterprise-firefox-try", "firefox-dev" and "staging-firefox" that are all "try-like" in that they will run tasks on any arbitrary branch push.

We can no longer rely on the magic string "try" being present in the repo name to determine this, and imo nor should we ever have been.

At least in this repo, all uses of is_try() are probably better off just using level == 1 instead.

Bug: 2044330

@ahal ahal self-assigned this Jun 2, 2026
@ahal ahal requested a review from a team as a code owner June 2, 2026 14:46
@ahal ahal requested a review from jcristau June 2, 2026 14:46
@ahal
Copy link
Copy Markdown
Collaborator Author

ahal commented Jun 2, 2026

I debated if this should be considered breaking or not.. I don't think it materially changes graphs, just might reduce artifact expiry in some cases, so I opted for not

@ahal
Copy link
Copy Markdown
Collaborator Author

ahal commented Jun 2, 2026

Actually, I just realized that gecko_taskgraph has its own is_try logic.. so I think I'll just remove Parameters.is_try() and make this breaking.

@ahal ahal marked this pull request as draft June 2, 2026 14:53
ahal added 2 commits June 2, 2026 11:27
BREAKING CHANGES: Must pass in the `--allow-parameter-override` flag to
load try config

This gives us a more explicit signal about whether we should use
`try_task_config.json` than whether the string "try" happens to exist in
the repo name.

Bug: 2044330
BREAKING CHANGES:
  - Removed `Parameters.is_try()`
  - Level 1 repos may now have shorter artifact expirations for
    docker-image tasks

In the Github world, what is considered "try" or not is much less
defined than it is on hgmo. Currently we have "enterprise-firefox-try",
"firefox-dev" and "staging-firefox" that are all "try-like" in that they
will run tasks on any arbitrary branch push.

We can no longer rely on the magic string "try" being present in the
repo name to determine this, and imo nor should we ever have been.

At least in this repo, all uses of `is_try()` are probably better off
just using `level == 1` instead.

Bug: 2044330
@ahal ahal force-pushed the ahal/mkyyvzkzyxmn branch from 55380ba to 81e15e2 Compare June 2, 2026 16:20
@ahal ahal marked this pull request as ready for review June 2, 2026 17:33
Copy link
Copy Markdown
Contributor

@bhearsum bhearsum left a comment

Choose a reason for hiding this comment

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

This is a good improvement. I think we should get rid of the very Mozilla-specific try_task_config_file in the future as well, but that's out of scope here.

@ahal
Copy link
Copy Markdown
Collaborator Author

ahal commented Jun 3, 2026

This is a good improvement. I think we should get rid of the very Mozilla-specific try_task_config_file in the future as well, but that's out of scope here.

Once the Git note is working well and Gecko is migrated to it we can remove support for the file. Though v2 of the file itself isn't actually Mozilla specific, it's just a way to allow users to override parameters :)

@ahal ahal merged commit 0a7e96d into taskcluster:main Jun 3, 2026
22 of 23 checks passed
@ahal ahal deleted the ahal/mkyyvzkzyxmn branch June 3, 2026 14:29
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.

2 participants