Skip to content

Conversation

HadrienPatte
Copy link
Member

@HadrienPatte HadrienPatte commented Jul 25, 2025

This PR focuses on optimizing the detectFeatures function used in the setup phase of connectivity tests. Currently this function has a per-cilium-agent loop and on every iteration of this loop, it performs various feature detection checks. But the majority of those detection checks are cluster-wide and not specific to an agent. This means that the same detection logic that could run a single time instead ends up running unnecessarily once per agent.

This PR moves all those cluster-wide feature detection checks outside of the per agent loop.

Also the ExtractFromVersionedConfigMap function is renamed to ExtractFromCiliumVersion as it is not actually extracting anything from the configmap and there is already the ExtractFromConfigMap function that performs feature extraction from the configmap.


Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!
cilium-cli: Optimized feature detection by running cluster-wide checks once

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jul 25, 2025
@github-actions github-actions bot added cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary labels Jul 25, 2025
@HadrienPatte
Copy link
Member Author

/test

@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/cilium-cli-features branch from 76a2f91 to 0197774 Compare July 25, 2025 14:23
@HadrienPatte HadrienPatte marked this pull request as ready for review July 25, 2025 14:55
@HadrienPatte HadrienPatte requested review from a team as code owners July 25, 2025 14:55
Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/cilium-cli-features branch from 0197774 to ef79edb Compare July 28, 2025 12:23
@HadrienPatte
Copy link
Member Author

/test

@HadrienPatte HadrienPatte added the release-note/misc This PR makes changes that have no direct user impact. label Jul 28, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jul 28, 2025
Copy link
Contributor

@smagnani96 smagnani96 left a comment

Choose a reason for hiding this comment

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

LGTM! Left a couple of non-blocking comments.

@HadrienPatte HadrienPatte changed the title cilium-cli: Optimize features detection cilium-cli: Optimized feature detection by running cluster-wide checks once Jul 29, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 11, 2025
@aanm aanm enabled auto-merge August 12, 2025 12:22
@aanm aanm added this pull request to the merge queue Aug 13, 2025
Merged via the queue into main with commit ae55131 Aug 13, 2025
282 of 285 checks passed
@aanm aanm deleted the pr/HadrienPatte/cilium-cli-features branch August 13, 2025 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants