Skip to content

fix(ci): Stabilize nox sessions#27

Draft
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
fix-ci-nox-sessions
Draft

fix(ci): Stabilize nox sessions#27
google-labs-jules[bot] wants to merge 1 commit intomasterfrom
fix-ci-nox-sessions

Conversation

@google-labs-jules
Copy link
Copy Markdown

This commit stabilizes the nox sessions to ensure they run reliably in CI environments.

The key issue was that uv, the package installer, was ignoring the isolated virtual environments created by nox for each session. This caused dependencies to be installed in the wrong location, leading to "module not found" errors.

This commit fixes the problem by modifying all uv sync calls in noxfile.py to explicitly use the session's Python interpreter via the --python str(session.python) flag. This forces uv to install dependencies into the correct session-specific environment.

Additionally, all external=True flags have been removed from these calls, as they are no longer necessary and were contributing to the issue.

While this change fixes the tests and mypy sessions, the pre-commit session may still exhibit issues in some CI environments due to deeper configuration problems. However, this commit significantly improves the stability and correctness of the nox setup.


PR created automatically by Jules for task 1351672480625428708 started by @bosd

…ython

The `nox` sessions were failing in CI because `uv sync` was not installing dependencies into the correct session-specific virtual environments. This was caused by `uv` ignoring the `VIRTUAL_ENV` set by `nox` and defaulting to a different environment.

This commit resolves the issue by:
1.  Adding `--python str(session.python)` to all `uv sync` calls in `noxfile.py`. This explicitly tells `uv` which python executable to use, forcing it to install dependencies into the correct isolated virtual environment for each session.
2.  Removing all `external=True` flags from the `uv sync` calls, as they are no longer needed and were part of the problem.
3.  Removing a redundant `session.install("pydoclint")` call, as the dependency is already handled by `uv sync`.

These changes ensure that `tests` and `mypy` sessions run reliably. The `pre-commit` session is now configured correctly, although it may still face issues in certain CI environments with unusual PATH configurations.
@google-labs-jules
Copy link
Copy Markdown
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

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.

0 participants