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

test failure for clean checkout #777

Closed
brharrington opened this issue Nov 15, 2019 · 1 comment
Closed

test failure for clean checkout #777

brharrington opened this issue Nov 15, 2019 · 1 comment
Labels
Milestone

Comments

@brharrington
Copy link
Contributor

There is a test failure for a clean clone on spectator-nflx for AutoPluginTest. The error is:

com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: com/netflix/spectator/impl/Cache
  at com.netflix.spectator.atlas.AtlasRegistry.<init>(AtlasRegistry.java:116)
  at com.netflix.spectator.atlas.AtlasRegistry.class(AtlasRegistry.java:110)
  while locating com.netflix.spectator.atlas.AtlasRegistry
  at com.netflix.spectator.nflx.SpectatorModule.configure(SpectatorModule.java:91) (via modules: com.netflix.spectator.nflx.governator.AutoPlugin -> com.netflix.spectator.nflx.SpectatorModule)
  while locating com.netflix.spectator.api.Registry annotated with @com.google.inject.multibindings.OptionalBinder$Default
Caused by: java.lang.NoClassDefFoundError: com/netflix/spectator/impl/Cache
	at com.netflix.spectator.atlas.impl.QueryIndex.<init>(QueryIndex.java:89)
	at com.netflix.spectator.atlas.impl.QueryIndex.newInstance(QueryIndex.java:41)
	at com.netflix.spectator.atlas.impl.Evaluator.<init>(Evaluator.java:64)

The problem is that gradle is resolving it to an older dependency. If the tags are present in the local repo, then the snapshot will have a newer version and the local project will win and get used. Otherwise an older version will get used that maybe incompatible:

> Task :spectator-nflx:dependencyInsight
com.netflix.spectator:spectator-api:0.88.0
   variant "runtime" [
      org.gradle.status          = release (not requested)
      org.gradle.usage           = java-runtime (not requested)
      org.gradle.libraryelements = jar (not requested)
      org.gradle.category        = library (not requested)
   ]
   Selection reasons:
      - By conflict resolution : between versions 0.1.0-SNAPSHOT and 0.88.0

project :spectator-api -> com.netflix.spectator:spectator-api:0.88.0
+--- project :spectator-nflx-plugin
|    \--- runtime
+--- project :spectator-ext-gc
|    \--- project :spectator-nflx-plugin (*)
+--- project :spectator-ext-jvm
|    \--- project :spectator-nflx-plugin (*)
+--- project :spectator-ext-ipc
|    \--- project :spectator-reg-atlas
|         \--- project :spectator-nflx-plugin (*)
\--- project :spectator-reg-atlas (*)

com.netflix.spectator:spectator-api:0.88.0
\--- com.netflix.servo:servo-core:0.12.28
     \--- project :spectator-nflx-plugin (requested com.netflix.servo:servo-core)
          \--- runtime

(*) - dependencies omitted (listed previously)
@brharrington brharrington added this to the 1.0.0 milestone Nov 15, 2019
@brharrington
Copy link
Contributor Author

The problem is the git tags used for the version were missing. For now user should be sure to do a fetch so that tags are available. Not sure of a good workaround right now, will revisit if it becomes a bigger issue.

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

No branches or pull requests

1 participant