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

Initialize logger and create root context in main.go #6771

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

inteon
Copy link
Member

@inteon inteon commented Feb 19, 2024

  • initialize logger and context in the main.go files
  • pass loggers via context
  • set controller-runtime logger if required
  • use cobra context to pass context

Kind

/kind cleanup

Release Note

NONE

@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/acme Indicates a PR directly modifies the ACME Issuer code dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. area/testing Issues relating to testing size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 19, 2024
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 19, 2024
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 20, 2024
wallrj
wallrj previously requested changes Feb 20, 2024
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

@inteon wrote:

Correctly initialize loggers, create contexts and pass contexts

The title says "correctly", does that mean that the current code is incorrect and that this PR fixes a bug?
If so, explain what bug is being fixed. Is it that the acme process, which was being launched with cmd.Execute, was not terminated by the original signal handling.

cmd/acmesolver/app/app.go Show resolved Hide resolved
cmd/acmesolver/main.go Show resolved Hide resolved
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 21, 2024
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 21, 2024
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 7, 2024
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2024
@inteon
Copy link
Member Author

inteon commented Mar 8, 2024

/retest

@inteon inteon changed the title Correctly initialize loggers, create contexts and pass contexts Initialize logger and create root context in main.go Mar 11, 2024
@inteon
Copy link
Member Author

inteon commented Mar 11, 2024

@wallrj I moved the bugfix to a seperate PR: #6779

This PR now only contains a refactor of the logging initialisation and context passing.

@ThatsMrTalbot
Copy link
Contributor

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2024
@inteon
Copy link
Member Author

inteon commented Mar 11, 2024

/approve

@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: inteon

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2024
@jetstack-bot jetstack-bot merged commit b9bbbf5 into cert-manager:master Mar 11, 2024
8 checks passed
@inteon inteon deleted the fix_loggers_and_contexts branch March 11, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/acme Indicates a PR directly modifies the ACME Issuer code area/testing Issues relating to testing dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants