Repository navigation
fix: use single copy of core spec from profiler - #24
Merged
colinjlacy merged 1 commit intoNov 25, 2026
Merged
colinjlacy merged 1 commit into
colinjlacy merged 1 commit into
Conversation
Consolidate the core spec into a single source of truth embedded in the linked Go profiler, and have the CLI validator read it from there. - Read core schema via extensioncheck.InstalledCoreSchema() in internal/validate - Remove duplicate -X flag for internal/validate.coreSchemaBase64 from build.go and release-package.py - Update embed guard test to assert only the profiler variable is embedded - Bump go-rc-profiler to v0.9.0 and update distribution/components.lock.yaml Closes runtimeconditions#15 Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
colinjlacy
approved these changes
Nov 25, 2026
colinjlacy
approved these changes
Nov 25, 2026
Member
Author
|
Thanks for the review and merge, @colinjlacy! Glad to have this landed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #15 by keeping a single embedded copy of the core profile schema, in the linked Go profiler, and having rc's validator read it from there.
Background
The core spec was embedded twice via
-ldflags, from the same value inscripts/build.goandscripts/release-package.py:internal/validate.coreSchemaBase64, used byrc profile validatego-rc-profiler/extensioncheck.installedCoreSchemaBase64, used by the linked Go profiler forrc profile generateFollowing the discussion in #15, runtimeconditions/go-rc-profiler#10 added
extensioncheck.InstalledCoreSchema()andextensioncheck.ErrNoInstalledCoreSchema, released in go-rc-profiler v0.9.0.Changes
internal/validate/core.go: reads the embedded schema throughextensioncheck.InstalledCoreSchema()and mapsErrNoInstalledCoreSchemato the existingerrNoCoreSchema("this build of rc has no verified core profile schema"). A decode error is returned as is.UseCoreSchemastays as the test and bring-your-own-schema hook.scripts/build.go,scripts/release-package.py: removed the-X ...internal/validate.coreSchemaBase64flag; the profiler variable is now the only embedded copy. Updated the stale comment.internal/validate/embed_test.go:TestEveryBuildEmbedsOnlyTheProfilerCoreSchemachecks that both build scripts set the profiler variable and no longer set the validator one, so the second copy can't come back.go.mod,go.sum: go-rc-profiler v0.8.0 -> v0.9.0.distribution/components.lock.yaml:goProfilerupdated to v0.9.0 (commit 324969e718e6fdaf3ebe3ca40e3beb4b735cd587, with the archive and executable SHA-256s of the v0.9.0 release assets).Closes #15