Replies: 4 comments 7 replies
-
|
cc @keycloak/kc-developers |
Beta Was this translation helpful? Give feedback.
-
|
I went down the path some time in the past when we added the new guides, that also led to severe CI resource exhaustion. IIRC there were some bumps hindering us to go further with the "conditionally execute stuff based on files touched" approach:
Example: for a docs-only change, e.g. a typo, a (simplified) idea was to have something around the lines of: and a specific job that just runs only the steps needed to see if the guides can be parsed correctly. Now our matrix testsuite is required, but not executed. This leads to an unmergeable state for a purely docs-related PR. That being said, consider this just a point of information why I stopped looking into improving it back then. The idea makes total sense, I have not keepen track of the latest developments around this topic on the GHa side and hope it is somehow possible to achieve this. edit: the github discussions follow-up links to a documentation bit that states that it is possible with a workaround (for now) that is having a "return true" dummy workflow with the same name and the inverse filtering logic. This feels very hacky and would pollute our CI script quite a bit, but might work unless there's better support. In the meantime, feel free to give the thread a vote, so hopefully we will have better support in the future. |
Beta Was this translation helpful? Give feedback.
-
|
Some more options (maybe not solutions, yet):
BTW: I'd assume the gitflow-incremental-builder comes in quite handy when working on the Quarkus distribution of Keycloak, as one would regularly build the non-Quarkus-modules. Maybe someone with Quarkus development experience can comment on that. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, @DGuhr @ahus1 and @andreaTP for the feedback. Those are interesting ideas to explore. As short-term solution and an immediate step. Would make sense to have a PR based on the simplified idea suggested by @DGuhr ? I don't think it will solve all the issues, but it's a small and important improvement from my perspective, and we can iterate over it. For now, I'm thinking about prevent our workflows to run on pull-requests for docs and translation files. Something like: As a second step, explore the options suggested with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Every time we create a new pull-request, GitHub actions will trigger approximately 28 checks, taking approximately 6 hours to complete.
There are some scenarios where the changes proposed only touches a couple of JavaScript, NPM dependencies or documentation files. We should be able to run a subset of jobs in the pipeline based on those changes.
Something similar to the current approach for the workflows CodeQL JS Adapter and CodeQL Themes.
Proposal
For JavaScript related changes and NPM dependencies, we can conditionally execute the following jobs only based on the changes inside the
themesfolder:A concrete example is available in the Update TypeScript to the latest version. Even though the changes proposed only touches a typescript file and
package.json, jobs for the Operator and Cross DC are executed anyway. That means 6 hours only for a couple of changes.For changes to the docs, I don't see any need to execute workflows for the Operator, Cross DC, WebAuthN…or unit tests. If there's any need to build and lint our doc, we should be able to run only the relevant workflow.
The changes proposed in the pull-request Fix typo triggers 27 checks, only for a couple of docs changes.
If necessary, we can run all the workflows on the daily basis to make sure that nothing was broken.
Future
In the future, we may consider expanding the scope, split the workflow files and conditionally trigger the jobs based on folders:
Related posts
Warning
This is not the perfect solution and open for suggestions. The goal here is to iterate over it, considering that speed is something crucial for our developer experience.
Beta Was this translation helpful? Give feedback.
All reactions