New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple scope prefixes in bitrisescript #953
Conversation
23839a0
to
73e1619
Compare
429c88a
to
ccb60e7
Compare
It turns out that we need to use consistent scope prefixes as the other scriptworkers as Taskgraph configures a single prefix across all scriptworkers. This means that the repo name can appear in the prefix, which in turn means we'll need to support multiple valid prefixes per trust domain. This is how the other scriptworkers work, so it's a good change to make anyway.
This is actually very verbose and makes the Taskcluster logs very difficult to read, so only log it on error.
ccb60e7
to
b173820
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
return [prefix if prefix.endswith(":") else "{}:".format(prefix) for prefix in prefixes] | ||
|
||
|
||
def extract_common_scope_prefix(config: dict[str, Any], task: dict[str, Any]) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these scope resolution functions generic enough to move to something like scriptworker_client.task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, good call! I copy/pasted it from another script and it looks like a bunch of them have something very similar.. Should be a follow-up though.
No description provided.