Skip to content
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

[Ops] Skip buildkite hooks for non kibana jobs #165597

Merged

Conversation

delanni
Copy link
Contributor

@delanni delanni commented Sep 4, 2023

Summary

Kibana's build jobs work on a different subset of executors than the buildkite pipelines defined in catalog-info.yaml.

The former jobs require a set of pre_command / post_command steps to prepare the jobs for building/testing kibana.
The latter don't have access rights to certain vault secrets (and possibly other missing config from the Kibana world), but for now, they're also not building Kibana, they just trigger other jobs, so we can just skip the problematic hooks.

A probably good indicator I found for deciding whether we need the kibana-related pre_command is the BUILDKITE_AGENT_META_DATA_AGENT_MANAGER flag, that's set to "kibana" in the case of the kibana executors.

We can try to match on the agent names for the CI-systems agents. They seem to be starting with bk-agent.

This should allow for the kibana-tests job to run.

Split from: #165346

@delanni delanni requested a review from a team as a code owner September 4, 2023 13:36
@delanni delanni added chore Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes labels Sep 4, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@mistic
Copy link
Member

mistic commented Sep 4, 2023

@brianseeders I don't think this change will have unintended consequences but can you think about any?

@brianseeders
Copy link
Contributor

@brianseeders I don't think this change will have unintended consequences but can you think about any?

If you're still running jobs on static workers (mac or hetzner), those probably don't have this env var set. Might be better to use something that positively identifies the new CI-systems environment rather than the absence of the kibana environment

@delanni
Copy link
Contributor Author

delanni commented Sep 4, 2023

Good point @brianseeders - do you think something like matching on the agent's name starting with bk-agent would be a good indication of the ci-systems agents?

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 4, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Serverless Observability Examples Tests / serverless examples UI Partial Results Example "before all" hook for "should trace mouse events"

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@delanni delanni enabled auto-merge (squash) September 4, 2023 16:21
@delanni delanni merged commit 0edc23e into elastic:main Sep 4, 2023
@delanni delanni deleted the skip-buildkite-hooks-for-non-kibana-jobs branch September 4, 2023 16:29
@kibanamachine kibanamachine added v8.11.0 backport:skip This commit does not require backporting labels Sep 4, 2023
delanni added a commit that referenced this pull request Sep 6, 2023
## Summary
Sets up quality gate triggering in Kibana. The tests are mostly
triggering external pipelines and relying on their results. Here's an
example run:
https://buildkite.com/elastic/kibana-tests/builds/28#job-018a69a6-c860-405e-ab2b-bce2aed07df3

According to [this
doc](https://docs.google.com/document/d/15rx2Z-soL20An0nBUcXX0o_HHf1OU_IgrHXgz20NndI/edit)
many of the quality gates are really required for the QA->Staging
promotion step.

Most of the tests are in the QA stage: 
 - [fleet smoke tests](https://buildkite.com/elastic/fleet-smoke-tests)
- ~~[QAF RAC load
tests](https://buildkite.com/elastic/appex-qa-rac-alert-load)~~ Removed,
see #165346 (comment)
- [QAF serverless
tests](https://buildkite.com/elastic/appex-qa-kibana-serverless-ftr-tests)
- [control plane QA smoke
tests](https://buildkite.com/elastic/ess-k8s-qa-e2e-tests-daily)
- [security solution
tests](.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.sh)
+ manual check for confirming manual tests
 - Manual confirmation 👍

Staging has: 
- [control plane staging smoke
tests](https://buildkite.com/elastic/ess-k8s-staging-e2e-tests)
 - Manual confirmation 👍

Production has:
- [control plane production smoke
tests](https://buildkite.com/elastic/ess-k8s-production-e2e-tests)
 - Manual confirmation 👍

### Quirks
- ~~`SKIP_KIBANA_HOOKS=1` needs to be set from the triggering job~~
Split into #165597
- The pipeline can only be tested from the non-fork, `elastic/kibana`
repo's branches (because buildkite doesn't see forks' branches)
- Soft fails added, to not block the release pipeline in case we still
need to adjust/work on some unstable tests

Reference:
https://docs.google.com/document/d/15rx2Z-soL20An0nBUcXX0o_HHf1OU_IgrHXgz20NndI/edit
Depends on: #165009 
Closes: elastic/kibana-operations#10

---------

Co-authored-by: Tiago Costa <[email protected]>
Co-authored-by: Thomas Watson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting chore release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants