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

Add support for send-notifications in codecov-action #1436

Closed
ndmanvar opened this issue May 17, 2024 · 13 comments
Closed

Add support for send-notifications in codecov-action #1436

ndmanvar opened this issue May 17, 2024 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@ndmanvar
Copy link

Currently you need to use cli/binary to send-notifications in GitHub Action.
Codecov GitHub Action isn't setup to call/pass send-notifications to underlying cli.

Ask here would be to have functionality (and supporting docs) for an action to manually notify codecov of upload completion.

image

@thomasrockhu-codecov thomasrockhu-codecov added the enhancement New feature or request label May 28, 2024
@thomasrockhu-codecov thomasrockhu-codecov self-assigned this May 28, 2024
@ryanhiebert
Copy link

I would appreciate this. I'm trying to use OIDC, and I want to manually tell codecov when all my coverage-uploading jobs have completed, so doing all this through the action would be optimal. I'm not sure if I can use OIDC through a manually-installed CLI, and I'd rather not dig in to find out, but I'd absolutely use it if I could do it here in the action.

@ascopes
Copy link

ascopes commented Sep 21, 2024

This would be appreciated by me too, my pipelines run a number of parallel builds and aggregate coverage using codecov. Each build targets a slightly different platform where coverage varies due to platform specific code being under test.

I'd like to defer notifications for codecov until these builds have all finished to prevent my email inbox being spammed by comments that immediately get updated again as each build finishes.

@thomasrockhu-codecov
Copy link
Contributor

This has been implemented, you can specify run_command: send-notifications to do so

@ascopes
Copy link

ascopes commented Jan 25, 2025

Are there docs on how this should look?

@thomasrockhu-codecov
Copy link
Contributor

@ascopes as of yet no, but it would presumably look something like

- name: Send notifications from Codecov
  uses: codecov/codecov-action@v5
  with:
    fail_ci_if_error: true
    run_command: send-notifications
    sha: {{ the sha in question }}
    token: ${{ secrets.CODECOV_TOKEN }}
    verbose: true

@ascopes
Copy link

ascopes commented Jan 26, 2025

Thanks, will give it a go now.

ascopes added a commit to ascopes/protobuf-maven-plugin that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/protobuf-maven-plugin that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/java-compiler-testing that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/java-compiler-testing that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/java-compiler-testing that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/java-compiler-testing that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/protobuf-maven-plugin that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
ascopes added a commit to ascopes/java-compiler-testing that referenced this issue Jan 26, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
@ascopes
Copy link

ascopes commented Jan 26, 2025

Looks like this attaches coverage to the CI pipeline itself, but it doesn't notify pull requests in a comment.

Is this intentional? This would be my main use case that I'd like to support with this.

Image

Image

Image

Example 1: ascopes/protobuf-maven-plugin#535

Example 2: ascopes/java-compiler-testing#781

ascopes added a commit to ascopes/protobuf-maven-plugin that referenced this issue Jan 27, 2025
Applies the new functionality in codecov/codecov-action#1436
to be able to defer reporting coverage until the entire pipeline
has uploaded coverage reports. This reduces noise in pull request
logs.
@ascopes
Copy link

ascopes commented Jan 30, 2025

@thomasrockhu-codecov please can we re-open this?

@thomasrockhu-codecov
Copy link
Contributor

@ascopes the PR did not get a comment because you marked changes_required: true. This PR does not have any changes to coverage

@ascopes
Copy link

ascopes commented Jan 30, 2025

Will give it a try with it disabled

ascopes added a commit to ascopes/java-compiler-testing that referenced this issue Jan 30, 2025
Applies the new functionality in
codecov/codecov-action#1436 to be able to
defer reporting coverage until the entire pipeline has uploaded coverage
reports. This reduces noise in pull request logs.

---------

Signed-off-by: Ashley <[email protected]>
ascopes added a commit to ascopes/protobuf-maven-plugin that referenced this issue Jan 30, 2025
Applies the new functionality in
codecov/codecov-action#1436 to be able to
defer reporting coverage until the entire pipeline has uploaded coverage
reports. This reduces noise in pull request logs.
@thomasrockhu-codecov
Copy link
Contributor

@ascopes I saw the PR and made a quick note, I think you might actually just want after_n_builds

@ascopes
Copy link

ascopes commented Jan 30, 2025

Thanks, it is all working now, and yep, just seen that and responded. I'd considered this in the past but it then tightly couples the matrix size to the codecov config which means it is brittle since removing or adding a new JDK or Maven release into the matrix will result in the coverage configuration needing to be updated

@thomasrockhu-codecov
Copy link
Contributor

@ascopes got it, that makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants