-
Notifications
You must be signed in to change notification settings - Fork 500
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
feat: Reusable workflows #9655
Comments
AWS source: |
Hi @candiduslynx I think we missed a crucial piece of logic with the wait for all and re-usable workflows, starting with #9780. We’ll need to add logic to detect that if a re-usable workflow changes, we wait for all dependent workflows. For example if we change only I’m worried this might complicate things a bit, unless we find a good automated way to know the dependencies |
…gin workflow" (#9834) Reverts #9780 See #9655 (comment). We should first take a look at that comment before using re-usable workflows
@erezrokah take a look at #9842 that does the following:
I think that will unblock implementing reusable workflows. |
Hi @candiduslynx, thanks for the PR. I think it might be worth bringing this issue to a wider discussion with the rest of the team. Not sure we would like to make the wait for all logic even more complex than it is now, just to reduce code duplication. WDYT? |
Hi @erezrokah, I'm fine with bringing it to a wider discussion. The wait logic is there only because of the stuff we're missing from GitHub, so it will always be a hack. I would still want us to reduce the code duplication and maintain a more easily upgradable approach. |
Wouldn't using not generalized/templated workflows make it more difficult for a user to create a plugin in their own repo or would it be the same? Beyond the user impact how much time and effort do we as a team spend editing or debugging github workflows? Is the reduction of a few duplicated files worth the custom code we would have to write and own? |
@bbernays I think this won't impact users writing their own plugins, as re-usable workflows will only be used in the monorepo (this repository). The workflows in the monorepo are already not usable in single plugin repos, and adding/not adding re-usable workflows won't change that I think |
Thank you @erezrokah for clarifying that for me! |
On my end I would say I spend the most time when we need to update the wait for all workflow. Otherwise debugging a single plugin workflow (e.g. testing a new destination) is very much scoped to that plugin. |
Maybe it would be helpful to summarize where we would like to use re-suable workflows:
Did I miss anything @candiduslynx? As for the time to do #9388, I think that's mostly since we misidentified the cause of the caching issue, and attributed it to a caching issue in all plugins, then coupled it to the re-usable workflows change. When we discovered the issue was scoped to AWS, GCP, K8S and Azure, we could submit a much smaller, safer fix. Please let me know if I missed anything @candiduslynx |
I'll weigh in here a bit out of the blue so sorry about that, just wanted to bring an older discussion we had about a year ago. We started with reusable workflows and we got to an understanding that it is not a very good idea because plugins even though they are in a single repo are standalone. sometimes they have the same logic sometimes different. In general the approach we take in CI and in code is KISS over DRY. Creating abstraction layers is a complex area and usually creates more harm then good because it makes maintenance much harder, moreover creating those in YAML is a nightmare (given right now GH is YAML based and not code based). I never had a problem with our CI and it was always super easy to debug given the simplicity of it. I suggest not fixing something that works very well with complex solutions. That's my 2 cents on the issue but we can discuss again tomorrow. Re caching - of-course this is a great improvement but it has nothing to do with the introduction of re-usable workflows which seems a bit un-necessary especially if it is a complex task with a lot of gotchas. |
@yevgenypats the caching is not finished yet, as the caches amount we use at the moment exceeds the quota, so we have the cache files removed & not used effectively. |
That's ok - Im just saying that reusable workflow is fine if we are sure that this workflow is exactly the same 200% of the time. the moment there is at least one different we will either have to delete it or just use it for some workflows because a resuable workflow with huge |
That's 100% true. I don't want to create more work from maintaining CI, but rather make it more straightforward and easy to create new plugin workflow without the need to look through a long copy-pasted workflow & doing the replacing. We basically want to make this scoped to the places where we can effectively reuse, already mentioned by @erezrokah in #9655 (comment):
|
I don't think we've proven that a different caching strategy than the default one we use works better, so I won't add that to the mix just yet. Even if we do decide on a different caching strategy, we could still do it without re-usable workflows.
Given the added complexity of re-usable workflows as mentioned here #9655 (comment), I'm not sure using will make it easier to maintain than single plugin scoped workflows.
Extracting those into separate jobs require adding more logic to the wait for all workflow, which means if a developer would like to customize a workflow they either need to copy paste (as we do now), or modify the wait for all logic. |
I see. So if this is the case I think we should 100% put this on hold as really the value to changing something that works very well is minimal and we should focus on other high priority tasks like migrating destinations to the new SDK. We can have a sync call to make sure Im not missing details and we are all aligned. |
Closing this for now given our discussion last week. if it will ever be a priority we can open this again and by then GitHub CI would have new features so prob everything will be different. |
Which problem is this feature request solving?
I would like to be able to reuse the workflows/jobs to reduce boilerplate code.
Describe the solution you'd like
There's a nice feature GitHub provides called reusable workflows.
This allows to extract the jobs that are copied many times into a separate workflows and instead of copying the workflow logic just call the reusable workflow.
This is extracted from #9388 to be implemented and discussed separately.
Pull request (optional)
The text was updated successfully, but these errors were encountered: