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

[BK] Migrate es-forward (+add versions.json dependent triggering) #184018

Merged
merged 23 commits into from
Jul 10, 2024

Conversation

delanni
Copy link
Contributor

@delanni delanni commented May 22, 2024

Goal

We'd like to introduce a way to run pipelines that have a dependency on the currently active branch set (managed in versions.json).

With this, we'd like to migrate over the es-forward pipelines (currently: this, and this) to the new buildkite infra.

Summary

This PR introduces a new pipeline: https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs (through trigger-version-dependent-jobs.yml).

The purpose of this new pipeline is to take the name of a "pipelineSet" that refers to a pipeline, and based on the versions.json file, work out what are the branches on which the referred pipeline should be triggered.

Example: Trigger ES forward compatibility tests

Since the trigger parameters are derived from the versions.json file, if we move on and close 8.14, and open up 8.16, this will follow, without having to update the pipeline resources or schedules.

Changes

  • 2 pipelines created: trigger-version-dependent-jobs.yml, kibana-es-forward.yml
    • add kibana-es-forward.yml
  • implementation for trigger-version-dependent-jobs added
  • branch configuration removed from pipelines (kibana-artifacts-staging, kibana-artifacts-snapshot, kibana-artifacts-trigger)
  • added a script for checking RREs validity (moved a few files)

Verification

I've used the migration staging pipeline (*) to run this:

(*note: this migration staging pipeline will come in handy even after the migration, to stage newly created pipelines without creating the resource up-front)

@delanni delanni force-pushed the add-pipeline-parametric-triggers branch from 8273a3a to b66422a Compare May 22, 2024 13:44
@delanni delanni force-pushed the add-pipeline-parametric-triggers branch from b66422a to 07ac9cd Compare May 22, 2024 16:42
@delanni delanni force-pushed the add-pipeline-parametric-triggers branch from bf75216 to 6442a19 Compare May 22, 2024 17:09
@@ -21,7 +21,6 @@ spec:
env:
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
allow_rebuilds: true
branch_configuration: main 8.14 7.17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be removed, or replaced with a generic *.* + main type expression, because we don't want to keep updating this in every version switch

@delanni delanni added ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project labels May 24, 2024
@delanni
Copy link
Contributor Author

delanni commented May 24, 2024

/ci

@delanni
Copy link
Contributor Author

delanni commented May 24, 2024

/ci

@kibana-ci
Copy link
Collaborator

kibana-ci commented May 24, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5412 +5412
total size - 8.8MB +8.8MB

History

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

@delanni delanni force-pushed the add-pipeline-parametric-triggers branch from bf88a46 to 8c8770f Compare July 1, 2024 14:54
@delanni delanni force-pushed the add-pipeline-parametric-triggers branch from 8c8770f to 4cb0c47 Compare July 1, 2024 14:55
@delanni delanni changed the title Add pipeline parametric triggers [BK] Add pipeline parametric triggers Jul 1, 2024
@delanni delanni force-pushed the add-pipeline-parametric-triggers branch from 650b48c to 5066bb2 Compare July 1, 2024 16:05
@delanni delanni removed ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-elasticsearch Create an Elasticsearch Serverless project labels Jul 2, 2024
@delanni
Copy link
Contributor Author

delanni commented Jul 4, 2024

Did you test this in the dynamic pipeline upload or planning to setup the new pipeline and test against that? I think the later is required, so just making sure.

@Ikuni17 - yes, I've updated the description with some indicative runs

Copy link
Contributor

@Ikuni17 Ikuni17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comments about tests, but otherwise LGTM

@delanni delanni merged commit ea25099 into elastic:main Jul 10, 2024
18 of 19 checks passed
delanni added a commit that referenced this pull request Jul 10, 2024
## Summary
The ES forward testing only happens from the direction of 7.17, so this
file only exists on 7.17, thus it's not a backport, but a direct
adjustment of these rules.

Follows up: #184018
@delanni delanni deleted the add-pipeline-parametric-triggers branch July 10, 2024 10:08
@delanni delanni removed the backport:skip This commit does not require backporting label Jul 10, 2024
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 10, 2024
@delanni delanni added v8.15.0 backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Jul 10, 2024
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.15 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 184018

Questions ?

Please refer to the Backport tool documentation

