Skip to content

feat(container-pull): add version channel selector for sensor image pulls#490

Merged
carlosmmatos merged 6 commits into
mainfrom
add-version-channel-selector
Jul 24, 2026
Merged

feat(container-pull): add version channel selector for sensor image pulls#490
carlosmmatos merged 6 commits into
mainfrom
add-version-channel-selector

Conversation

@carlosmmatos

@carlosmmatos carlosmmatos commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Adds support for version channel keywords (latest, N-1, N-2, LTS, LTS-1) to the -v, --version flag in falcon-container-sensor-pull.sh. This allows users to pull sensor images by release channel instead of needing exact version numbers, which is useful for automation and policy-driven deployments.

Channel keywords are resolved entirely from existing registry tag data — no new API calls or scopes required. Keywords are case-insensitive and fully backward compatible with existing -v usage.

New functions:

  • extract_raw_tags() — refactored from duplicated awk logic in match_sensor_version()
  • resolve_version_channel() — maps channel keywords to version prefixes, which then feed into the existing match_sensor_version() flow

Keyword behavior:

Keyword Resolution
latest Latest sensor version (default)
N-1 One release prior to the latest (excludes LTS tags)
N-2 Two releases prior to the latest (excludes LTS tags)
LTS Latest LTS release
LTS-1 Previous LTS release

LTS (Long Term Support) release tags are not yet published to the registry. The LTS and LTS-1 keywords are included ahead of that release and will return an error until LTS-tagged images are available — this is documented in the README so the behavior is clear to users.

Also updates usage help, error messages, and README with channel keyword documentation and examples showing the keywords in automation (image-path pinning) and registry-mirroring workflows.

@carlosmmatos carlosmmatos added enhancement New feature or request bash container labels Mar 16, 2026
redhatrises
redhatrises previously approved these changes Mar 16, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity in the last 14 days.

Next steps:
• Please update the PR to address any existing feedback
• Rebase your branch to resolve any conflicts with the main branch
• The PR will be closed in 7 days if no activity occurs
• Comment on this PR to prevent automatic closure

We value your contribution and look forward to reviewing your changes!

@github-actions github-actions Bot closed this Apr 6, 2026
@carlosmmatos carlosmmatos reopened this Jun 8, 2026
@carlosmmatos carlosmmatos added pinned Don't classify as stale and removed no-pr-activity labels Jun 8, 2026
@carlosmmatos
carlosmmatos force-pushed the add-version-channel-selector branch from 6dbf203 to 0fb0e67 Compare June 9, 2026 00:41
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity in the last 14 days.

Next steps:
• Please update the PR to address any existing feedback
• Rebase your branch to resolve any conflicts with the main branch
• The PR will be closed in 7 days if no activity occurs
• Comment on this PR to prevent automatic closure

We value your contribution and look forward to reviewing your changes!

@carlosmmatos

Copy link
Copy Markdown
Contributor Author

Keep open

@carlosmmatos carlosmmatos removed pinned Don't classify as stale no-pr-activity labels Jul 9, 2026
@CrowdStrike CrowdStrike deleted a comment from github-actions Bot Jul 9, 2026
@carlosmmatos carlosmmatos added the pinned Don't classify as stale label Jul 9, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has had no activity in the last 14 days.

Next steps:
• Please update the PR to address any existing feedback
• Rebase your branch to resolve any conflicts with the main branch
• The PR will be closed in 7 days if no activity occurs
• Comment on this PR to prevent automatic closure

We value your contribution and look forward to reviewing your changes!

@carlosmmatos
carlosmmatos marked this pull request as ready for review July 24, 2026 01:21
@carlosmmatos
carlosmmatos requested a review from a team as a code owner July 24, 2026 01:21
… LTS, LTS-1)

Allow users to pull images by release channel keyword via the existing
-v/--version flag instead of requiring exact version numbers. Channel
keywords are resolved from registry tag data with no new API calls.
… error handling

Replace echo-to-stderr + return 1 with die() calls, and remove the
set +e / CHANNEL_STATUS boilerplate in the caller. die() prints to
stderr (not captured by $()) and exit 1 propagates via set -e.
…mage

The registry uses lowercase "-lts" suffix on LTS tags (e.g. 7.32.0-18504-1-lts),
but the version channel resolver was grepping for uppercase "-LTS", causing LTS/LTS-1
to always die with "No LTS versions found" and the N-1/N-2 exclusion to silently
leak LTS tags into the candidate list.

Also changes LTS/LTS-1 resolution to return the full "-lts" tagged image directly
rather than extracting the major.minor prefix, which previously caused match_sensor_version
to select the latest non-LTS build of that line instead of the designated LTS build.
@carlosmmatos
carlosmmatos force-pushed the add-version-channel-selector branch from 0fb0e67 to 8589288 Compare July 24, 2026 13:39
…nel examples

Reword N-1/N-2 descriptions to generic "one/two releases prior to the
latest" phrasing in both usage help and README. Add a note that LTS tags
are not yet published to the registry, and add two examples showing
channel keywords in automation (N-1 image-path pinning) and registry
mirroring (LTS copy) workflows.
@carlosmmatos
carlosmmatos merged commit 0fc878d into main Jul 24, 2026
8 checks passed
@carlosmmatos
carlosmmatos deleted the add-version-channel-selector branch July 24, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash container enhancement New feature or request pinned Don't classify as stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants