-
Notifications
You must be signed in to change notification settings - Fork 16
Add a Reference
wrapper type to ociref.Reference
to handle our "Docker references" logic more cleanly
#32
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
Conversation
Poor man's codecov.io: -.../registry/ref.go:18: ParseRefNormalized 87.5%
+.../registry/ref.go:16: ParseRef 83.3%
+.../registry/ref.go:32: Normalize 100.0%
+.../registry/ref.go:45: String 100.0%
+.../registry/ref.go:54: MarshalText 0.0%
+.../registry/ref.go:59: UnmarshalText 0.0%
-.../registry/synthesize-index.go:17: SynthesizeIndex 74.1%
+.../registry/synthesize-index.go:16: SynthesizeIndex 74.1%
-.../registry/synthesize-index.go:141: setRefAnnotation 100.0%
+.../registry/synthesize-index.go:140: setRefAnnotation 100.0%
-.../registry/synthesize-index.go:151: normalizeManifestPlatform 84.6%
+.../registry/synthesize-index.go:150: normalizeManifestPlatform 84.6%
-total: (statements) 74.3%
+total: (statements) 73.7% (I think the poor scores on Edit: that came from comparing https://github.com/docker-library/meta-scripts/actions/runs/8366831295/job/22907876286#step:5:354 to https://github.com/docker-library/meta-scripts/actions/runs/8382268246/job/22955713965?pr=32#step:5:354, caveman style |
Ok, something is definitely wrong with these - they really aren't being invoked, and I'm not actually sure why! 😭 |
…ocker references" logic more cleanly This also allows us to add explicit JSON round-tripping which can handle normalizing/denormalizing for us, so our output strings no longer contain `docker.io/[library/]`. 🎉
Ok, managed to find both why it wasn't getting invoked when I thought it should be and updated my test to test it explicitly. 🤘 |
Much better: @@ -16,12 +16,16 @@
.../registry/cache.go:92: GetBlob 100.0%
.../registry/cache.go:96: GetManifest 100.0%
.../registry/cache.go:100: GetTag 69.6%
-.../registry/client.go:17: Client 53.1%
+.../registry/client.go:17: Client 55.1%
-.../registry/client.go:135: EntryForRegistry 72.7%
+.../registry/client.go:135: EntryForRegistry 81.8%
.../registry/rate-limits.go:23: Do 50.0%
.../registry/read-helpers.go:15: readJSONHelper 60.9%
-.../registry/ref.go:18: ParseRefNormalized 87.5%
+.../registry/ref.go:16: ParseRef 83.3%
+.../registry/ref.go:32: Normalize 100.0%
+.../registry/ref.go:45: String 100.0%
+.../registry/ref.go:54: MarshalText 100.0%
+.../registry/ref.go:59: UnmarshalText 100.0%
-.../registry/synthesize-index.go:17: SynthesizeIndex 74.1%
+.../registry/synthesize-index.go:16: SynthesizeIndex 77.6%
-.../registry/synthesize-index.go:141: setRefAnnotation 100.0%
+.../registry/synthesize-index.go:140: setRefAnnotation 100.0%
-.../registry/synthesize-index.go:151: normalizeManifestPlatform 84.6%
+.../registry/synthesize-index.go:150: normalizeManifestPlatform 84.6%
-total: (statements) 74.3%
+total: (statements) 75.6% (I don't know for sure why |
I just figured out meta-scripts/registry/client.go Lines 140 to 144 in 1456103
Because our iteration order is random, sometimes we get coverage on this first Thanks Gobama!! Edit: fix in #36 |
This also allows us to add explicit JSON round-tripping which can handle normalizing/denormalizing for us, so our output strings no longer contain
docker.io/[library/]
. 🎉