Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/migrator_uniqueness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Check Migration Filename Uniqueness

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
migrator-name-uniqueness-check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
env:
GH_TOKEN: ${{ github.token }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch full history so we can diff properly

- name: Fetch base branch
run: |
git fetch origin ${{ github.base_ref }} --depth=1

- name: Find newly added migration files
id: find_migrators
run: |
# Diff only added files between base branch and PR HEAD
new_migrators=$(git diff --name-only --diff-filter=A origin/${{ github.base_ref }}...HEAD | grep '^recipe/migrations/' || true)

echo "Found new migrators:"
echo "$new_migrators"

echo "new_migrators=$new_migrators" >> $GITHUB_OUTPUT

- name: Search for existing uses of that migrator in conda-forge
if: steps.find_migrators.outputs.new_migrators != ''
run: |
failed=0
for m in ${{ steps.find_migrators.outputs.new_migrators }}; do
migrator=$(basename "$m")
echo "Checking for existing uses of migrator $migrator in conda-forge..."

# Search in GH-org with exact path where migrators end up
# https://stackoverflow.com/a/46317804
query=$(printf "org:conda-forge path:.ci_support/migrations/$migrator" | jq -sRr @uri)
response=$(curl -s -H "Accept: application/vnd.github.v3.raw" \
-H "Authorization: token $GH_TOKEN" \
"https://api.github.com/search/code?q=$query")
echo "Sent $query"
echo "Got $response"
num_hits=$(echo "$response" | jq '[.items[] | select(.repository.archived == false)] | length')

if [ "$num_hits" -gt 0 ]; then
echo "Found $num_hits existing occurrences of migrator $migrator in conda-forge"
failed=1
else
echo "No existing occurrences of $migrator found"
fi
done

if [ "$failed" -eq 1 ]; then
echo "Pre-existing uses of migration filename(s) found in conda-forge."
exit 1
fi
49 changes: 49 additions & 0 deletions recipe/migrations/python314t.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
migrator_ts: 1755739493
__migrator:
commit_message: Rebuild for python 3.14 freethreading
migration_number: 1
operation: key_add
primary_key: python
ordering:
python:
- 3.9.* *_cpython
- 3.10.* *_cpython
- 3.11.* *_cpython
- 3.12.* *_cpython
- 3.13.* *_cp313
- 3.13.* *_cp313t
- 3.14.* *_cp314 # new entry
- 3.14.* *_cp314t # new entry
paused: true
longterm: true
pr_limit: 20
max_solver_attempts: 3 # this will make the bot retry "not solvable" stuff 12 times
exclude:
# this shouldn't attempt to modify the python feedstocks
- python
- pypy3.6
- pypy-meta
- cross-python
- python_abi
exclude_pinned_pkgs: false
# if feedstock already has 3.13t migrator this is redundant, but harmless
additional_zip_keys:
- is_freethreading
- is_abi3
wait_for_migrators:
- python314
ignored_deps_per_node:
matplotlib:
- pyqt

python:
- 3.14.* *_cp314t
# additional entries to add for zip_keys
is_freethreading:
- true
is_python_min:
- false
is_abi3:
- false
channel_sources:
- conda-forge,conda-forge/label/python_rc