delanni added a commit to delanni/kibana that referenced this pull request Jul 10, 2024
…astic#184018)

## Goal
We'd like to introduce a way to run pipelines that have a dependency on
the currently active branch set (managed in
[versions.json](./versions.json)).

With this, we'd like to migrate over the `es-forward` pipelines
(currently:
[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),
and
[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))
to the new buildkite infra.

## Summary
This PR introduces a new pipeline:
https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs
(through
[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).

The purpose of this new pipeline is to take the name of a "pipelineSet"
that refers to a pipeline, and based on the `versions.json` file, work
out what are the branches on which the referred pipeline should be
triggered.

### Example: `Trigger ES forward compatibility tests`
- a scheduled run on
[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)
with the env var `TRIGGER_PIPELINE_SET=es-forward` runs
- the pipeline implementation for
`kibana-trigger-version-dependent-jobs` works out (looking at
`versions.json`), that the `es-forward` set should trigger
https://buildkite.com/elastic/kibana-es-forward (doesn't exist prior to
the PR) for (7.17+8.14) and (7.17+8.15)
- the pipeline implementation uploads two trigger steps, running
https://buildkite.com/elastic/kibana-es-forward in two instances with
the relevant parameterization.

Since the trigger parameters are derived from the `versions.json` file,
if we move on and close `8.14`, and open up `8.16`, this will follow,
without having to update the pipeline resources or schedules.

## Changes
- 2 pipelines created:
[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),
[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)
   - [x] add kibana-es-forward.yml
 - implementation for `trigger-version-dependent-jobs` added
- branch configuration removed from pipelines (kibana-artifacts-staging,
kibana-artifacts-snapshot, kibana-artifacts-trigger)
 - added a script for checking RREs validity (moved a few files)

## Verification
I've used the migration staging pipeline (*) to run this:
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130
   - Env: `TRIGGER_PIPELINE_SET="artifacts-trigger"`
- Result:
[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)
it triggered for 8.14 only (as expected)
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131
   - Env: `TRIGGER_PIPELINE_SET="es-forward"`
- Result: (success): it generated 2 trigger steps, but since the
es-forward pipeline doesn't exist, the upload step failed
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132
   - Env: `TRIGGER_PIPELINE_SET="artifacts-snapshot"`
- Result: (success): it triggered jobs for all 3 open branches
(main/8.14/7.17)
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134
   - Env: `TRIGGER_PIPELINE_SET="artifacts-staging"`
   - Result: (success): it triggered 8.14 / 7.14, but not for main

(*note: this migration staging pipeline will come in handy even after
the migration, to stage newly created pipelines without creating the
resource up-front)

(cherry picked from commit ea25099)

# Conflicts:
#	.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml
#	.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml
#	.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml
delanni added a commit that referenced this pull request Jul 10, 2024
## Summary
I've introduced a typo to the artifact publish script in #184018 - this
PR fixes it.
delanni added a commit to delanni/kibana that referenced this pull request Jul 10, 2024
…astic#184018)

## Goal
We'd like to introduce a way to run pipelines that have a dependency on
the currently active branch set (managed in
[versions.json](./versions.json)).

With this, we'd like to migrate over the `es-forward` pipelines
(currently:
[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),
and
[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))
to the new buildkite infra.

## Summary
This PR introduces a new pipeline:
https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs
(through
[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).

The purpose of this new pipeline is to take the name of a "pipelineSet"
that refers to a pipeline, and based on the `versions.json` file, work
out what are the branches on which the referred pipeline should be
triggered.

### Example: `Trigger ES forward compatibility tests`
- a scheduled run on
[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)
with the env var `TRIGGER_PIPELINE_SET=es-forward` runs
- the pipeline implementation for
`kibana-trigger-version-dependent-jobs` works out (looking at
`versions.json`), that the `es-forward` set should trigger
https://buildkite.com/elastic/kibana-es-forward (doesn't exist prior to
the PR) for (7.17+8.14) and (7.17+8.15)
- the pipeline implementation uploads two trigger steps, running
https://buildkite.com/elastic/kibana-es-forward in two instances with
the relevant parameterization.

Since the trigger parameters are derived from the `versions.json` file,
if we move on and close `8.14`, and open up `8.16`, this will follow,
without having to update the pipeline resources or schedules.

