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

Use otel.metric.export.interval instead of the no longer used otel.imr.export.interval #1021

Merged
merged 3 commits into from
Jan 14, 2025

Conversation

cyrille-leclerc
Copy link
Contributor

Use otel.metric.export.interval instead of the no longer used otel.imr.export.interval + replace static config entries by the usage of the generic properties text field

Fix for:

Testing done

Rely on existing CI tests + manual end to end test

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

….imr.export.interval` + replace static config entries by the usage of the generic properties text field
@cyrille-leclerc cyrille-leclerc added the bug Something isn't working label Jan 14, 2025
kuisathaverat
kuisathaverat previously approved these changes Jan 14, 2025
….imr.export.interval` + replace static config entries by the usage of the generic properties text field
….imr.export.interval` + replace static config entries by the usage of the generic properties text field
@cyrille-leclerc cyrille-leclerc merged commit 23e541c into main Jan 14, 2025
17 checks passed
@cyrille-leclerc cyrille-leclerc deleted the rely-on-config-properties branch January 14, 2025 18:27
@jonesbusy
Copy link

Hey!

Adding deprecated annotation cause JCasC configuration to fail and jenkins to not start

jenkins  |      at java.base/java.lang.Thread.run(Unknown Source)
jenkins  | Caused by: io.jenkins.plugins.casc.ConfiguratorException: 'exporterTimeoutMillis' is deprecated
jenkins  |      at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:330)
jenkins  |      at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:293)

Would be nice to include a "breaking" on the release notes.

Thanks!

@cyrille-leclerc
Copy link
Contributor Author

Sorry Jones for the pain.
@kuisathaverat I think we want the configs to continue to work with a deprecation message rather than breaking (isn't it what "deprecation" should be :-) ) so I'm inclined to ship a fix that makes configAsCode work again when using exporterTimeoutMillis or exporterIntervalMillis
@kuisathaverat is it right to say hat the fix is mostly to remove the @Deprecated annotation on the fields:

https://github.com/jenkinsci/opentelemetry-plugin/blob/3.1480.v23e541c0fcb_4/src/main/java/io/jenkins/plugins/opentelemetry/JenkinsOpenTelemetryPluginConfiguration.java#L124-L128

Adding a warning message would be a nice to have.

@kuisathaverat
Copy link
Contributor

I have updated the release notes https://github.com/jenkinsci/opentelemetry-plugin/releases/tag/3.1480.v23e541c0fcb_4

Thinking about this, if the change in the configuration does not break the Jeknis start process and only shows the error messages in the logs, I would say that it is fine as it is. If it breaks the Jenkins start, we should remove the annotation and leave a few versions a note in the release notes about the breaking change, then, after a few months, we can add the @deprecate or directly remove the field. It is how I proceeded with other plugins. WDYT?

cc @cyrille-leclerc @jonesbusy

@jonesbusy
Copy link

No problem for me as long it's on the release note. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants