-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security][Serverless] Removed override when the quality gate runs in QA #192885
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
@pheyos for your visibility after our discussion. |
if (process.env.KIBANA_MKI_IMAGE_COMMIT || commit) { | ||
const override = commit ? commit : process.env.KIBANA_MKI_IMAGE_COMMIT; | ||
const qualityGate = | ||
process.env.KIBANA_MKI_QUALITY_GATE && process.env.KIBANA_MKI_QUALITY_GATE !== '1'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if env KIBANA_MKI_QUALITY_GATE
is set to "1"
variable qualityGate
is set to false
. Is this the expected behavior?
if (process.env.KIBANA_MKI_IMAGE_COMMIT || commit) { | ||
const override = commit ? commit : process.env.KIBANA_MKI_IMAGE_COMMIT; | ||
const qualityGate = | ||
process.env.KIBANA_MKI_QUALITY_GATE && process.env.KIBANA_MKI_QUALITY_GATE !== '1'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
x-pack/plugins/security_solution/scripts/run_cypress/project_handler/cloud_project_handler.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/security_solution/scripts/run_cypress/project_handler/proxy_project_handler.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why there is condition process.env.KIBANA_MKI_QUALITY_GATE !== '1'
?
On the higher level it'd be nice to refactor the file to read env variables in a centralized way and provide globally available readonly state like
interface Environement {
readonly name: 'CI' | 'FirstQualityGate' | 'SecondQualityGate'; // we have well defined environments
readonly imageCommit?: string;
// ... etc
}
x-pack/plugins/security_solution/scripts/run_cypress/project_handler/cloud_project_handler.ts
Outdated
Show resolved
Hide resolved
…andler/cloud_project_handler.ts Co-authored-by: Domenico Andreoli <[email protected]>
…andler/proxy_project_handler.ts Co-authored-by: Domenico Andreoli <[email protected]>
@cavokz Thanks for the fixes. |
@maximpn I added a comment before the variable to document the need of it. For now I think this covers the scope of this PR and creating a global state would potentially be a bigger and nice change addressed in another PR. Do you agree? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkirchan Thanks for addressing my comment 🙏
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @dkirchan |
… QA (elastic#192885) ## Summary An override was used so far when a commit was provided no matter who/what/where the tests were running. With this change. the override will not be used when the quality gate runs in QA. The reason behind this change is that we want to simulate the customer's behavior, so we will be creating a project with whichever version is currently deployed in QA. --------- Co-authored-by: Domenico Andreoli <[email protected]>
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11195128783 |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11195128789 |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… QA (elastic#192885) ## Summary An override was used so far when a commit was provided no matter who/what/where the tests were running. With this change. the override will not be used when the quality gate runs in QA. The reason behind this change is that we want to simulate the customer's behavior, so we will be creating a project with whichever version is currently deployed in QA. --------- Co-authored-by: Domenico Andreoli <[email protected]> (cherry picked from commit 9ce6206)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…uns in QA (#192885) (#195169) # Backport This will backport the following commits from `main` to `8.x`: - [[Security][Serverless] Removed override when the quality gate runs in QA (#192885)](#192885) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"dkirchan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-04T16:22:57Z","message":"[Security][Serverless] Removed override when the quality gate runs in QA (#192885)\n\n## Summary\r\n\r\nAn override was used so far when a commit was provided no matter\r\nwho/what/where the tests were running.\r\n\r\nWith this change. the override will not be used when the quality gate\r\nruns in QA. The reason behind this change is that we want to simulate\r\nthe customer's behavior, so we will be creating a project with whichever\r\nversion is currently deployed in QA.\r\n\r\n---------\r\n\r\nCo-authored-by: Domenico Andreoli <[email protected]>","sha":"9ce6206e7e023db27e650a2398841c6a3222f1fb","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team: SecuritySolution","backport:prev-minor","v8.16.0","Team: Sec Eng Productivity"],"title":"[Security][Serverless] Removed override when the quality gate runs in QA","number":192885,"url":"https://github.com/elastic/kibana/pull/192885","mergeCommit":{"message":"[Security][Serverless] Removed override when the quality gate runs in QA (#192885)\n\n## Summary\r\n\r\nAn override was used so far when a commit was provided no matter\r\nwho/what/where the tests were running.\r\n\r\nWith this change. the override will not be used when the quality gate\r\nruns in QA. The reason behind this change is that we want to simulate\r\nthe customer's behavior, so we will be creating a project with whichever\r\nversion is currently deployed in QA.\r\n\r\n---------\r\n\r\nCo-authored-by: Domenico Andreoli <[email protected]>","sha":"9ce6206e7e023db27e650a2398841c6a3222f1fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192885","number":192885,"mergeCommit":{"message":"[Security][Serverless] Removed override when the quality gate runs in QA (#192885)\n\n## Summary\r\n\r\nAn override was used so far when a commit was provided no matter\r\nwho/what/where the tests were running.\r\n\r\nWith this change. the override will not be used when the quality gate\r\nruns in QA. The reason behind this change is that we want to simulate\r\nthe customer's behavior, so we will be creating a project with whichever\r\nversion is currently deployed in QA.\r\n\r\n---------\r\n\r\nCo-authored-by: Domenico Andreoli <[email protected]>","sha":"9ce6206e7e023db27e650a2398841c6a3222f1fb"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: dkirchan <[email protected]>
… QA (elastic#192885) ## Summary An override was used so far when a commit was provided no matter who/what/where the tests were running. With this change. the override will not be used when the quality gate runs in QA. The reason behind this change is that we want to simulate the customer's behavior, so we will be creating a project with whichever version is currently deployed in QA. --------- Co-authored-by: Domenico Andreoli <[email protected]>
Summary
An override was used so far when a commit was provided no matter who/what/where the tests were running.
With this change. the override will not be used when the quality gate runs in QA. The reason behind this change is that we want to simulate the customer's behavior, so we will be creating a project with whichever version is currently deployed in QA.