Skip to content

Code coverage report#295

Closed
carlory wants to merge 1 commit intollm-d:mainfrom
carlory:clean-002
Closed

Code coverage report#295
carlory wants to merge 1 commit intollm-d:mainfrom
carlory:clean-002

Conversation

@carlory
Copy link
Contributor

@carlory carlory commented Aug 18, 2025

Fix #287

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Collaborator

@elevran elevran left a comment

Choose a reason for hiding this comment

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

a few questions regrading usage of the action and coverage mode

make test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason we can't use a tagged release instead of a SHA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No special reason. I copied it from the project envoyproxy/ai-gateway: https://github.com/envoyproxy/ai-gateway/blob/main/.github/workflows/build_and_test.yaml#L70-L82

Makefile Outdated
test-unit: download-tokenizer download-zmq
@printf "\033[33;1m==== Running Unit Tests ====\033[0m\n"
go test -ldflags="$(LDFLAGS)" -v ./...
go test -ldflags="$(LDFLAGS)" -v -covermode=atomic -coverprofile=go-test-coverage.out ./...
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we go with and pay the runtime penalty for covermode=atomic due to concurrent code execution, might be worthwhile to also enable -race detection in tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

Copy link
Collaborator

Choose a reason for hiding this comment

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

the latest commit dropped covermode and does not enable -race.
Perhaps make them an optional coverage makefile parameter that can be set (but is empty by default)?

@Jooho
Copy link
Contributor

Jooho commented Aug 18, 2025

Hi, I was wondering about the rationale behind using an external service. What benefits would it bring? Since we already have the coverage file from go test, it seems possible to use tools like go tool cover—so I’m curious about which specific features we’re looking to leverage through CodeDev.

@elevran
Copy link
Collaborator

elevran commented Oct 20, 2025

@carlory are you still actively working on this? Let us know if you're still able/interested in pursuing this further.
It has been without progress for over a month.
P.S. if you follow up, please also rebase.

@carlory
Copy link
Contributor Author

carlory commented Oct 21, 2025

@elevran Sorry for the delay. I forgot to update this PR. I create a demo project in my account and try to add some changes to verify the codecov behavior because I'm not familiar with the codecov behavior.

It seems that the repo/organization owner needs to configure this project in the codecov dashboard before this workflow can work. I'm unsure whether we want to use codecov in our project. If yes, I will update this PR after I check it on my demo project.

@carlory
Copy link
Contributor Author

carlory commented Oct 21, 2025

Hi, I was wondering about the rationale behind using an external service. What benefits would it bring? Since we already have the coverage file from go test, it seems possible to use tools like go tool cover—so I’m curious about which specific features we’re looking to leverage through CodeDev.

@Jooho FYI:

image

@elevran
Copy link
Collaborator

elevran commented Oct 22, 2025

@carlory happy to see you're still interested and will work on the PR.

Regarding the use of an external service such (as codecov), let me think about this a bit.
The other option is to integrate this via a GitHub action. Seems go-coverage-report GitHub Action can automatically detect and report coverage changes in Go pull requests. It posts a detailed comment to the PR including which lines and files are newly uncovered in the PR compared to the base branch.
That might be more self contained solution.

@elevran elevran moved this from In review to In progress in llm-d-inference-scheduler Oct 22, 2025
@carlory carlory force-pushed the clean-002 branch 2 times, most recently from 3cc5a40 to a79f79b Compare October 23, 2025 06:40
@elevran
Copy link
Collaborator

elevran commented Oct 24, 2025

@carlory please resolve conflict

@elevran
Copy link
Collaborator

elevran commented Oct 25, 2025

There seems to be an issue with the upload configuration (copied from failing job):

Run actions/upload-artifact@v4
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

@carlory
Copy link
Contributor Author

carlory commented Oct 27, 2025

@elevran fixed. When I was resolving a conflict, the same result file was uploaded twice.

@elevran
Copy link
Collaborator

elevran commented Oct 27, 2025

CICD job fails with:

  Error: No successful run found on the target branch
  Error: Process completed with exit code 1.

Perhaps need to include a baseline coverage from main into this PR or allow the case of missing coverage?

@carlory carlory changed the title Add test coverage to test-unit Makefile target Code coverage report Oct 28, 2025
@carlory carlory marked this pull request as draft October 28, 2025 02:54
@carlory
Copy link
Contributor Author

carlory commented Oct 28, 2025

Hi @elevran, we need to merge #391 first to upload a test result

@elevran
Copy link
Collaborator

elevran commented Oct 29, 2025

#391 has been approved but needs rebase to merge

Signed-off-by: carlory <baofa.fan@daocloud.io>
@carlory carlory marked this pull request as ready for review October 31, 2025 02:40
@shmuelk
Copy link
Collaborator

shmuelk commented Nov 2, 2025

@elevran said:

Regarding the use of an external service such (as codecov), let me think about this a bit.
The other option is to integrate this via a GitHub action. Seems go-coverage-report GitHub Action can automatically detect and report coverage changes in Go pull requests. It posts a detailed comment to the PR including which lines and files are newly uncovered in the PR compared to the base branch.
That might be more self contained solution.

Looking at the go-coverage-report GitHub Action, the documentation there says:

Support for forks is limited since the necessary GITHUB_TOKEN permissions don't allow to post comments to the pull request of the base repository (see fgrosse/go-coverage-report#15). If forks are important for you, this action might not be the best solution.

I think that applies to us.

@elevran
Copy link
Collaborator

elevran commented Nov 2, 2025

I see, thanks for checking.

@carlory
Copy link
Contributor Author

carlory commented Nov 6, 2025

If forks are important for you, this action might not be the best solution.

Hi @elevran should I close this PR and revert the merge commit?

@elevran
Copy link
Collaborator

elevran commented Nov 6, 2025

@carlory - yes please, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add test coverage to test-unit Makefile target

5 participants