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

[JENKINS-73402] Load LogManager recorder afetr CasC loading #556

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

Dohbedoh
Copy link
Contributor

@Dohbedoh Dohbedoh commented Jul 4, 2024

Was probably introduced by #338.

Propose to load the recorders after CasC init (see https://github.com/jenkinsci/configuration-as-code-plugin/blob/1810.v9b_c30a_249a_4c/plugin/src/main/java/io/jenkins/plugins/casc/ConfigurationAsCode.java#L337).

I thought about just always targeting the reference Jenkins.get().getLog().getRecorders() from CustomHandler#publish but wonder if that would be overkill ? We go through this for every log record.. cc @jglick I wonder WDYT about this ?

Testing done

  • Start Jenkins with CasC:
jenkins:
  log:
    recorders:
    - loggers:
      - level: "ALL"
        name: "jenkins.InitReactorRunner"
      name: "reactor"
  • verify that $JENKINS_HOME/logs/custom/reactor.log exists

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@Dohbedoh Dohbedoh requested a review from a team as a code owner July 4, 2024 06:41
@Dohbedoh Dohbedoh added the bug label Jul 4, 2024
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Seems OK.

@Dohbedoh Dohbedoh added this pull request to the merge queue Jul 8, 2024
Merged via the queue into jenkinsci:master with commit 3ed77aa Jul 8, 2024
16 checks passed
@Dohbedoh Dohbedoh deleted the JENKINS-73402 branch July 8, 2024 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants