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

Add kind that demonstrates how to modify the upstream graph in a transform #438

Closed
wants to merge 2 commits into from

Conversation

bhearsum
Copy link
Collaborator

This is a very rough prototype for what's been discussed in #417 and taskcluster/taskgraph#424. In this example, the decision about which tasks merge-corpus should depend on are being deferred and handled in the new modify_graph transform, which runs as part of the modify-graph task that happens right before all.

Because we're handling the dependencies later, we must also handle the fetches later - which means that knowledge about those artifact names moves out of the merge-corpus kind and into this transform.

I haven't tested this besides some taskgraph full -Y inspection, but it looks plausible - and the code certainly runs at the appropriate time, and has access to the necessary data to make the changes.

Any tasks that you need to modify or access must be in a kind listed in the modify-graph kind's kind-dependencies, otherwise they will not show up in config.kind_dependencies.tasks.

And at the risk of being annoying and repeating myself, I will offer a couple of cautions:

  • This sort of thing goes against the design of taskgraph. It could break without warning, and may not fit in well with future taskgraph features
  • We used to manage Firefox build & release tasks/graphs with similar imperative code. Taskgraph was, in part, a reaction to how unmaintainable and spaghetti-like that became.

@bhearsum
Copy link
Collaborator Author

This will never be merged; it was just an example.

@bhearsum bhearsum closed this Jun 19, 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.

1 participant