10BC0 fix: Align cache configstore with framework implementation by softho0n · Pull Request #9282 · tektoncd/pipeline · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@softho0n
Copy link
@softho0n softho0n commented Jan 7, 2026

Remove the custom Config struct and NewConfigFromConfigMap function in the resolver cache package. Instead, use the standard map[string]string pattern and DataFromConfigMap from the resolution framework.

This aligns the cache configuration handling with other Tekton resolvers for better consistency and maintainability.

Fixes #9275

Changes

  • Remove the custom Config struct in configstore
  • Replaced the custom NewConfigFromConfigMap with the framework's standard DataFromConfigMap
  • Updated onCacheConfigChanged to handle parsing logic directly from map[string]string.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jan 7, 2026
@linux-foundation-easycla
Copy link
linux-foundation-easycla bot commented Jan 7, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 7, 2026
@softho0n
Copy link
Author
softho0n commented Jan 7, 2026

/kind fix

@tekton-robot
Copy link
Collaborator

@softho0n: The label(s) kind/fix cannot be applied, because the repository doesn't have them.

Details

In response to this:

/kind fix

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@waveywaves waveywaves added the kind/bug Categorizes issue or PR as related to a bug. label Jan 7, 2026
@waveywaves
Copy link
Member

@softho0n, thank you for the contribution ! Can you rebase the PR with the main branch and push again ?

@softho0n
Copy link
Author
softho0n commented Jan 7, 2026

Yes! Of course. I will do it soon.

@waveywaves
Copy link
Member
waveywaves commented Jan 7, 2026

@softho0n looks like tide is running now and isn't complaining about rebase anymore.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: waveywaves

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2026
@softho0n
Copy link
Author
softho0n commented Jan 7, 2026

@waveywaves Thank you!

@softho0n
Copy link
Author
softho0n commented Jan 8, 2026

Hi @waveywaves! I have a simple question. So, now, Is it right that I don't have to rebase?

@softho0n
Copy link
Author
softho0n commented Jan 9, 2026

Oh! I think I need the lgtm label. 🤔 If you don't mind, can I ask you?

@waveywaves
Copy link
Member
waveywaves commented Jan 9, 2026

@softho0n I spoke to @twoGiants about this PR and would like to relay one question he wanted to ask i.e. have you run this locally and checked if the configuration is picked up on changes to the configmap ?

Copy link
Member
@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @softho0n ! Great job on this one 😸 👍

Could you do two more things and then we're good?:

  1. Bring the unit tests together. I think you can now have one TestOnCacheConfigMapChanged which covers all the cases.
  2. Remove the release note => set to NONE. It's not a user facing change.

We would really need to test this manually too (as I discussed with @waveywaves ), but now that the annotation propagation is not implemented yet (only in my branch), you can't manually test it easily. You would have to look through the resolver logs and count cache hits and cache misses before and after you change the values in the caching config map. Wdys? Could you do that too or is it to much?

Thank again for the great work! 🥇

Remove the custom Config struct and NewConfigFromConfigMap function in the resolver cache package. Instead, use the standard map[string]string pattern and DataFromConfigMap from the resolution framework.

This aligns the cache configuration handling with other Tekton resolvers for better consistency and maintainability.

Fixes tektoncd#9275
Consolidate unit tests into TestOnCacheConfigMapChanged for better flow verification
@softho0n softho0n force-pushed the softho0n/align-cache-configmap branch from 296d083 to 8c7b984 Compare January 11, 2026 05:59
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-none Denotes a PR that doesnt merit a release note. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 11, 2026
@softho0n
Copy link
Author

Hi @twoGiants ! Thank you for the great feedback.

  1. Consolidated Unit Tests: I've pushed the tests into a single TestOnCacheConfigMapChanged function as suggested.
  2. Release Notes: I've updated the release note to NONE.
  3. Manual Testing: I will give this a try! I'll look into the resolver logs to monitor cache hits and misses while modifying the ConfigMap, as you suggested.

Thanks again for the great guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Align ConfigMap configstore with existing implementation.

4 participants

0