## Changes
- 2 pipelines created:
[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),
[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)
   - [x] add kibana-es-forward.yml
 - implementation for `trigger-version-dependent-jobs` added
- branch configuration removed from pipelines (kibana-artifacts-staging,
kibana-artifacts-snapshot, kibana-artifacts-trigger)
 - added a script for checking RREs validity (moved a few files)

## Verification
I've used the migration staging pipeline (*) to run this:
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130
   - Env: `TRIGGER_PIPELINE_SET="artifacts-trigger"`
- Result:
[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)
it triggered for 8.14 only (as expected)
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131
   - Env: `TRIGGER_PIPELINE_SET="es-forward"`
- Result: (success): it generated 2 trigger steps, but since the
es-forward pipeline doesn't exist, the upload step failed
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132
   - Env: `TRIGGER_PIPELINE_SET="artifacts-snapshot"`
- Result: (success): it triggered jobs for all 3 open branches
(main/8.14/7.17)
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134
   - Env: `TRIGGER_PIPELINE_SET="artifacts-staging"`
   - Result: (success): it triggered 8.14 / 7.14, but not for main

(*note: this migration staging pipeline will come in handy even after
the migration, to stage newly created pipelines without creating the
resource up-front)

(cherry picked from commit ea25099)

# Conflicts:
#	.buildkite/pipeline-resource-definitions/_templates/_new_pipeline.yml
#	.buildkite/pipeline-resource-definitions/kibana-artifacts-snapshot.yml
#	.buildkite/pipeline-resource-definitions/kibana-artifacts-staging.yml
#	.buildkite/pipeline-resource-definitions/kibana-artifacts-trigger.yml
#	.buildkite/pipeline-resource-definitions/locations.yml
#	.buildkite/pipeline-resource-definitions/scripts/fix-location-collection.ts
@delanni
Copy link
Contributor Author

delanni commented Jul 10, 2024

💚 All backports created successfully

Status Branch Result
8.15
8.14

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

pgayvallet pushed a commit to pgayvallet/kibana that referenced this pull request Jul 11, 2024
…astic#184018)

## Goal
We'd like to introduce a way to run pipelines that have a dependency on
the currently active branch set (managed in
[versions.json](./versions.json)).

With this, we'd like to migrate over the `es-forward` pipelines
(currently:
[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),
and
[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))
to the new buildkite infra.

## Summary
This PR introduces a new pipeline:
https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs
(through
[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).

The purpose of this new pipeline is to take the name of a "pipelineSet"
that refers to a pipeline, and based on the `versions.json` file, work
out what are the branches on which the referred pipeline should be
triggered.

### Example: `Trigger ES forward compatibility tests`
- a scheduled run on
[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)
with the env var `TRIGGER_PIPELINE_SET=es-forward` runs
- the pipeline implementation for
`kibana-trigger-version-dependent-jobs` works out (looking at
`versions.json`), that the `es-forward` set should trigger
https://buildkite.com/elastic/kibana-es-forward (doesn't exist prior to
the PR) for (7.17+8.14) and (7.17+8.15)
- the pipeline implementation uploads two trigger steps, running
https://buildkite.com/elastic/kibana-es-forward in two instances with
the relevant parameterization.

Since the trigger parameters are derived from the `versions.json` file,
if we move on and close `8.14`, and open up `8.16`, this will follow,
without having to update the pipeline resources or schedules.

## Changes
- 2 pipelines created:
[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),
[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)
   - [x] add kibana-es-forward.yml
 - implementation for `trigger-version-dependent-jobs` added
- branch configuration removed from pipelines (kibana-artifacts-staging,
kibana-artifacts-snapshot, kibana-artifacts-trigger)
 - added a script for checking RREs validity (moved a few files)

## Verification
I've used the migration staging pipeline (*) to run this:
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130
   - Env: `TRIGGER_PIPELINE_SET="artifacts-trigger"`
- Result:
[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)
it triggered for 8.14 only (as expected)
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131
   - Env: `TRIGGER_PIPELINE_SET="es-forward"`
- Result: (success): it generated 2 trigger steps, but since the
es-forward pipeline doesn't exist, the upload step failed
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132
   - Env: `TRIGGER_PIPELINE_SET="artifacts-snapshot"`
