Skip to content

issue8827: When initializing or creating an Azure repository, adjust the log output to JSON format #8864

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

Closed
wants to merge 10 commits into from

Conversation

hu-keyu
Copy link
Contributor

@hu-keyu hu-keyu commented Apr 14, 2025

Thank you for contributing to Velero!

Please add a summary of your change

When initializing or creating an Azure repository, adjust the log output to JSON format.

Does your change fix a particular issue?

Fixes #8827

Please indicate you've done the following:

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 59.56%. Comparing base (0dbff6d) to head (5cb77c2).

Files with missing lines Patch % Lines
...po/kopialib/backend/azure/azure_storage_wrapper.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8864   +/-   ##
=======================================
  Coverage   59.56%   59.56%           
=======================================
  Files         370      371    +1     
  Lines       40246    40248    +2     
=======================================
+ Hits        23973    23975    +2     
  Misses      14773    14773           
  Partials     1500     1500           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

might need rebase? unrelated commits in PR

@hu-keyu
Copy link
Contributor Author

hu-keyu commented Apr 15, 2025

might need rebase? unrelated commits in PR

Already rebased, please review again

@hu-keyu hu-keyu requested a review from kaovilai April 15, 2025 01:59
@@ -56,7 +55,7 @@ func (s *Storage) ConnectionInfo() blob.ConnectionInfo {
func NewStorage(ctx context.Context, option *Option, isCreate bool) (blob.Storage, error) {
cfg := option.Config

client, _, err := azureutil.NewStorageClient(logrus.New(), cfg)
client, _, err := azureutil.NewStorageClient(newLogger(), cfg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Try to reuse the existing functions in util/logging, e.g., this newLogger function looks very close to the existing DefaultLogger

@kaovilai
Copy link
Collaborator

@hu-keyu
Copy link
Contributor Author

hu-keyu commented Apr 16, 2025

@hu-keyu I meant following two commits.. are they modified from main? why?

E2E support sets the --item-block-worker-count. ([https://github.com//pull/8836) blackpiglethu-keyu blackpiglet authored and hu-keyu committed 2 days ago issue 8847: inherit pod info from node-agent-windows Lyndon-Lihu-keyu Lyndon-Li authored and hu-keyu committed 2 days ago

This PR did not modify them. It may be that there is a problem with the local branch synchronizing the remote branch, but the remote branch has been rebased and is not included now.

@kaovilai
Copy link
Collaborator

It's still visible in main...hu-keyu:velero:fix/8827. If we squash when we merge it won't matter.

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

Successfully merging this pull request may close these issues.

Log output during BackupRepository creation of Azure repository is in plaintext with --log-format=json
4 participants