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

Bump elastic stack version automation #25148

Merged
merged 11 commits into from
Apr 23, 2021

Conversation

v1v
Copy link
Member

@v1v v1v commented Apr 19, 2021

What does this PR do?

Enable automerge with mergify

And provide script to bump the versions:

$ .ci/bump-stack-version.sh 8.0.0-3beeb19e
Update stack with version 8.0.0-3beeb19e

This PR is one part of the required changes to enable the automation.

Why is it important?

Handle the stack versions on a PR basis to ensure breaking changes are handled correctly.

Tests

I ran this script in my local environment and produced -> v1v#4

v1v added 2 commits April 19, 2021 17:37
curl -s https://artifacts-api.elastic.co/v1/versions/8.0.0-SNAPSHOT/builds/8.0.0-3beeb19e | jq .manifests
{
  "last-update-time": "Mon, 19 Apr 2021 16:38:33 UTC",
  "seconds-since-last-update": 11
}
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 19, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Apr 19, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #25148 updated

  • Start Time: 2021-04-23T13:42:24.512+0000

  • Duration: 28 min 4 sec

  • Commit: 7226193

Trends 🧪

Image of Build Times

❕ Flaky test report

No test was executed to be analysed.

@v1v
Copy link
Member Author

v1v commented Apr 19, 2021

/test

@@ -3,7 +3,7 @@
version: '2.3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-3beeb19e-SNAPSHOT
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@andrewkroh
Copy link
Member

This is great. On a related note there was a recent ES where it automatically updates the geoip database leading to some unpredictable behavior despite pinning the version. I started an issue at #25159 to discuss.

@ruflin
Copy link
Contributor

ruflin commented Apr 21, 2021

See my comment in elastic/fleet-server#252. I was thinking if there are options to get best of both worlds.

  • Have a fix hash as described in this PR
  • Run master against snapshot without a hash on daily base and notify the team if it fails
  • Automatically open every X days a PR that updates the dependency

If we don't update it frequently it will be like all other dependencies that we only update it when we really need it.

@v1v
Copy link
Member Author

v1v commented Apr 21, 2021

For clarity, I'll amend this PR to do only one thing, which it's the one related with the script to be consumed by the automation we are talking about.

The other changes were just to validate this worked as expected.

@v1v v1v changed the title Pin stack version in the testing environments Bump elastic stack version automation Apr 21, 2021

echo "Commit changes"
git config user.email
git checkout -b "update-stack-version-$(date "+%Y%m%d%H%M%S")"
Copy link
Member Author

Choose a reason for hiding this comment

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

In order to reuse an existing PR then the branch creating should only happen if set.

In other words,

There is a requirement to support:

  1. Reusing an existing PR if there is already an open PR with a previous bump.
  2. Creating a new PR if the above is not true or it's configured to create always independently.

@ruflin ruflin requested a review from urso April 22, 2021 11:01
v1v added 2 commits April 22, 2021 12:19
…ng-versions-stack

* upstream/master: (28 commits)
  Add support for parsers in filestream input (elastic#24763)
  Skip flaky test TestFilestreamTruncate (elastic#25218)
  backport: Add 7.13 branch (elastic#25189)
  Update decode_json_fields.asciidoc (elastic#25056)
  [Elastic Agent] Fix status and inspect command to work inside running container (elastic#25204)
  Check native environment before starting (elastic#25186)
  Change event.code and winlog.event_id type (elastic#25176)
  [Ingest Manager] Proxy processes/elastic-agent to stats (elastic#25193)
  Update mergify backporting to 7.x and 7.13 (elastic#25196)
  [Heartbeat]: ensure synthetics version co* [Heartbeat]: ensure synthetics version compatability for suites  * address review and fix notice  * fix lowercase struct  * fix version conflict and rebase  * update go.* stuff to master  * fix notice.txt  * move validate inside sourcempatability for suites (elastic#24777)
  [Filebeat] Ensure Kibana audit `event.category` and `event.type` are still processed as strings. (elastic#25101)
  Update replace.asciidoc (elastic#25055)
  Fix nil panic when overwriting metadata (elastic#24741)
  [Filebeat] Add Malware Bazaar to Threat Intel Module (elastic#24570)
  Fix k8s svc selectors mapping (elastic#25169)
  [Ingest Manager] Make agent retry values for bootstraping configurable (elastic#25163)
  [Metricbeat] Remove elasticsearc.index.created from the SM code (elastic#25113)
  [Ingest Manager] Keep http and logging config during enroll (elastic#25132)
  Refactor kubernetes autodiscover to avoid skipping short-living pods (elastic#24742)
  [libbeat] New decode xml wineventlog processor (elastic#25115)
  ...
.ci/bump-stack-version.sh Outdated Show resolved Hide resolved
.ci/bump-stack-version.sh Outdated Show resolved Hide resolved
.ci/bump-stack-version.sh Outdated Show resolved Hide resolved
.ci/bump-stack-version.sh Outdated Show resolved Hide resolved
@v1v v1v marked this pull request as ready for review April 23, 2021 10:33
@v1v v1v requested a review from a team as a code owner April 23, 2021 10:33
@v1v v1v self-assigned this Apr 23, 2021
@v1v v1v added automation backport-v7.12.0 Automated backport with mergify backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify Team:Automation Label for the Observability productivity team labels Apr 23, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 23, 2021
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Thanks!

.gitignore Outdated Show resolved Hide resolved
@v1v v1v merged commit cc29196 into elastic:master Apr 23, 2021
@v1v v1v deleted the feature/pin-testing-versions-stack branch April 23, 2021 16:09
mergify bot pushed a commit that referenced this pull request Apr 23, 2021
(cherry picked from commit cc29196)

# Conflicts:
#	.mergify.yml
mergify bot pushed a commit that referenced this pull request Apr 23, 2021
(cherry picked from commit cc29196)

# Conflicts:
#	.mergify.yml
mergify bot pushed a commit that referenced this pull request Apr 23, 2021
(cherry picked from commit cc29196)

# Conflicts:
#	.mergify.yml
@v1v
Copy link
Member Author

v1v commented Jul 19, 2021

@Mergifyio backport 6.8

mergify bot pushed a commit that referenced this pull request Jul 19, 2021
(cherry picked from commit cc29196)

# Conflicts:
#	.gitignore
#	.mergify.yml
@mergify
Copy link
Contributor

mergify bot commented Jul 19, 2021

Command backport 6.8: success

Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation backport-v7.12.0 Automated backport with mergify backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants