Skip to content

Conversation

@ahal
Copy link
Collaborator

@ahal ahal commented Sep 5, 2025

No description provided.

@ahal ahal self-assigned this Sep 5, 2025
@ahal ahal requested a review from a team as a code owner September 5, 2025 19:35
@ahal ahal requested a review from bhearsum September 5, 2025 19:35
Previously we were checking whether the worker-implementation was
docker-worker by looking at the task tags. But many projects are missing
this tag, and especially Decision tasks don't tend to have it. Instead,
check if the `payload.image` key is defined.
@ahal ahal force-pushed the ahal/push-pnyqlyvxwoxv branch 2 times, most recently from 6936dfe to d16425e Compare September 5, 2025 19:37
impl := task_def.get("tags", {}).get("worker-implementation")
) != "docker-worker":
print(f"Tasks with worker-implementation '{impl}' are not supported!")
if "payload" not in task_def or not (image := task_def["payload"].get("image")):
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL that walrus assignments in a conditional block are valid in the outer scope. This is fine...but I admit I was bit confused about where the image further down was coming from at first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah... It threw me off initially as well. Originally I didn't have the payload not in task_def fix and it looked a bit less confusing.

I can change it if you like, or I can leave it and force everyone to get used to it 😈

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with it :)

Copy link
Contributor

Choose a reason for hiding this comment

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

fwiw I'd rather we didn't have assignments in the middle of complex conditions

@ahal ahal force-pushed the ahal/push-pnyqlyvxwoxv branch from d16425e to 1c9cbd5 Compare September 5, 2025 19:53
run-task expects the worker to mount a volume at each path passed in
here. Let's avoid needing the user of `taskgraph load-task` needing to
do the same.
@ahal ahal force-pushed the ahal/push-pnyqlyvxwoxv branch from 1c9cbd5 to ffb3ed9 Compare September 5, 2025 19:56
@ahal ahal merged commit 0a19b4f into taskcluster:main Sep 5, 2025
16 checks passed
Comment on lines +330 to +331
# run-task expects the worker to mount a volume for each path defined in
# TASKCLUSTER_CACHES, delete them to avoid needing to do the same.
Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't we just as easily mount a volume there?

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.

3 participants