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

Refine logging in pkg/dashboard/apiserver/auth/gcp #3527

Conversation

yoonian
Copy link
Contributor

@yoonian yoonian commented Aug 4, 2022

What problem does this PR solve?

Close #2873

What's changed and how it works?

Moving package level variable log into struct Service as a field

Related changes

  • Need to update chaos-mesh/website
  • Need to update Dashboard UI
  • Need to cheery-pick to release branches
    • release-2.3
    • release-2.2
    • release-2.1

Checklist

CHANGELOG

  • I have updated the CHANGELOG.md
  • I have labeled this PR with "no-need-update-changelog"

Tests

  • Unit test
  • E2E test
  • No code
  • Manual test (add steps below)

Side effects

  • Breaking backward compatibility

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Aug 4, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Andrewmatilde
  • xlgao-zju

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot
Copy link
Member

Welcome @yoonian!

It looks like this is your first PR to chaos-mesh/chaos-mesh 🎉.

I'm the bot to help you request reviewers, add labels and more, See available commands.

We want to make sure your contribution gets all the attention it needs!



Thank you, and welcome to chaos-mesh/chaos-mesh. 😃

@ti-chi-bot
Copy link
Member

@yoonian: The label(s) no-need-update-changelog cannot be applied. These labels are supported: bugbash, contribution, DNM, Hacktoberfest, dependencies, documentation, duplicate, good first issue, invalid, need-more-info, needs-cherry-pick-0.8, needs-cherry-pick-0.9, needs-cherry-pick-1.0, needs-cherry-pick-1.1, needs-cherry-pick-1.2, needs-cherry-pick-2.0, needs-cherry-pick-2.1, needs-cherry-pick-2.2, needs-cherry-pick-2.3, require-LGT3.

In response to this:

/label no-need-update-changelog

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

1 similar comment
@ti-chi-bot
Copy link
Member

@yoonian: The label(s) no-need-update-changelog cannot be applied. These labels are supported: bugbash, contribution, DNM, Hacktoberfest, dependencies, documentation, duplicate, good first issue, invalid, need-more-info, needs-cherry-pick-0.8, needs-cherry-pick-0.9, needs-cherry-pick-1.0, needs-cherry-pick-1.1, needs-cherry-pick-1.2, needs-cherry-pick-2.0, needs-cherry-pick-2.1, needs-cherry-pick-2.2, needs-cherry-pick-2.3, require-LGT3.

In response to this:

/label no-need-update-changelog

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@yoonian yoonian force-pushed the refine-logging-in-pkg/dashboard/apiserver/auth/gcp branch from 80f13ab to 47459da Compare August 4, 2022 13:25
Copy link
Member

@STRRL STRRL left a comment

Choose a reason for hiding this comment

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

rest LGTM

Comment on lines 24 to 27
func Bootstrap(conf *config.ChaosDashboardConfig, logger logr.Logger) *Service {
service, _ := NewService(conf, logger.WithName("gcp auth api"))
return service
}
Copy link
Member

Choose a reason for hiding this comment

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

please do not ignore that error returned by NewService. After that, Bootstrap do not do extra things other than NewService, please use NewService with fx directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I'll apply.

) (*Service, error) {
rootUrl, err := url.Parse(conf.RootUrl)
if err != nil {
logger.Error(err, "fail to parse rootUrl")
Copy link
Member

Choose a reason for hiding this comment

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

as we have returned the error, do not log it again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay!

@codecov
Copy link

codecov bot commented Aug 7, 2022

Codecov Report

Merging #3527 (e3234e8) into master (8358017) will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3527      +/-   ##
==========================================
+ Coverage   40.12%   40.18%   +0.06%     
==========================================
  Files         166      166              
  Lines       14187    14187              
==========================================
+ Hits         5692     5701       +9     
+ Misses       8062     8055       -7     
+ Partials      433      431       -2     
Impacted Files Coverage Δ
pkg/workflow/controllers/utils.go 86.04% <0.00%> (-1.56%) ⬇️
pkg/workflow/controllers/chaos_node_reconciler.go 61.31% <0.00%> (+3.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8358017...e3234e8. Read the comment docs.

@yoonian yoonian force-pushed the refine-logging-in-pkg/dashboard/apiserver/auth/gcp branch from ca888bc to e1aaf36 Compare August 7, 2022 04:15
@ti-chi-bot ti-chi-bot added size/S and removed size/M labels Aug 7, 2022
@yoonian yoonian requested a review from STRRL August 9, 2022 16:03
Copy link
Member

@Andrewmatilde Andrewmatilde left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@xlgao-zju xlgao-zju left a comment

Choose a reason for hiding this comment

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

LGTM

@xlgao-zju
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 7ffe4d6

@yoonian yoonian force-pushed the refine-logging-in-pkg/dashboard/apiserver/auth/gcp branch from 5bdaa4f to 7ffe4d6 Compare August 18, 2022 08:57
@yoonian yoonian force-pushed the refine-logging-in-pkg/dashboard/apiserver/auth/gcp branch from 2430b73 to 5543d9d Compare August 19, 2022 00:19
@Andrewmatilde
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 5543d9d

@ti-chi-bot
Copy link
Member

@yoonian: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Signed-off-by: Yoon PyungHo <learder@gmail.com>
@yoonian yoonian force-pushed the refine-logging-in-pkg/dashboard/apiserver/auth/gcp branch from 46bdcde to b709220 Compare August 19, 2022 10:07
@Andrewmatilde
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: e3234e8

@ti-chi-bot ti-chi-bot merged commit cbead3e into chaos-mesh:master Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants