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

Exclude the coverage files from the annotate step #5773

Merged
merged 8 commits into from
Oct 15, 2024

Conversation

alexsapran
Copy link
Contributor

@alexsapran alexsapran commented Oct 14, 2024

What does this PR do?

We noticed that the JUnit annotate step needed to take more time. This PR addresses that issue by not requiring it to parse the coverage files.

The generated coverage XML file was meant to be used in Jenkins to show the coverage report stats. The generated XML files were large, resulting in a problem with BK's JUnit annotate plugin.

Given that we don't operate any Jenkins instance, this PR removes the code that generated the XML coverage reports.
Now, coverage is reported only to Sonar.

Why is it important?

Reduce the time of CI step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
This is something that was introduced with
elastic#377 and was meant to be
used with Jenkins to show coverage report.

Now with Jenkins been replace and BK + Sonar enabled on the repo, there
is no need to create such artifacts anymore.

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
@alexsapran alexsapran requested a review from a team as a code owner October 14, 2024 11:23
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Copy link
Contributor

@rowlandgeoff rowlandgeoff left a comment

Choose a reason for hiding this comment

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

From 90min to 39sec on the annotate step, I'd say that fixes it. :) Thanks!

I had to look at the individual commit history to understand why this was the fix. You might want to update the PR description to keep the history easier to understand.

@alexsapran
Copy link
Contributor Author

The problem was that the annotation plugin was reading the coverage files, which are converted to XML format with the help of the gocover-cobertura go package.

That was needed back when we combined Jenkins with some Jenkins plugins. We could keep creating that XML file, but we don't use it anymore, thus I removed it.
For now I am waiting for the full CI to finish. Also the PR is not yet ready, as I think I found another minor issue.

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Oct 15, 2024
@elasticmachine
Copy link
Contributor

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

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
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

Copy link
Contributor

@rowlandgeoff rowlandgeoff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@alexsapran alexsapran enabled auto-merge (squash) October 15, 2024 13:58
@alexsapran alexsapran merged commit 8ebaa7d into elastic:main Oct 15, 2024
14 checks passed
@pazone pazone added backport-8.x Automated backport to the 8.x branch with mergify and removed backport-skip labels Dec 12, 2024
mergify bot pushed a commit that referenced this pull request Dec 12, 2024
* Exclude the coverage files from the annotate step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
(cherry picked from commit 8ebaa7d)
pazone pushed a commit that referenced this pull request Dec 13, 2024
* Exclude the coverage files from the annotate step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
(cherry picked from commit 8ebaa7d)

Co-authored-by: Alexandros Sapranidis <alexandros@elastic.co>
@pazone pazone added backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify labels Dec 13, 2024
mergify bot pushed a commit that referenced this pull request Dec 13, 2024
* Exclude the coverage files from the annotate step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
(cherry picked from commit 8ebaa7d)
mergify bot pushed a commit that referenced this pull request Dec 13, 2024
* Exclude the coverage files from the annotate step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
(cherry picked from commit 8ebaa7d)
jlind23 pushed a commit that referenced this pull request Dec 30, 2024
* Exclude the coverage files from the annotate step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
(cherry picked from commit 8ebaa7d)

Co-authored-by: Alexandros Sapranidis <alexandros@elastic.co>
jlind23 added a commit that referenced this pull request Dec 30, 2024
* Exclude the coverage files from the annotate step

Signed-off-by: Alexandros Sapranidis <alexandros@elastic.co>
(cherry picked from commit 8ebaa7d)

Co-authored-by: Alexandros Sapranidis <alexandros@elastic.co>
Co-authored-by: Julien Lind <julien.lind@elastic.co>
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 backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify ci skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team Team:Ingest-EngProd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants