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] Soft fail merge coverage reports step #5586

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Sep 20, 2024

What does this PR do?

This PR makes it so that if the "Merge coverage reports" step (key: merge-coverage) in CI fails, we don't fail the build. Since the SonarQube step depends on the merge-coverage step, we similarly don't fail the build if that step fails too, which is expected to happen if the merge-coverage step doesn't succeed.

Why is it important?

We've observed that in some Agent PRs (example), if the "Merge coverage reports" step is retried, it fails like so:

$  .buildkite/scripts/steps/merge.sh unit-tests-2204 unit-tests-2204-arm64 unit-tests-win2016 unit-tests-win2022 unit-tests-macos-13 unit-tests-win10 unit-tests-win11
--
  | go: downloading github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
  | go: finding module for package golang.org/x/tools/cover
  | go: downloading golang.org/x/tools v0.25.0
  | go: found golang.org/x/tools/cover in golang.org/x/tools v0.25.0
  | 2024-09-20 15:54:06 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-2204"
  | 2024-09-20 15:54:06 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-2204
  | 2024-09-20 15:54:06 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024-09-20 15:54:06 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-2204-arm64"
  | 2024-09-20 15:54:07 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-2204-arm64
  | 2024-09-20 15:54:07 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024-09-20 15:54:07 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-win2016"
  | 2024-09-20 15:54:07 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-win2016
  | 2024-09-20 15:54:08 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024-09-20 15:54:08 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-win2022"
  | 2024-09-20 15:54:08 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-win2022
  | 2024-09-20 15:54:09 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024-09-20 15:54:09 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-macos-13"
  | 2024-09-20 15:54:09 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-macos-13
  | 2024-09-20 15:54:09 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024-09-20 15:54:09 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-win10"
  | 2024-09-20 15:54:09 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-win10
  | 2024-09-20 15:54:10 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024-09-20 15:54:10 INFO   Searching for artifacts: "coverage.out" within step: "unit-tests-win11"
  | 2024-09-20 15:54:10 INFO   Found 1 artifacts. Starting to download to: /buildkite/builds/bk-agent-prod-k8s-1726847620841271029/elastic/elastic-agent/unit-tests-win11
  | 2024-09-20 15:54:11 INFO   Successfully downloaded "coverage.out" 7.6 MiB
  | 2024/09/20 15:54:11 OVERLAP BEFORE: github.com/elastic/elastic-agent/internal/pkg/agent/cmd/run.go {132 40 134 3 1 0} {133 2 133 40 1 0}
  | 🚨 Error: The command exited with status 1
  | user command error: exit status 1

For now, we're temporarily going to skip this step while we investigate the root cause and failure separately.

Copy link
Contributor

mergify bot commented Sep 20, 2024

This pull request does not have a backport label. Could you fix it @ycombinator? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Sep 20, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Sep 20, 2024
@ycombinator ycombinator added skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Sep 20, 2024
@ycombinator ycombinator marked this pull request as ready for review September 20, 2024 17:06
@ycombinator ycombinator requested a review from a team as a code owner September 20, 2024 17:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@ycombinator ycombinator changed the title [CI] Skip merge coverage reports step [CI] Soft fail merge coverage reports step Sep 20, 2024
Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

+1

@ycombinator ycombinator enabled auto-merge (squash) September 20, 2024 20:30
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@ycombinator ycombinator merged commit ed98d51 into elastic:main Sep 30, 2024
14 checks passed
mergify bot pushed a commit that referenced this pull request Sep 30, 2024
* Skip merge coverage reports step

* Add debugging echo

* Soft fail instead of skip

* Soft fail instead of skip

(cherry picked from commit ed98d51)
ycombinator added a commit that referenced this pull request Oct 1, 2024
* Skip merge coverage reports step

* Add debugging echo

* Soft fail instead of skip

* Soft fail instead of skip

(cherry picked from commit ed98d51)

Co-authored-by: Shaunak Kashyap <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants