Skip to content

Integration tests #3417

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

Merged
merged 255 commits into from
May 23, 2025
Merged

Integration tests #3417

merged 255 commits into from
May 23, 2025

Conversation

ytausch
Copy link
Contributor

@ytausch ytausch commented Dec 16, 2024

Description:

This PR adds integration tests to the autotickbot, interacting with a real GitHub test environment. Closes #261 (more details there). This is a "minimal breakthrough" PR, only adding one test for version updates (using the pydantic-feedstock as an example).

Implementation is finished.

In this demo PR in my fork the integration tests actually run (needs token setup): ytausch#2

I've added a CODEOWNERS file to automatically request reviews from me if anything related to the tests change. On this occasion, I've also added a selection of other files where I am the main contributor. Hope you're fine with this!

@pavelzw

Checklist:

  • Pydantic model updated or no update needed
  • Add more documentation for the integration tests
  • setup tokens (see comment below) - note the checks in this PR fail without that

Cross-refs, links to issues, etc:


@jaimergp
Copy link
Contributor

/relock-conda

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need this anymore, do we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do since we import from this module:

from tests_integration.lib import (
TestCase,
close_all_open_pull_requests,
get_all_test_scenario_ids,
get_test_scenario,
prepare_all_accounts,
reset_cf_graph,
run_all_prepare_functions,
run_all_validate_functions,
setup_logging,
)

exit 1
fi

# You might need to set PYTHONPATH to the root of cf-scripts
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we enforce this with the appropriate working directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PYTHONPATH is needed because the mock_server_addon module needs to be able to import from tests_integration, and there is some weird stuff going on in mitmdump. I just tested again, and changing the working directory to the root of cf-scripts does not make it work without PYTHONPATH.

@regro-cf-autotick-bot
Copy link
Collaborator

I've relocked the dependencies with conda-lock!

The following packages have been updated:

  • platform: osx-arm64

    • conda-forge-pinning: 2025.05.12.15.56.23 -> 2025.05.14.14.39.58
    • distributed: 2025.4.1 -> 2025.5.0
  • platform: linux-64

    • conda-forge-pinning: 2025.05.12.15.56.23 -> 2025.05.14.14.39.58
    • distributed: 2025.4.1 -> 2025.5.0
  • platform: osx-64

    • conda-forge-pinning: 2025.05.12.15.56.23 -> 2025.05.14.14.39.58
    • distributed: 2025.4.1 -> 2025.5.0

@ytausch ytausch requested a review from jaimergp May 19, 2025 16:01
@jaimergp
Copy link
Contributor

I won't hold this PR any longer, sorry for the multiple rounds of reviews and extended time it took to get here! I'm very pleased with the result and this is a great improvement for the codebase! So thank you A LOT for the patience 🙏 Let's fix the conflicts and merge right away so we can take this out of our plates!

@ytausch
Copy link
Contributor Author

ytausch commented May 21, 2025

Thank you very much! Before merging, let me fix some last issues. I'll post an update when we are ready!

@jaimergp
Copy link
Contributor

cc @beckermr for visibility and eventual click-to-merge! I'm too afraid to click that button here 😬

Comment on lines 709 to 715
extra_container_args=[
"-e",
f"{ENV_CONDA_FORGE_ORG}={settings().conda_forge_org}",
"-e",
f"{ENV_GRAPH_GITHUB_BACKEND_REPO}={settings().graph_github_backend_repo}",
],
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these additions are a hotfix until we have a solution for conda-forge/conda-forge-feedstock-ops#49

@jaimergp
Copy link
Contributor

All these conda-lock conflicts make me wonder whether an (additional?) non-main push event would be better suited in this repo.

@ytausch
Copy link
Contributor Author

ytausch commented May 22, 2025

I don't follow completely, better suited for what?
My idea would be to only relock weekly, or instantly if a new version of conda-smithy is released.

@ytausch
Copy link
Contributor Author

ytausch commented May 23, 2025

@beckermr All set, this PR can be merged! Please see here for validating that CI is indeed passing.

@beckermr
Copy link
Contributor

Do you want the commits squashed or kept as is?

This PR is big and IDK how much of the history is useful to you here.

@ytausch
Copy link
Contributor Author

ytausch commented May 23, 2025

Let's squash

@beckermr
Copy link
Contributor

I'll merge by hand once the tests on this PR pass.

@beckermr beckermr merged commit c39a5d3 into regro:main May 23, 2025
10 of 11 checks passed
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.

true integration testing
5 participants