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 jobid to logger #19000

Closed
wants to merge 1 commit into from
Closed

Conversation

lengrongfu
Copy link
Contributor

@lengrongfu lengrongfu commented Jul 25, 2023

Thank you for contributing to Harbor!

Comprehensive Summary of your change

background:
When I view the gc job log from the ui, because my log has a lot of content, the loading is very slow, and I cannot view it in real time; therefore, I want to enter the jobserver pod to view the gc job log, but the log file is named after the job_id. I can't get job_id from ui.

solution:
In order to solve the problem of viewing the gc job, I think that the job_id can be output to the log file, so that the job_id can be viewed from the ui.

Issue being fixed

Fixes #(issue) #18999

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #19000 (c1ed836) into main (c25a7ca) will increase coverage by 0.03%.
Report is 12 commits behind head on main.
The diff coverage is 80.00%.

❗ Current head c1ed836 differs from pull request most recent head c5b29ed. Consider uploading reports for the commit c5b29ed to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #19000      +/-   ##
==========================================
+ Coverage   67.40%   67.43%   +0.03%     
==========================================
  Files         992      992              
  Lines      108725   108741      +16     
  Branches     2747     2747              
==========================================
+ Hits        73286    73334      +48     
+ Misses      31507    31473      -34     
- Partials     3932     3934       +2     
Flag Coverage Δ
unittests 67.43% <80.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/jobservice/job/impl/sample/job.go 8.33% <0.00%> (ø)
src/server/middleware/contenttrust/contentrust.go 80.00% <50.00%> (-1.14%) ⬇️
src/jobservice/job/impl/gc/garbage_collection.go 46.60% <100.00%> (+0.10%) ⬆️
src/jobservice/job/impl/notification/slack_job.go 72.41% <100.00%> (+0.32%) ⬆️
...rc/jobservice/job/impl/notification/webhook_job.go 78.57% <100.00%> (+0.31%) ⬆️
src/jobservice/job/impl/purge/purge.go 58.90% <100.00%> (+0.57%) ⬆️
src/jobservice/job/impl/replication/replication.go 50.61% <100.00%> (+1.25%) ⬆️
...ervice/job/impl/scandataexport/scan_data_export.go 61.60% <100.00%> (+0.30%) ⬆️
src/jobservice/job/impl/systemartifact/cleanup.go 87.50% <100.00%> (+0.54%) ⬆️
src/pkg/p2p/preheat/job.go 49.40% <100.00%> (+0.60%) ⬆️
... and 2 more

... and 10 files with indirect coverage changes

@lengrongfu lengrongfu force-pushed the feat/add-jobid-gclog branch 2 times, most recently from 52c96e1 to af68ca5 Compare July 26, 2023 08:45
@lengrongfu
Copy link
Contributor Author

/label release-note/enhancement

Append the signer name to the error message which will be returned by the client

Signed-off-by: wang yan <wangyan@vmware.com>
Signed-off-by: lengrongfu <1275177125@qq.com>
@lengrongfu
Copy link
Contributor Author

commit error 😓 , close current pr.

@lengrongfu lengrongfu closed this Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/update Update or Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants