-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PR e2e test: Validate the regex before building the images #4750
Comments
Hey, @JorTurFer can you give me a bit more context on what regex is being used for here specifically or would be used for? |
Hey, sure! The problem is that if the regex is wrong and doesn't match with any file, we want that the execution fails because we have introduced something wrong. Where is the problem? When the regex is executed. Basically we build the images, prepare the cluster, deploy pod identities, KEDA, etc, and then we use the regex for getting the test cases. This is slow and could take 20-25 just for failing: e2e test suite is executed using this file through make ( In order so save time and resources building the image and deploying things into the cluster, just for detecting the typo in the regex, I thought to extract that function and run them in the 2nd job of the workflow, before building the image. In case of no matches, raising an error and finishing the execution there, having saved 20 minutes. Why in the 2nd job and not in the 1st, to save more time and resources? Because as we use a comment trigger, every comment wherever in the repo will trigger the workflow, and this regex validation needs to pull the code (comment trigger doesn't checkout the code) and execute the code. In this 1st job, an arbitrary change in the code could expose sensitive data, as everybody can comment in the repo and this validation needs to checkout the PR code for executing that regex. (we should use the PR branch because in other case, changes in the system can't be tested before going I know that we can just add a condition in the specific step to not be executed, but the second reason for adding in the 2nd job, is that the second job already has to checkout the code, so in my mind sounds like the better place: About how to implement this? Maybe we could extract the function and execute it using make for example, or just with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Proposal
Currently, we build the images and deploy them into the cluster before checking the provided regex, this could deal in a failure 20 minutes later.
We should check somehow the regex before starting the process to be more efficient and saving resources
Use-Case
No response
Is this a feature you are interested in implementing yourself?
Yes
Anything else?
No response
The text was updated successfully, but these errors were encountered: