Skip to content

Add --check: report which pinned Splunkbase apps are outdated (2.3.0) - #6

Merged
dd-Splunk merged 1 commit into
mainfrom
feat/check-outdated
Oct 28, 2026
Merged

dd-Splunk merged 1 commit into
mainfrom
feat/check-outdated

Conversation

@dd-Splunk

Copy link
Copy Markdown
Owner

Summary

  • --check FILE reads the SPLUNK_APPS_URL line(s) of a .env or compose file (plain, export, quoted, - KEY=value, KEY: value), compares every pinned Splunkbase release with the newest release that fits the Splunk version, and prints a table (or JSON).
  • Statuses: current; outdated (newer eligible release exists); unsupported (pin is newer than any release that fits the Splunk version or --cloud); unknown (pin not in the release list). Warns when an older pin does not list the Splunk version.
  • Splunk version comes from --splunk-version, --image, or the splunk/splunk image: line of the file, otherwise a note says compatibility was not checked.
  • Exit 3 = at least one pin is not current (exit 1 stays "failed", 2 "bad arguments"), so it works in scheduled jobs. Nothing on stdout on failure unless --partial, same as before.
  • Read-only: never edits the file and only reads Splunkbase's public API. A newer release is reported as a fact; SKILL.md routes "is it safe to upgrade" to the lifecycle workflow.
  • Deliberately limited: literal one-line SPLUNK_APPS_URL values and splunkbase.splunk.com URLs only. Multi-line values are rejected with a clear message, ${VAR} references produce a hint to check the .env, other hosts are counted and noted. Python only; the bash fallback points to it.
  • Each app is fetched once even when several versions of it are pinned (_resolve is shared with the normal path, which is unchanged).
  • Docs: SKILL.md (workflow step, exit code 3, boundaries, description/metadata), README, Docker reference, CHANGELOG, version 2.3.0. Two evals added (a trigger and a behaviour eval).

Test plan

  • python3 -m unittest discover -s tests: 149 tests pass, 8 live skipped
  • Parser unit tests (file forms, comments, encoding, duplicates, other hosts, multi-line, compose image) and 18 CLI tests for statuses, version sources, JSON shape, errors, usage errors, one request per app
  • SPLUNKBASE_LIVE=1 live tests pass, including --check on the real oldest and newest releases of app 7931
  • Mutation check: flipping the outdated/unsupported comparison fails 3 tests
  • shellcheck and ruff clean

🤖 Generated with Claude Code

Reads SPLUNK_APPS_URL from a .env or compose file, compares each pinned
release with the newest release that fits the Splunk version (from
--splunk-version, --image or the compose image: line) and reports current,
outdated, unsupported or unknown. Exit 3 means a pin is not current, so it
works in scheduled jobs. Read-only: it never edits the file. Python only.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@dd-Splunk
dd-Splunk merged commit 35821c9 into main Oct 28, 2026
6 checks passed
@dd-Splunk
dd-Splunk deleted the feat/check-outdated branch October 28, 2026 13:52
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.

1 participant