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

Change in dependency visibility in a patch change #1219

Closed
jack-berg opened this issue Dec 3, 2024 · 3 comments
Closed

Change in dependency visibility in a patch change #1219

jack-berg opened this issue Dec 3, 2024 · 3 comments
Assignees

Comments

@jack-berg
Copy link

Transitive dependencies and their scope changed in a patch release. Was this intentional?

prometheus-metrics-exporter-common-1.3.3.pom included:

<dependencies>
  <dependency>
    <groupId>io.prometheus</groupId>
    <artifactId>prometheus-metrics-model</artifactId>
    <version>${project.version}</version>
  </dependency>
  <dependency>
    <groupId>io.prometheus</groupId>
    <artifactId>prometheus-metrics-exposition-formats</artifactId>
    <version>${project.version}</version>
  </dependency>
</dependencies>

/prometheus-metrics-exporter-common-1.3.4.pom included:

<dependencies>
  <dependency>
    <groupId>io.prometheus</groupId>
    <artifactId>prometheus-metrics-model</artifactId>
    <version>${project.version}</version>
  </dependency>
  <dependency>
    <groupId>io.prometheus</groupId>
    <artifactId>prometheus-metrics-exposition-textformats</artifactId>
    <version>${project.version}</version>
  </dependency>
  <dependency>
    <groupId>io.prometheus</groupId>
    <artifactId>prometheus-metrics-exposition-formats</artifactId>
    <version>${project.version}</version>
    <scope>runtime</scope>
  </dependency>
</dependencies>

Changes:

  • prometheus-metrics-exposition-formats was reduced to scope runtime.
  • prometheus-metrics-exposition-textformats was added

This required me to intervene when updating. Not a big deal, but wanted to let you all know in case you have a policy to avoid this type of thing.

@zeitlinger
Copy link
Member

zeitlinger commented Dec 3, 2024

Thanks for the feedback!

Yes, this was intentional - the make Protobuf optional part of https://github.com/prometheus/client_java/releases/tag/v1.3.4

We want to avoid breaking changes whenever possible, but there's no automated check for this.
Can you point out what you had to change?

@zeitlinger zeitlinger self-assigned this Dec 3, 2024
@jack-berg
Copy link
Author

We had a test that was inadvertently using the prometheus-metrics-exposition-formats transitive dependency. This broke when the scope was reduced to runtime until, and was fixed by addingprometheus-metrics-exposition-formats as a dependency.

https://github.com/open-telemetry/opentelemetry-java/pull/6907/files

@zeitlinger
Copy link
Member

Thanks for feedback - I think I'm OK with keeping it the way it is.

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

No branches or pull requests

2 participants