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

Support only running jobs for affected packages #453

Open
jakemac53 opened this issue May 25, 2023 · 3 comments
Open

Support only running jobs for affected packages #453

jakemac53 opened this issue May 25, 2023 · 3 comments

Comments

@jakemac53
Copy link
Collaborator

The jobs for a package should only run if:

  • Some file in the package directory changes
  • There is a dependency_override which is a path to somewhere in the repo, and some file in that directory changes.
  • Note that we need to look at pubspec_overrides.yaml as well as the pubspec to determine overrides.

Implementation-wise, github appears to only support this for entire workflows. We should consider if a separate workflow needs to be generated per package in the repo. This would reduce our ability to group tasks across packages though, so we would have more jobs, which might be fine. Alternatively there are some actions out there than support doing this for individual jobs (basically you have a job that checks if the modified files are in the list of ones you care about, and then your actual job only runs based on the output of that job).

@jakemac53
Copy link
Collaborator Author

Here is an example diff of how we could do this using a custom action to compute the diffs and create variables for each package that we can use in ifs for those jobs master...jakemac53:mono_repo.dart:smart-actions

@kevmoo
Copy link
Collaborator

kevmoo commented May 26, 2023

Ooo! I guess we could make the generator smart to look for path dependencies to kinda force a "transitive" logic, right?

@jakemac53
Copy link
Collaborator Author

Ooo! I guess we could make the generator smart to look for path dependencies to kinda force a "transitive" logic, right?

Yes exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants