Skip to content

fix(version): use original version string instead of re-formatted date for lookup - #9705

Open
AruneshDwivedi wants to merge 2 commits into
updatecli:mainfrom
AruneshDwivedi:fix/time-search-version-lookup
Open

fix(version): use original version string instead of re-formatted date for lookup#9705
AruneshDwivedi wants to merge 2 commits into
updatecli:mainfrom
AruneshDwivedi:fix/time-search-version-lookup

Conversation

@AruneshDwivedi

Copy link
Copy Markdown
Contributor

Search formats parsed time values back to strings using the layout, then uses those formatted strings as map keys into rawversions. The map is keyed by the original version strings, so after formatting loses precision or changes format, the lookup silently returns an empty string.

Track the original version string alongside each parsed time during Init, so Search can look up the correct key in rawversions.

…e for lookup

Search formats the parsed time back to a string using the layout, then
uses that as a map key into rawversions. The map keys are the original
version strings which may not round-trip through Parse+Format (e.g.
layout truncation loses microsecond precision or original formatting).

Track the original version alongside each parsed time so the correct
key is used for the map lookup.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@olblak

olblak commented Jul 24, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution, could I ask you to follow the pulln request template and explain how to reproduce this issue with a release Updatecli manifest? It's meant to help me review the change without spending too much time on each pr because now I quite often receive code contribution generated by AI that do not always make sense.
Especially that here it doesn't contains test

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

Successfully merging this pull request may close these issues.

2 participants