- Result: (success): it triggered jobs for all 3 open branches
(main/8.14/7.17)
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134
   - Env: `TRIGGER_PIPELINE_SET="artifacts-staging"`
   - Result: (success): it triggered 8.14 / 7.14, but not for main


(*note: this migration staging pipeline will come in handy even after
the migration, to stage newly created pipelines without creating the
resource up-front)
pgayvallet pushed a commit to pgayvallet/kibana that referenced this pull request Jul 11, 2024
## Summary
I've introduced a typo to the artifact publish script in elastic#184018 - this
PR fixes it.
delanni added a commit that referenced this pull request Jul 15, 2024
…ng) (#184018) (#187987)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[BK] Migrate es-forward (+add versions.json dependent triggering)
(#184018)](#184018)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2024-07-10T10:08:16Z","message":"[BK]
Migrate es-forward (+add versions.json dependent triggering)
(#184018)\n\n## Goal\r\nWe'd like to introduce a way to run pipelines
that have a dependency on\r\nthe currently active branch set (managed
in\r\n[versions.json](./versions.json)).\r\n\r\nWith this, we'd like to
migrate over the `es-forward`
pipelines\r\n(currently:\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),\r\nand\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))\r\nto
the new buildkite infra.\r\n\r\n## Summary\r\nThis PR introduces a new
pipeline:\r\nhttps://buildkite.com/elastic/kibana-trigger-version-dependent-jobs\r\n(through\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).\r\n\r\nThe
purpose of this new pipeline is to take the name of a
\"pipelineSet\"\r\nthat refers to a pipeline, and based on the
`versions.json` file, work\r\nout what are the branches on which the
referred pipeline should be\r\ntriggered.\r\n\r\n### Example: `Trigger
ES forward compatibility tests`\r\n- a scheduled run
on\r\n[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)\r\nwith
the env var `TRIGGER_PIPELINE_SET=es-forward` runs\r\n- the pipeline
implementation for\r\n`kibana-trigger-version-dependent-jobs` works out
(looking at\r\n`versions.json`), that the `es-forward` set should
trigger\r\nhttps://buildkite.com/elastic/kibana-es-forward (doesn't
exist prior to\r\nthe PR) for (7.17+8.14) and (7.17+8.15)\r\n- the
pipeline implementation uploads two trigger steps,
running\r\nhttps://buildkite.com/elastic/kibana-es-forward in two
instances with\r\nthe relevant parameterization.\r\n\r\nSince the
trigger parameters are derived from the `versions.json` file,\r\nif we
move on and close `8.14`, and open up `8.16`, this will
follow,\r\nwithout having to update the pipeline resources or
schedules.\r\n\r\n## Changes\r\n- 2 pipelines
created:\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),\r\n[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)\r\n
- [x] add kibana-es-forward.yml\r\n - implementation for
`trigger-version-dependent-jobs` added\r\n- branch configuration removed
from pipelines (kibana-artifacts-staging,\r\nkibana-artifacts-snapshot,
kibana-artifacts-trigger)\r\n - added a script for checking RREs
validity (moved a few files)\r\n\r\n## Verification\r\nI've used the
migration staging pipeline (*) to run
this:\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-trigger\"`\r\n-
Result:\r\n[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)\r\nit
triggered for 8.14 only (as
expected)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131\r\n
- Env: `TRIGGER_PIPELINE_SET=\"es-forward\"`\r\n- Result: (success): it
generated 2 trigger steps, but since the\r\nes-forward pipeline doesn't
exist, the upload step
failed\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-snapshot\"`\r\n- Result:
(success): it triggered jobs for all 3 open
branches\r\n(main/8.14/7.17)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-staging\"`\r\n - Result:
(success): it triggered 8.14 / 7.14, but not for main\r\n\r\n\r\n(*note:
this migration staging pipeline will come in handy even after\r\nthe
migration, to stage newly created pipelines without creating
the\r\nresource
up-front)","sha":"ea2509914f2238c646bb63eb5bbbb240365fd04d","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-minor","v8.15.0","v8.16.0"],"number":184018,"url":"https://github.com/elastic/kibana/pull/184018","mergeCommit":{"message":"[BK]
Migrate es-forward (+add versions.json dependent triggering)
(#184018)\n\n## Goal\r\nWe'd like to introduce a way to run pipelines
that have a dependency on\r\nthe currently active branch set (managed
in\r\n[versions.json](./versions.json)).\r\n\r\nWith this, we'd like to
migrate over the `es-forward`
pipelines\r\n(currently:\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),\r\nand\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))\r\nto
the new buildkite infra.\r\n\r\n## Summary\r\nThis PR introduces a new
pipeline:\r\nhttps://buildkite.com/elastic/kibana-trigger-version-dependent-jobs\r\n(through\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).\r\n\r\nThe
purpose of this new pipeline is to take the name of a
\"pipelineSet\"\r\nthat refers to a pipeline, and based on the
`versions.json` file, work\r\nout what are the branches on which the
referred pipeline should be\r\ntriggered.\r\n\r\n### Example: `Trigger
ES forward compatibility tests`\r\n- a scheduled run
on\r\n[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)\r\nwith
the env var `TRIGGER_PIPELINE_SET=es-forward` runs\r\n- the pipeline
implementation for\r\n`kibana-trigger-version-dependent-jobs` works out
(looking at\r\n`versions.json`), that the `es-forward` set should
trigger\r\nhttps://buildkite.com/elastic/kibana-es-forward (doesn't
exist prior to\r\nthe PR) for (7.17+8.14) and (7.17+8.15)\r\n- the
pipeline implementation uploads two trigger steps,
running\r\nhttps://buildkite.com/elastic/kibana-es-forward in two
instances with\r\nthe relevant parameterization.\r\n\r\nSince the
trigger parameters are derived from the `versions.json` file,\r\nif we
move on and close `8.14`, and open up `8.16`, this will
follow,\r\nwithout having to update the pipeline resources or
schedules.\r\n\r\n## Changes\r\n- 2 pipelines
created:\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),\r\n[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)\r\n
- [x] add kibana-es-forward.yml\r\n - implementation for
`trigger-version-dependent-jobs` added\r\n- branch configuration removed
from pipelines (kibana-artifacts-staging,\r\nkibana-artifacts-snapshot,
kibana-artifacts-trigger)\r\n - added a script for checking RREs
validity (moved a few files)\r\n\r\n## Verification\r\nI've used the
migration staging pipeline (*) to run
this:\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-trigger\"`\r\n-
Result:\r\n[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)\r\nit
triggered for 8.14 only (as
expected)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131\r\n
- Env: `TRIGGER_PIPELINE_SET=\"es-forward\"`\r\n- Result: (success): it
generated 2 trigger steps, but since the\r\nes-forward pipeline doesn't
exist, the upload step
failed\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-snapshot\"`\r\n- Result:
(success): it triggered jobs for all 3 open
branches\r\n(main/8.14/7.17)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-staging\"`\r\n - Result:
(success): it triggered 8.14 / 7.14, but not for main\r\n\r\n\r\n(*note:
this migration staging pipeline will come in handy even after\r\nthe
migration, to stage newly created pipelines without creating
the\r\nresource
up-front)","sha":"ea2509914f2238c646bb63eb5bbbb240365fd04d"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/184018","number":184018,"mergeCommit":{"message":"[BK]
Migrate es-forward (+add versions.json dependent triggering)
(#184018)\n\n## Goal\r\nWe'd like to introduce a way to run pipelines
that have a dependency on\r\nthe currently active branch set (managed
in\r\n[versions.json](./versions.json)).\r\n\r\nWith this, we'd like to
migrate over the `es-forward`
pipelines\r\n(currently:\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),\r\nand\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))\r\nto
the new buildkite infra.\r\n\r\n## Summary\r\nThis PR introduces a new
pipeline:\r\nhttps://buildkite.com/elastic/kibana-trigger-version-dependent-jobs\r\n(through\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).\r\n\r\nThe
purpose of this new pipeline is to take the name of a
\"pipelineSet\"\r\nthat refers to a pipeline, and based on the
`versions.json` file, work\r\nout what are the branches on which the
referred pipeline should be\r\ntriggered.\r\n\r\n### Example: `Trigger
ES forward compatibility tests`\r\n- a scheduled run
on\r\n[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)\r\nwith
the env var `TRIGGER_PIPELINE_SET=es-forward` runs\r\n- the pipeline
implementation for\r\n`kibana-trigger-version-dependent-jobs` works out
(looking at\r\n`versions.json`), that the `es-forward` set should
trigger\r\nhttps://buildkite.com/elastic/kibana-es-forward (doesn't
exist prior to\r\nthe PR) for (7.17+8.14) and (7.17+8.15)\r\n- the
pipeline implementation uploads two trigger steps,
running\r\nhttps://buildkite.com/elastic/kibana-es-forward in two
instances with\r\nthe relevant parameterization.\r\n\r\nSince the
trigger parameters are derived from the `versions.json` file,\r\nif we
move on and close `8.14`, and open up `8.16`, this will
follow,\r\nwithout having to update the pipeline resources or
schedules.\r\n\r\n## Changes\r\n- 2 pipelines
created:\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),\r\n[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)\r\n
- [x] add kibana-es-forward.yml\r\n - implementation for
`trigger-version-dependent-jobs` added\r\n- branch configuration removed
from pipelines (kibana-artifacts-staging,\r\nkibana-artifacts-snapshot,
kibana-artifacts-trigger)\r\n - added a script for checking RREs
validity (moved a few files)\r\n\r\n## Verification\r\nI've used the
migration staging pipeline (*) to run
this:\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-trigger\"`\r\n-
Result:\r\n[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)\r\nit
triggered for 8.14 only (as
expected)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131\r\n
- Env: `TRIGGER_PIPELINE_SET=\"es-forward\"`\r\n- Result: (success): it
generated 2 trigger steps, but since the\r\nes-forward pipeline doesn't
exist, the upload step
failed\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-snapshot\"`\r\n- Result:
(success): it triggered jobs for all 3 open
branches\r\n(main/8.14/7.17)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-staging\"`\r\n - Result:
(success): it triggered 8.14 / 7.14, but not for main\r\n\r\n\r\n(*note:
this migration staging pipeline will come in handy even after\r\nthe
migration, to stage newly created pipelines without creating
the\r\nresource
up-front)","sha":"ea2509914f2238c646bb63eb5bbbb240365fd04d"}}]}]
BACKPORT-->
delanni added a commit that referenced this pull request Jul 15, 2024
…ng) (#184018) (#187983)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[BK] Migrate es-forward (+add versions.json dependent triggering)
(#184018)](#184018)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2024-07-10T10:08:16Z","message":"[BK]
Migrate es-forward (+add versions.json dependent triggering)
(#184018)\n\n## Goal\r\nWe'd like to introduce a way to run pipelines
that have a dependency on\r\nthe currently active branch set (managed
in\r\n[versions.json](./versions.json)).\r\n\r\nWith this, we'd like to
migrate over the `es-forward`
pipelines\r\n(currently:\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),\r\nand\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))\r\nto
the new buildkite infra.\r\n\r\n## Summary\r\nThis PR introduces a new
pipeline:\r\nhttps://buildkite.com/elastic/kibana-trigger-version-dependent-jobs\r\n(through\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).\r\n\r\nThe
purpose of this new pipeline is to take the name of a
\"pipelineSet\"\r\nthat refers to a pipeline, and based on the
`versions.json` file, work\r\nout what are the branches on which the
referred pipeline should be\r\ntriggered.\r\n\r\n### Example: `Trigger
ES forward compatibility tests`\r\n- a scheduled run
on\r\n[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)\r\nwith
the env var `TRIGGER_PIPELINE_SET=es-forward` runs\r\n- the pipeline
implementation for\r\n`kibana-trigger-version-dependent-jobs` works out
(looking at\r\n`versions.json`), that the `es-forward` set should
trigger\r\nhttps://buildkite.com/elastic/kibana-es-forward (doesn't
exist prior to\r\nthe PR) for (7.17+8.14) and (7.17+8.15)\r\n- the
pipeline implementation uploads two trigger steps,
running\r\nhttps://buildkite.com/elastic/kibana-es-forward in two
instances with\r\nthe relevant parameterization.\r\n\r\nSince the
trigger parameters are derived from the `versions.json` file,\r\nif we
move on and close `8.14`, and open up `8.16`, this will
follow,\r\nwithout having to update the pipeline resources or
schedules.\r\n\r\n## Changes\r\n- 2 pipelines
created:\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),\r\n[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)\r\n
- [x] add kibana-es-forward.yml\r\n - implementation for
`trigger-version-dependent-jobs` added\r\n- branch configuration removed
from pipelines (kibana-artifacts-staging,\r\nkibana-artifacts-snapshot,
kibana-artifacts-trigger)\r\n - added a script for checking RREs
validity (moved a few files)\r\n\r\n## Verification\r\nI've used the
migration staging pipeline (*) to run
this:\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-trigger\"`\r\n-
Result:\r\n[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)\r\nit
triggered for 8.14 only (as
expected)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131\r\n
- Env: `TRIGGER_PIPELINE_SET=\"es-forward\"`\r\n- Result: (success): it
generated 2 trigger steps, but since the\r\nes-forward pipeline doesn't
exist, the upload step
failed\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-snapshot\"`\r\n- Result:
(success): it triggered jobs for all 3 open
branches\r\n(main/8.14/7.17)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-staging\"`\r\n - Result:
(success): it triggered 8.14 / 7.14, but not for main\r\n\r\n\r\n(*note:
this migration staging pipeline will come in handy even after\r\nthe
migration, to stage newly created pipelines without creating
the\r\nresource
up-front)","sha":"ea2509914f2238c646bb63eb5bbbb240365fd04d","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-minor","v8.15.0","v8.16.0"],"number":184018,"url":"https://github.com/elastic/kibana/pull/184018","mergeCommit":{"message":"[BK]
Migrate es-forward (+add versions.json dependent triggering)
(#184018)\n\n## Goal\r\nWe'd like to introduce a way to run pipelines
that have a dependency on\r\nthe currently active branch set (managed
in\r\n[versions.json](./versions.json)).\r\n\r\nWith this, we'd like to
migrate over the `es-forward`
pipelines\r\n(currently:\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),\r\nand\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))\r\nto
the new buildkite infra.\r\n\r\n## Summary\r\nThis PR introduces a new
pipeline:\r\nhttps://buildkite.com/elastic/kibana-trigger-version-dependent-jobs\r\n(through\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).\r\n\r\nThe
purpose of this new pipeline is to take the name of a
\"pipelineSet\"\r\nthat refers to a pipeline, and based on the
`versions.json` file, work\r\nout what are the branches on which the
referred pipeline should be\r\ntriggered.\r\n\r\n### Example: `Trigger
ES forward compatibility tests`\r\n- a scheduled run
on\r\n[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)\r\nwith
the env var `TRIGGER_PIPELINE_SET=es-forward` runs\r\n- the pipeline
implementation for\r\n`kibana-trigger-version-dependent-jobs` works out
(looking at\r\n`versions.json`), that the `es-forward` set should
trigger\r\nhttps://buildkite.com/elastic/kibana-es-forward (doesn't
exist prior to\r\nthe PR) for (7.17+8.14) and (7.17+8.15)\r\n- the
pipeline implementation uploads two trigger steps,
running\r\nhttps://buildkite.com/elastic/kibana-es-forward in two
instances with\r\nthe relevant parameterization.\r\n\r\nSince the
trigger parameters are derived from the `versions.json` file,\r\nif we
move on and close `8.14`, and open up `8.16`, this will
follow,\r\nwithout having to update the pipeline resources or
schedules.\r\n\r\n## Changes\r\n- 2 pipelines
created:\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),\r\n[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)\r\n
- [x] add kibana-es-forward.yml\r\n - implementation for
`trigger-version-dependent-jobs` added\r\n- branch configuration removed
from pipelines (kibana-artifacts-staging,\r\nkibana-artifacts-snapshot,
kibana-artifacts-trigger)\r\n - added a script for checking RREs
validity (moved a few files)\r\n\r\n## Verification\r\nI've used the
migration staging pipeline (*) to run
this:\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-trigger\"`\r\n-
Result:\r\n[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)\r\nit
triggered for 8.14 only (as
expected)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131\r\n
- Env: `TRIGGER_PIPELINE_SET=\"es-forward\"`\r\n- Result: (success): it
generated 2 trigger steps, but since the\r\nes-forward pipeline doesn't
exist, the upload step
failed\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-snapshot\"`\r\n- Result:
(success): it triggered jobs for all 3 open
branches\r\n(main/8.14/7.17)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-staging\"`\r\n - Result:
(success): it triggered 8.14 / 7.14, but not for main\r\n\r\n\r\n(*note:
this migration staging pipeline will come in handy even after\r\nthe
migration, to stage newly created pipelines without creating
the\r\nresource
up-front)","sha":"ea2509914f2238c646bb63eb5bbbb240365fd04d"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/184018","number":184018,"mergeCommit":{"message":"[BK]
Migrate es-forward (+add versions.json dependent triggering)
(#184018)\n\n## Goal\r\nWe'd like to introduce a way to run pipelines
that have a dependency on\r\nthe currently active branch set (managed
in\r\n[versions.json](./versions.json)).\r\n\r\nWith this, we'd like to
migrate over the `es-forward`
pipelines\r\n(currently:\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-15-forward-compatibility),\r\nand\r\n[this](https://buildkite.com/elastic/kibana-7-dot-17-es-8-dot-14-forward-compatibility))\r\nto
the new buildkite infra.\r\n\r\n## Summary\r\nThis PR introduces a new
pipeline:\r\nhttps://buildkite.com/elastic/kibana-trigger-version-dependent-jobs\r\n(through\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml)).\r\n\r\nThe
purpose of this new pipeline is to take the name of a
\"pipelineSet\"\r\nthat refers to a pipeline, and based on the
`versions.json` file, work\r\nout what are the branches on which the
referred pipeline should be\r\ntriggered.\r\n\r\n### Example: `Trigger
ES forward compatibility tests`\r\n- a scheduled run
on\r\n[kibana-trigger-version-dependent-jobs](https://buildkite.com/elastic/kibana-trigger-version-dependent-jobs)\r\nwith
the env var `TRIGGER_PIPELINE_SET=es-forward` runs\r\n- the pipeline
implementation for\r\n`kibana-trigger-version-dependent-jobs` works out
(looking at\r\n`versions.json`), that the `es-forward` set should
trigger\r\nhttps://buildkite.com/elastic/kibana-es-forward (doesn't
exist prior to\r\nthe PR) for (7.17+8.14) and (7.17+8.15)\r\n- the
pipeline implementation uploads two trigger steps,
running\r\nhttps://buildkite.com/elastic/kibana-es-forward in two
instances with\r\nthe relevant parameterization.\r\n\r\nSince the
trigger parameters are derived from the `versions.json` file,\r\nif we
move on and close `8.14`, and open up `8.16`, this will
follow,\r\nwithout having to update the pipeline resources or
schedules.\r\n\r\n## Changes\r\n- 2 pipelines
created:\r\n[trigger-version-dependent-jobs.yml](.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml),\r\n[kibana-es-forward.yml](.buildkite/pipeline-resource-definitions/kibana-es-forward.yml)\r\n
- [x] add kibana-es-forward.yml\r\n - implementation for
`trigger-version-dependent-jobs` added\r\n- branch configuration removed
from pipelines (kibana-artifacts-staging,\r\nkibana-artifacts-snapshot,
kibana-artifacts-trigger)\r\n - added a script for checking RREs
validity (moved a few files)\r\n\r\n## Verification\r\nI've used the
migration staging pipeline (*) to run
this:\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/130\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-trigger\"`\r\n-
Result:\r\n[(success):](https://buildkite.com/elastic/kibana-artifacts-trigger/builds/10806)\r\nit
triggered for 8.14 only (as
expected)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/131\r\n
- Env: `TRIGGER_PIPELINE_SET=\"es-forward\"`\r\n- Result: (success): it
generated 2 trigger steps, but since the\r\nes-forward pipeline doesn't
exist, the upload step
failed\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/132\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-snapshot\"`\r\n- Result:
(success): it triggered jobs for all 3 open
branches\r\n(main/8.14/7.17)\r\n-\r\nhttps://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/134\r\n
- Env: `TRIGGER_PIPELINE_SET=\"artifacts-staging\"`\r\n - Result:
(success): it triggered 8.14 / 7.14, but not for main\r\n\r\n\r\n(*note:
this migration staging pipeline will come in handy even after\r\nthe
migration, to stage newly created pipelines without creating
the\r\nresource
up-front)","sha":"ea2509914f2238c646bb63eb5bbbb240365fd04d"}}]}]
BACKPORT-->
adelisle pushed a commit to Makila-AI/kibana that referenced this pull request Aug 5, 2024
## Summary
The ES forward testing only happens from the direction of 7.17, so this
file only exists on 7.17, thus it's not a backport, but a direct
adjustment of these rules.

Follows up: elastic#184018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v8.14.4 v8.15.0 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants