Skip to content

Comments

Fix dep_updates for v1 recipes using python_min#5306

Merged
beckermr merged 21 commits intoregro:mainfrom
janjagusch:add-dominodatalab-integration-test
Feb 3, 2026
Merged

Fix dep_updates for v1 recipes using python_min#5306
beckermr merged 21 commits intoregro:mainfrom
janjagusch:add-dominodatalab-integration-test

Conversation

@janjagusch
Copy link
Contributor

@janjagusch janjagusch commented Dec 29, 2025

Summary

Fix the dep_updates migrator failing for v1 recipes that use python_min (CFEP-25).

Root cause: Grayskull generates skip: match(python, "<3.10") for noarch recipes, but v1 recipe variant configs only define python_min, not python. When rattler-build tries to render the recipe, all variants are skipped because python is undefined.

Fix: Replace match(python, with match(python_min, in grayskull-generated v1 recipes before rendering.

Changes

  • Add workaround in _make_grayskull_recipe_v1 to replace match(python, with match(python_min,
  • Add integration test case for dominodatalab feedstock
  • Add unit test test_get_grayskull_comparison_v1_python_min_mismatch
  • Add assert_pr_body_not_contains helper method for integration tests

Test Evidence

Successful version update PR created by the bot during integration testing:
janjagusch-conda-forge-bot-staging/dominodatalab-feedstock#28

Related

Closes #5123


Unrelated addition: This PR also adds CLAUDE.md to provide guidance for Claude Code when working with this repository.

🤖 Generated with Claude Code

janjagusch and others added 4 commits December 29, 2025 13:37
This test case reproduces the issue where the dep_updates migrator fails
for v1 recipes when grayskull generates a recipe with `skip: match(python, ...)`
but the feedstock's variant config only has `python_min` (not `python`).

The test adds:
- dominodatalab feedstock as a git submodule (pinned to v1.4.7)
- Test case that validates version update from 1.4.7 to 2.0.0
- New `assert_pr_body_not_contains` helper method to check PR body
- Assertion that the PR body doesn't contain the dep_updates error message

The test currently fails, demonstrating the bug where rattler-build skips
all variants when the `python` variable is not in the variant config.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This test reproduces the issue where get_grayskull_comparison fails for v1
recipes when grayskull generates `skip: match(python, "<3.10")` but the
variant config only has `python_min` (not `python`).

The test is marked as xfail since it currently fails - rattler-build skips
all variants when the `python` variable is not set in the variant config.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The xfail marker was causing pytest to consider the failing test as
"passing" (expected failure). Removing it ensures the test actually
fails in CI until the bug is fixed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace `match(python, ...)` with `match(python_min, ...)` in
grayskull-generated v1 recipes. This fixes the dep_updates migrator
for feedstocks using CFEP-25's python_min variable.

Grayskull generates skip conditions like `skip: match(python, "<3.10")`
but v1 recipe variant configs only define `python_min`, not `python`.
This caused rattler-build to skip all variants with:
"Failed to render recipe YAML! No output recipes found!"

See: conda/grayskull#574

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@janjagusch janjagusch changed the title Add failing tests for dominodatalab dep_updates issue Fix dep_updates for v1 recipes using python_min Dec 29, 2025
@janjagusch janjagusch marked this pull request as draft December 29, 2025 14:55
- Add mock endpoint for version-specific PyPI API (/pypi/dominodatalab/2.0.0/json)
- Include 'urls' field in main PyPI endpoint for grayskull sdist discovery
- Add spdx.org/* to transparent URLs (grayskull license discovery)
- Store full PyPI metadata response for reproducible testing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@janjagusch janjagusch force-pushed the add-dominodatalab-integration-test branch from 12a2004 to 09ca7cc Compare December 29, 2025 16:21
Add documentation to help Claude Code understand the codebase structure,
common commands, and integration test setup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@janjagusch janjagusch marked this pull request as ready for review December 29, 2025 16:23
@beckermr
Copy link
Contributor

@wolfv rattler build should define python, right? Is this an issue somewhere in rattler-build or smithy maybe?

@ytausch ytausch self-requested a review January 19, 2026 17:19
janjagusch and others added 4 commits January 31, 2026 13:10
Guard the match(python, ...) to match(python_min, ...) replacement
with a check for package_is_noarch to avoid unintended changes to
arch-specific recipes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename CLAUDE.md to AGENTS.md and create symlink for backwards compat
- Make content agent-agnostic (remove Claude Code-specific references)
- Remove "(recommended for development)" from environment.yml option
- Use local conda-lock.yml instead of wget from GitHub
- Remove unmaintained test feedstocks list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@janjagusch
Copy link
Contributor Author

@beckermr, @ytausch, took me a bit to get back to it, but it should be ready for another round of reviews now. :)

@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.69%. Comparing base (11e4141) to head (a1d8343).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5306      +/-   ##
==========================================
+ Coverage   80.66%   80.69%   +0.03%     
==========================================
  Files         144      144              
  Lines       16968    16976       +8     
==========================================
+ Hits        13687    13699      +12     
+ Misses       3281     3277       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@beckermr
Copy link
Contributor

This error looks odd?

tests/test_update_deps.py::test_get_grayskull_comparison_v1_python_min_mismatch - RuntimeError: Failed to render recipe YAML! No output recipes found!
[]

@beckermr
Copy link
Contributor

/relock-conda

@janjagusch
Copy link
Contributor Author

@beckermr, I was able to track the bug down to CRM and propose a fix: conda/conda-recipe-manager#480

The inline comment in our code now references the correct upstream issue: conda/conda-recipe-manager#479

My suggestion would be to merge the current version of the branch and remove the fix once we have a new release of CRM.

@janjagusch janjagusch requested a review from beckermr February 1, 2026 12:38
@beckermr
Copy link
Contributor

beckermr commented Feb 1, 2026

did you run the integration tests locally? they are not running in CI because you are working from a fork.

My suggestion is to remove them or for you to ensure they work locally.

@ytausch
Copy link
Contributor

ytausch commented Feb 2, 2026

I think the integration tests really add value here, so I'd go with option 2.

@janjagusch
Copy link
Contributor Author

did you run the integration tests locally? they are not running in CI because you are working from a fork.

My suggestion is to remove them or for you to ensure they work locally.

The integration tests are still failing on my local machine. It's probably just a problem with the MITM proxy. I'll check today.

@ytausch
Copy link
Contributor

ytausch commented Feb 3, 2026

@beckermr alternatively, we could also check if the merge queue passes, right?

@beckermr beckermr added this pull request to the merge queue Feb 3, 2026
@beckermr
Copy link
Contributor

beckermr commented Feb 3, 2026

Yes let's try the queue. I did not want to debug the tests via the queue which is why I asked.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 3, 2026
@beckermr beckermr enabled auto-merge February 3, 2026 11:57
@beckermr beckermr disabled auto-merge February 3, 2026 11:59
@beckermr beckermr enabled auto-merge February 3, 2026 11:59
@beckermr beckermr disabled auto-merge February 3, 2026 12:15
@beckermr beckermr enabled auto-merge February 3, 2026 13:31
@beckermr beckermr disabled auto-merge February 3, 2026 13:38
@beckermr beckermr enabled auto-merge February 3, 2026 18:14
@beckermr beckermr added this pull request to the merge queue Feb 3, 2026
Merged via the queue into regro:main with commit cdf7d3a Feb 3, 2026
32 of 42 checks passed
@janjagusch
Copy link
Contributor Author

Thanks for merging, @beckermr. I will test the new version against conda-forge/dominodatalab-feedstock#23.

@janjagusch
Copy link
Contributor Author

Worked like a charm: conda-forge/dominodatalab-feedstock#24 🚀

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.

Recent failures with v1 recipe grayskull updates

3 participants