Skip to content

Derive the expected update-script name in lint--update.t from default_version - #102

Merged
jnasbyupgrade merged 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:lint-update-test-version
Oct 30, 2026
Merged

jnasbyupgrade merged 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:lint-update-test-version

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Make the real-tree assertion in bin/test/lint--update.t read default_version from cat_tools.control instead of hardcoding the stable update script, so make test-bin passes on release commits as well as on master.

bin/lint--update takes its no-argument pair from the same default_version, so the test now tracks what the linter actually checks.

Tested: make test-bin and make lint--update pass on this branch with default_version = 'stable'; make test-bin also passes with the 0.4.0 release commit cherry-picked on top (default_version = '0.4.0', update script cat_tools--0.3.0--0.4.0.sql.in).

…_version

The real-tree assertion hardcoded the `stable` update script, so
`make test-bin` failed on any release commit. Read default_version
from cat_tools.control instead, the same source bin/lint--update uses.
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f59a8380-1b4f-41bc-a416-c657965fb6cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Claude finished @jnasbyupgrade's task in 11s —— View job


Code review: no issues found

  • Read the diff and compared it with bin/lint--update

The test now reads default_version from cat_tools.control with the same regex that bin/lint--update uses (^\s*default_version\s*=\s*'([^']+)', line 476). Interpolating \Q$v\E into the regex is safe for versions like 0.4.0, where the dots are escaped. The relative path cat_tools.control is fine because the enclosing SKIP block already requires the repo root.

Minor, non-blocking: if the control file ever lacked default_version, $v would be undef and the failure would be a confusing regex-warning mismatch. The linter would have exited with a usage error first, so that failure shows up on the preceding is $? >> 8, 0 assertion anyway.

I did not run the tests. The PR description says make test-bin passes with both stable and 0.4.0.

@jnasbyupgrade
jnasbyupgrade merged commit 026d78c into Postgres-Extensions:master Oct 30, 2026
30 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the lint-update-test-version branch October 30, 2026 22:22
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