-
Notifications
You must be signed in to change notification settings - Fork 28
Add cardonnay-sync skill #3556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
OlufemiAdeOlusile
wants to merge
2
commits into
master
Choose a base branch
from
add-cardonnay-sync-skill
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add cardonnay-sync skill #3556
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| name: cardonnay-sync | ||
| description: >- | ||
| Sync cardano-node-tests to a specific cardonnay branch/ref so a real test | ||
| run actually exercises it, instead of a stale PyPI release. Use whenever | ||
| making or verifying changes in the cardonnay repo (cluster scripts, genesis | ||
| spec files, cost models) that need to be exercised via a cardano-node-tests | ||
| test run, or whenever a test result needs to be trusted before reporting it | ||
| as "verified" or "passing." | ||
| --- | ||
|
|
||
| # Syncing cardano-node-tests to a cardonnay branch | ||
|
|
||
| `cardano-node-tests` depends on `cardonnay` as a normal Python package, | ||
| pinned in `pyproject.toml` to a version range and locked in `uv.lock` to one | ||
| specific PyPI release. Editing files in a local `cardonnay` git clone, even | ||
| an editable pip install of it, does not change what a real test run uses | ||
| unless you wire it to that ref explicitly. `runner/node_upgrade.sh` and | ||
| friends build a fresh, isolated venv from `pyproject.toml` + `uv.lock` only, | ||
| they have no idea a local `/path/to/cardonnay` clone exists. | ||
|
|
||
| ## When this skill is invoked, do this immediately | ||
|
|
||
| 1. If a branch/ref was given as an argument, use it. Otherwise ask the user | ||
| which cardonnay branch, tag, or commit to sync to before doing anything | ||
| else. Do not guess or default to `master` silently, confirm it. | ||
| 2. Run the sync procedure below against that ref, in `cardano-node-tests`. | ||
| 3. Verify it actually took effect (step 4 of the procedure), don't just | ||
| report success because the commands didn't error. | ||
| 4. Report back the resolved commit hash and version string so the user can | ||
| see exactly what got pinned. | ||
| 5. Remind the user this is a temporary, local-only change (see step 6) and | ||
| confirm whether they want it left in place for an upcoming test run or | ||
| reverted now. | ||
|
|
||
| Do not run any cardano-node-tests test (`runner/node_upgrade.sh`, | ||
| `make start-cluster`, etc.) on a cardonnay change without having gone through | ||
| this sync first in the same session. If a test result is already reported | ||
| from before this sync ran, treat it as unverified. An editable local | ||
| install, a `git pull` in the cardonnay clone, or "I have the right branch | ||
| checked out" are not sufficient by themselves. | ||
|
|
||
| ## The sync procedure | ||
|
|
||
| 1. Confirm the branch/ref exists and is pushed (or use `master` if it's | ||
| already merged there but not yet released to PyPI). If the user asked for | ||
| a branch, use exactly that branch, not `master`. | ||
|
|
||
| 2. In `cardano-node-tests/pyproject.toml`, temporarily change the dependency | ||
| line from a version pin to a git reference: | ||
|
|
||
| ```toml | ||
| "cardonnay @ git+https://github.com/IntersectMBO/cardonnay.git@<branch-or-master>", | ||
| ``` | ||
|
|
||
| 3. Regenerate the lock file so it actually resolves that ref: | ||
|
|
||
| ```sh | ||
| uv lock | ||
| ``` | ||
|
|
||
| 4. Confirm the lock file actually changed, don't just assume the command | ||
| succeeded silently. `uv` prints a line like: | ||
|
|
||
| ```text | ||
| Updated cardonnay v0.4.1 -> v0.4.2.dev8+gca7c6fb56 (ca7c6fb5) | ||
| ``` | ||
|
|
||
| The commit hash at the end must match the tip of the branch you pushed. | ||
| If the version number didn't change, the wiring didn't take, stop and find | ||
| out why before running anything. | ||
|
|
||
| 5. Now run the actual test. This only exercises the synced ref if the whole | ||
| environment gets rebuilt from `pyproject.toml`/`uv.lock` — `runner/regression.sh`, | ||
| `runner/node_upgrade.sh`, `make test-env`, and `make install` all do this. | ||
| A plain `make cluster-scripts && make start-cluster` does **not**: it | ||
| reuses whatever `./.venv` already exists, so it will silently keep | ||
| running against the old dependency. | ||
|
|
||
| 6. Treat this `pyproject.toml`/`uv.lock` edit as strictly temporary, local | ||
| only. Never commit or push it as part of a real PR. Once the cardonnay | ||
| change is confirmed working and merged, revert both files back to the | ||
| normal version-pin form (`git checkout -- pyproject.toml uv.lock`, or | ||
| re-run `uv lock` after reverting the dependency line). A real | ||
| version bump only happens once cardonnay cuts an actual PyPI release. | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running
uv lockis enough.