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

[CI] Try to prevent npm/yarn problems from causing an agent to fail all future jobs #122358

Merged

Conversation

brianseeders
Copy link
Contributor

@brianseeders brianseeders commented Jan 5, 2022

Most steps in our Buildkite pipelines use one-time use agents. But, the really short steps that every build runs (pipeline upload, pre-build, post-build) use long-running agents. There are a few things related to node modules that can cause agents to start failing all jobs they run.

Here's an example of what happens:

  1. A job is run for a PR that needs a different version of yarn than what is currently installed on the agent
  2. The job is cancelled after someone pushes a new commit to the PR, and it happens to be in the middle of npm install -g yarn
  3. The yarn global node_modules directory is in a bad state
  4. The next job and all future ones on this agent will fail when trying to install yarn

The long-term goal would be to use something like containers to provide more isolation between jobs while keeping fast start times, but this should help in the short-term.

@brianseeders brianseeders added Feature:CI Continuous integration release_note:skip Skip the PR/issue when compiling release notes v8.1.0 Team:Operations Team label for Operations Team labels Jan 5, 2022
@brianseeders brianseeders added v7.15.3 v7.16.3 v7.17.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jan 5, 2022
@brianseeders brianseeders marked this pull request as ready for review January 5, 2022 17:17
@brianseeders brianseeders requested a review from a team as a code owner January 5, 2022 17:17
@elasticmachine
Copy link
Contributor

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

@brianseeders brianseeders enabled auto-merge (squash) January 5, 2022 17:18
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.15
7.17
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jan 5, 2022
…ll future jobs (#122358) (#122381)

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 5, 2022
…ll future jobs (#122358) (#122382)

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 5, 2022
…ll future jobs (#122358) (#122380)

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
gbamparop pushed a commit to gbamparop/kibana that referenced this pull request Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:CI Continuous integration release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.15.3 v7.16.3 v7.17.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants