GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — fix: hash the full source spec for the cache key by gangadhar-res · Pull Request #9970 · updatecli/updatecli Conversation
Contributor
WhatThe source cache key ( Why
This implements option 2 from the issue discussion: the cache key gets its own complete input, Notes:
Testing
Fixes #9849
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
The source cache key hashed resource.ReportConfig(), which exists to
redact resource configuration for reports and predates the cache.
Eleven plugins omit result-affecting spec fields from ReportConfig
(e.g. shell omits workdir, yaml omits documentindex), so two distinct
sources could silently share a cache entry and the second one received
the first one's value.
Hash the full user-provided spec from ResourceConfig instead, keeping
ReportConfig for its original reporting purpose. Secret-bearing fields
are safe to include since only the SHA256 digest is ever stored or
logged, and the encoding stays deterministic: yaml.v3 decodes specs
into map[string]interface{} and encoding/json sorts map keys. The
resource is still instantiated first so unknown kinds or malformed
specs keep returning the empty-key cache-miss sentinel.
Regression tests cover two shell sources differing only in workdir
(a field ReportConfig omits) both as typed specs and as YAML-decoded
map specs, plus identical specs still sharing a key.
Fixes updatecli#9849
Signed-off-by: Gangadhar Chalapaka <[email protected]>
Contributor
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
olblak
reviewed
Uh oh!
There was an error while loading. Please reload this page.
olblak
reviewed
Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Source cache key is incomplete for 11 plugins whose ReportConfig omits result-affecting spec fieldsUh oh!
There was an error while loading. Please reload this page. 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. | |||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |