Skip to content
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

Simplify zodiac team logic #288

Closed
wants to merge 1 commit into from
Closed

Conversation

cloudw
Copy link
Collaborator

@cloudw cloudw commented Feb 20, 2024

Why:
Zodiac service label should be added to workflows regardless of the availability of zodiac team data.

What:
Reduce logical dependency on zodiac team.

@cloudw cloudw self-assigned this Feb 20, 2024
@cloudw cloudw marked this pull request as draft February 21, 2024 00:42
@@ -1098,7 +1099,7 @@ def _set_container_labels(self, container_op: ContainerOp):
"tags.ledger.zgtools.net/ai-experiment-name", self.experiment
)

if ZILLOW_ZODIAC_SERVICE and ZILLOW_ZODIAC_TEAM:

Choose a reason for hiding this comment

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

This looks fine to me, since ZILLOW_ZODIAC_TEAM is not used within the if statement.

I don't have an understanding of how the code works together. Is there any risk if the add_pod_annotation() gets called in the case where there is no ZILLOW_ZODIAC_TEAM?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm marking this PR as draft since I haven't fully worked through it. The changes here do not provide my desired result yet.

@cavandervoort
Copy link

It looks good to me! Assuming the answer to my question above is "no", I feel good about approving. Sorry for the delayed review.

ret_flow_labels[f"{zodiac_prefix}/service"] = ZILLOW_ZODIAC_SERVICE
if ZILLOW_ZODIAC_TEAM:
ret_flow_labels[f"{zodiac_prefix}/team"] = ZILLOW_ZODIAC_TEAM
Copy link
Collaborator

Choose a reason for hiding this comment

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

fyi: these are applied at compile time during CICD.

Should these be injected by the webhook?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do want to link a workflow to a zodiac service at compile time. This ensures that the workflow manifest is linked to a service no matter where it is.

I'm considering removing zodiac team label. The workflow - zodiac service association is much more stable then the workflow - zodiac team association, and zodiac team can be inferred from the zodiac service.

@cloudw cloudw closed this Jun 25, 2024
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