Skip to content

Conversation

@rickeylev
Copy link
Collaborator

Merges main into release/1.7

aignas and others added 5 commits October 16, 2025 14:07
#3361)

It seems that the changelog got merged for `1.7.0`, but the
`VERSION_NEXT_FEATURE` got added to the docs instead of `1.7.0`. This is
fixing
that so that we can merge/cherry-pick again to the release branch.
The GitHub App is deprecated, so switch to the more modern workflow.

This will also allow us to eventually use attestations.

Along the way...

* Split up the release workflow into some different sub-jobs
* Run PyPI upload last, as its the most irrevocable step of the process.
…3355)

The create_archive_and_notes.sh script is incorrectly detecting the
version markers
in the tool meant to rewrite them. To fix, ignore those files.
…nt (#3365)

BCR recently changed how it extracts archives in its presubmits: instead
of extracting
the whole archive, only the specified portion (`gazelle/` in this case)
is extracted.
This broke the gazelle tests because they reference files above the
gazelle directory.

To fix, move the module it runs as a test under the gazelle directory.

Because the test module also refers to rules_python, which is above the
gazelle
directory, the bcr presubmit has disable that override using
`--override_module`.
This means, going forward, the gazelle module, when bcr tests it, will
use the
version in the MODULE file (rather than the vendored copy).

Fixes #3364
My original change to use the bazel-contrib BCR publishing workflow was
horribly broken.
This fixes a variety of issues.

* Fix the workflow call secrets variable name
* Allow getting the BCR publishing token from the workflow arg (the
release
  workflow calls it)
* Fix the overall syntax of the workflows. It was just entirely invalid
in
  several regards.
* Fix the yaml -> yml file name reference. NGL, it took me longer than
I'd
  like to admit to see that, eh.

Along the way, some cleanups and improvements

* Allow specifying a particular tag to release, while using workflow
state from
a different commit. This allows us to make fixes on main, and then use
it to
  manually re-trigger a tag to be released.
* Add descriptions for workflow inputs
* Allow bcr token to be passed to release. This will allow e.g.
automatically
  scheduled releases.
* Quote shell variables because its good practice.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rickeylev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on a structural refactoring by relocating the bzlmod_build_file_generation example to a new gazelle/examples directory. This move necessitated updates across various build and CI configuration files to ensure continued functionality and correct pathing. Additionally, the documentation for rules_python configuration settings has been updated to reflect the upcoming 1.7.0 release, marking specific features as newly added or deprecated.

Highlights

  • Example Relocation: The bzlmod_build_file_generation example has been moved from the root examples/ directory to gazelle/examples/, necessitating updates to all related file paths.
  • Configuration Updates: Various build and CI configuration files, including .bazelci/presubmit.yml, .bazelignore, .bazelrc, and .bcr/gazelle/presubmit.yml, have been updated to reflect the new location of the moved example and ensure correct build behavior.
  • Module Version Bumps: The MODULE.bazel file within the relocated example now specifies updated versions for rules_python (1.0.0) and rules_python_gazelle_plugin (1.5.0), along with adjusted local_path_override paths to match the new directory structure.
  • Documentation Versioning: The rules_python API documentation has been updated to mark several configuration settings as versionadded or deprecated in the upcoming 1.7.0 release.
Ignored Files
  • Ignored by pattern: .github/workflows/** (3)
    • .github/workflows/create_archive_and_notes.sh
    • .github/workflows/publish.yml
    • .github/workflows/release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request merges changes from main into the release/1.7 branch. The changes primarily consist of moving an example from examples/ to gazelle/examples/, updating configuration files (.bazelci/presubmit.yml, .bazelrc, .bazelignore, MODULE.bazel) to reflect this move, and bumping version numbers in documentation and dependency definitions for the 1.7 release. My review includes a few suggestions to improve maintainability by removing redundant configuration and consolidating flags in .bazelrc files.

Comment on lines +29 to +32
gazelle/examples/bzlmod_build_file_generation/bazel-bin
gazelle/examples/bzlmod_build_file_generation/bazel-bzlmod_build_file_generation
gazelle/examples/bzlmod_build_file_generation/bazel-out
gazelle/examples/bzlmod_build_file_generation/bazel-testlog
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The newly added gazelle/.bazelignore file already handles ignoring these Bazel-generated directories within the gazelle/examples/bzlmod_build_file_generation path. These entries in the root .bazelignore are therefore redundant and can be removed to avoid duplication and simplify maintenance.

Comment on lines +12 to +13
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation
common --deleted_packages=gazelle/examples/bzlmod_build_file_generation/runfiles
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better readability and consistency with other parts of this file (like the query --deleted_packages on line 9), you can combine these two deleted_packages flags into a single line with comma-separated paths.

common --deleted_packages=gazelle/examples/bzlmod_build_file_generation,gazelle/examples/bzlmod_build_file_generation/runfiles

@rickeylev
Copy link
Collaborator Author

For fun, I tried using a PR to update the 1.7 branch with main. Two notes:

  1. it only allows squash+merge or rebase+merge, neither of which we want in this case. We'll have to update the settings.
  2. There are merge conflicts, but because main is a protected branch, the egress branch (main) can't be edited to resolve the conflict. So I'll have to do this merge manually, and don't think I can do a PR for it.

@rickeylev rickeylev merged commit 66f1d47 into release/1.7 Oct 19, 2025
7 of 9 checks passed
@rickeylev
Copy link
Collaborator Author

Huh. I did the merge locally and it seems to have resolved this PR? Weird...

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.

3 participants