-
Notifications
You must be signed in to change notification settings - Fork 183
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
Skip running tests when the only file changed is markdown #1667
Comments
Same for the yml files!! See Azure/azure-sdk-for-js#15146 |
In the teams discussion about this, you (@benbp) proposed that we could have detection in the matrix generation that would inspect the changed files and generate an empty test matrix for folders/libraries where only .md or .yml files changed. |
I was thinking about adding some sort of filtering to the matrix config, e.g.
The more that I think about it, it may be better to have this kind of logic be in its own step, which could include scripts for various kinds of skip/run hook inputs and outputs, e.g.:
|
I like above approach. We can set a runtime pipeline variable based on type of files in PR |
@praveenkuttappan by exclusion do you mean: if a file change is present, skip all tests even if other files match? Also, if I've learned anything from adding sparse checkout to CI+live tests and java releases, there may be many unanticipated edge cases across languages, so I think my aim is to lay out the generic mechanism here and show the language teams how to use it. @ramya-rao-a would you be able to get someone from the js team to incorporate this config feature once I add it and update/test the necessary language-specific file filters? |
What would this involve? Updating the yml files based on your recommendation? Or more? |
Yes, it should be pretty simple, I think: updating config targets and mainly validating that tests behave properly and we aren't skipping anything unexpectedly. |
Sure, we can do that |
@benbp if we are going that fair we should have the job be the startup job for the entire pipeline and not just the tests. It can be a job that can setup variables based on various common inputs such as file globs but also potentially even custom tasks that can check for other conditions as needed. We can also use this logic for doing thing like setting the dev version or default branch or other common global properties we setup dynamically. |
@weshaggard I agree, the way I would do this for live tests would be extensible to account for other job-type conditions as well. I think starting small and just hardcoding evaluations for |
Any updates here? It is code complete week again and we have PRs that only update the changelogs going out. |
No real updates here yet. We have some ideas but nothing concrete but even the simple ideas require a fair amount of design and implementation so I don't expect we will have a solution here for awhile. |
Coming back to this @weshaggard. I think the live test handling is a common enough case that we should support setting global pipeline variables via the generator and/or generating an empty test set to solve this problem today. The more I think about a common startup job, the more I worry about the added agent queue time that such a job will add to every pipeline run. |
@benbp for the general case perhaps we can come up with a way to user a server job. |
@weshaggard digging through the agentless job docs, I don't see any way to feed data back to the agent context (in this case, variables). Rather, the agentless jobs seem to be basically pass/fail gates for a pipeline as well as a way to trigger side effects external to the pipeline. |
Copying this comment over from Azure/azure-sdk-for-js#18465 which was a duplicate: This should be done in all of our language repos, not jus the JS repo. The reason we haven't supported this is because DevOps doesn't really support it. @benbp has suggested that adding a feature to support this in the test matrix generation scripts might be a possible way to tackle this. Related question is whether GitHub actions supports this (something we'll be investigating more over the next 6 months). |
Take this PR for example: Azure/azure-sdk-for-js#15523.
All it does is update the date in the changelog before a release. All tests associated with that folder is run in the PR CI which adds no value. Is there a way for the PR CI to skip the tests the only files changed are markdown files?
What I am looking for ways to reduce the wait time on PRs that are only trying to update markdown files. No issues in running the link verififcation and other checks.
(Not sure if other language repos have use for running the tests when markdown files are changed)
The text was updated successfully, but these errors were encountered: