Add cds --version flag and release version-mismatch check - #242
Merged
Conversation
- cli/main.py: add -v/--version flag reporting the installed composable-data-stack package version via importlib.metadata. - pyproject.toml: bump version to 0.2.0a0 to match the v0.2.0-alpha GitHub release, and add packaging to the dev extras. - scripts/check_release_version.py: new script that compares a pushed release tag (e.g. v0.2.0-alpha) against pyproject.toml's version and fails with a clear error on mismatch. - .github/workflows/release.yml: run the new check before generating release notes so releases can't be cut with a stale pyproject version. - tests/test_release_version_check.py: unit tests for the new script, including a guard test against the current repo's version/tag state. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RonaldHensbergen
force-pushed
the
feature/version-check
branch
from
July 26, 2026 21:33
0f91530 to
b59f553
Compare
- pyproject.toml: 0.2.0a0 -> 0.3.0b1 (PEP 440 form of 0.3.0-beta-1) - CHANGELOG.md: move Unreleased entries under [0.3.0-beta-1], record the new cds --version flag and release version-mismatch check, and open a fresh Unreleased section. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
argparse.ArgumentParser previously had no description, so `cds -h` jumped straight to usage/subcommands with no explanation of what the tool does. Add a short description mirroring the README/PyPI summary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tests/test_release_version_check.py imports scripts/check_release_version.py, which depends on `packaging`. CI's Windows/macOS test legs only run `pip install .` (dev extras are only installed for the Ubuntu coverage leg), so the import failed there with ModuleNotFoundError. Move packaging from the dev extra to the core dependencies so it's always present. Verified with a clean venv + `pip install .` (no dev extras): all 132 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously every generated .env value, including non-sensitive
database/user identifiers like CDS_ANALYTICS_DB_NAME and
CDS_DAGSTER_DB_USER, was set to the "change-me" placeholder. Only
values declared under spec.secrets.values are actually sensitive
(passwords, keys); other ${CDS_*} references found in a profile are
typically plain identifiers.
_collect_profile_env_vars now also returns which env vars are true
secrets, and _write_env_file derives a friendly default (e.g.
"analytics", "dagster", "superset") for non-secret *_DB_NAME/*_DB_USER
vars instead of "change-me", falling back to the placeholder for
everything else (passwords, secret keys, and any var it can't infer a
name for).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-v/--versiontocds(reads the installed package version viaimportlib.metadata).pyproject.tomlversion to0.2.0a0to match thev0.2.0-alphaGitHub release (it had drifted, causingcds --versionto report a stale0.1.1).scripts/check_release_version.pyand wire it into.github/workflows/release.ymlto fail the release workflow if a pushed tag (e.g.v0.2.0-alpha) doesn't matchpyproject.toml's version, preventing this drift from recurring.tests/test_release_version_check.pycovering matching/mismatched/invalid version cases.Testing
python -m unittest tests.test_release_version_check tests.test_main -v→ 37 passedyamllint .github/workflows/release.yml→ cleancds --version/cds -voutputcds 0.2.0a0Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com