Skip to content

[CI] Add pixi lockfiles for scripts - #830

Open
jl-wynen wants to merge 4 commits into
mainfrom
no-script-lock
Open

jl-wynen wants to merge 4 commits into
mainfrom
no-script-lock

Conversation

@jl-wynen

Copy link
Copy Markdown
Member

Currently, running the script fails with

pixi run --script tools/collect-release-notes.py -- --cur-tag ${PACKAGE}/${VERSION} --compare-tag ${PACKAGE}/${LASTVERSION}

Error:   × no lock file exists for the script, but `--frozen` was requested
  help: Create one with `pixi lock --script <PATH>`.

(Reported by @nvaytet)

We would either need a lock file for the script (https://pixi.prefix.dev/latest/python/scripts/#lock-exact-versions) or allow resolving dependencies. This PR implements the latter.

Note that we need PIXI_NO_INSTALL: false in either case.

@jl-wynen
jl-wynen requested a review from nvaytet October 26, 2026 07:49
@github-actions github-actions Bot added the CI label Oct 26, 2026
@github-actions github-actions Bot changed the title Do not require lockfiles for CI scripts [CI] Do not require lockfiles for CI scripts Oct 26, 2026
Comment thread .github/workflows/release.yml Outdated
- name: Generate release note
run: pixi run --script tools/collect-release-notes.py -- --cur-tag ${PACKAGE}/${VERSION} --compare-tag ${PACKAGE}/${LASTVERSION}
env:
# We have no lock files for scripts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a bit more description here as to why we don't want lock files. Because someone later might just come along and think 'why not?' and just add them?

@jl-wynen jl-wynen changed the title [CI] Do not require lockfiles for CI scripts [CI] Add pixi lockfiles for scripts Oct 26, 2026
Comment thread tools/bump-dependency-version.py Outdated
@@ -1,8 +1,13 @@
# /// script
# requires-python = ">=3.12"
# dependencies = []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? It is not in the other files.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it

# platforms = [
# "linux-64",
# { platform = "osx-arm64", macos = "14.0" },
# ]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we support windows?
Even if his is just for the CI builds, we have weekly builds on mac and windows?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the readme. I wanted to keep the lock files small. The weekly builds do not use any scripts as far as I can tell. Do you want me to add that anyway?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure which readme you are refering to...
If the weekly builds don't use any scripts, do we need macos in there or can we make do with just linux?

All I'm saying is that as it looks now, the next person who will read this will wonder "did we forget windows? Or maybe we should remove macos?"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to commit it and it's on my workstation... I'll add it when I'm back in the office.

All I'm saying is that as it looks now, the next person who will read this will wonder "did we forget windows? Or maybe we should remove macos?"

I added macos initially because some of us use it. Added windows now.

@@ -171,6 +171,8 @@ jobs:
run: ls .ess_release_cache
- name: Generate release note
run: pixi run --script tools/collect-release-notes.py -- --cur-tag ${PACKAGE}/${VERSION} --compare-tag ${PACKAGE}/${LASTVERSION}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we can test that this command actually works now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not without running the workflow. Can we still run the workflow from the UI and have it run all steps except the actual upload?

@nvaytet nvaytet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval pending addition of the README file

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants