534 Commits

Author SHA1 Message Date
Sandy Zhang
56dcd0d584 Update bug report and feature templates to be clearer about being on supported versions and filing security issues to VRP
PiperOrigin-RevId: 884509174
2026-03-16 10:18:13 -07:00
Rachel Goldfinger
bd2543656e Fix arch tests by adding file to the Docker images
PiperOrigin-RevId: 881524967
2026-03-10 11:06:34 -07:00
Rachel Goldfinger
54f924aa25 Add Java 21 Java tests.
PiperOrigin-RevId: 879222360
2026-03-05 13:34:59 -08:00
Keith Smiley
f08d703292 Add support for bazel 9.x (#26201)
This doesn't flip the default bazel version, but instead makes this repo
compatible with the current version and bazel 9.x. The primary changes
for 9.x support are adding new load statements for things that were
previously built in. This cascaded into a few dep updates to pull in
their missing load statement fixes.

Closes #26201

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/26201 from keith:ks/add-support-for-bazel-9.x e8192d86b3c838f6c88d4a4adfebd07162debc0d
PiperOrigin-RevId: 878654773
2026-03-04 13:59:16 -08:00
Joshua Haberman
71a03bef4d Fixed release_prep.sh script mkdir command to follow INTEGRITY_FILE location.
This fixes an error running `release_prep.sh` that blocked the release from going out.

PiperOrigin-RevId: 878598347
2026-03-04 11:59:53 -08:00
Tony Liao
de3d7c2fff Second try at fixing the release_prep.sh file path!
Earlier attempt at 15811028e4.

PiperOrigin-RevId: 875344622
2026-02-25 14:45:46 -08:00
Salman Chishti
adf9e8b80f Upgrade GitHub Actions for Node 24 compatibility (#25572)
## Summary

Upgrade GitHub Actions to their latest versions to ensure compatibility with Node 24, as Node 20 will reach end-of-life in April 2026.

## Changes

| Action | Old Version(s) | New Version | Release | Files |
|--------|---------------|-------------|---------|-------|
| `actions/cache` | [`1bd1e32`](1bd1e32a3b) | [`8b402f5`](8b402f58fb) | [Release](https://github.com/actions/cache/releases/tag/v5) | clear_caches.yml |
| `actions/checkout` | [`8ade135`](8ade135a41) | [`8e8c483`](8e8c483db8) | [Release](https://github.com/actions/checkout/releases/tag/v6) | scorecard.yml, staleness_refresh.yml, update_php_repo.yml |
| `actions/download-artifact` | [`018cc2c`](018cc2cf5b), [`fa0a91b`](fa0a91b85d) | [`37930b1`](37930b1c2a) | [Release](https://github.com/actions/download-artifact/releases/tag/v7) | test_cpp.yml, test_php_ext.yml, test_upb.yml |
| `actions/setup-dotnet` | [`3447fd6`](3447fd6a9f) | [`baa11fb`](baa11fbfe1) | [Release](https://github.com/actions/setup-dotnet/releases/tag/v5) | test_csharp.yml |
| `actions/setup-java` | [`3a4f6e1`](3a4f6e1af5) | [`be666c2`](be666c2fcd) | [Release](https://github.com/actions/setup-java/releases/tag/v5) | test_bazel.yml |
| `actions/setup-python` | [`39cd149`](39cd14951b), [`e797f83`](e797f83bcb) | [`a309ff8`](a309ff8b42) | [Release](https://github.com/actions/setup-python/releases/tag/v6) | test_python.yml, test_upb.yml |
| `actions/stale` | [`b69b346`](b69b346013) | [`9971854`](997185467f) | [Release](https://github.com/actions/stale/releases/tag/v10) | janitor.yml |
| `actions/upload-artifact` | [`5076954`](50769540e7), [`v4`](https://github.com/actions/upload-artifact/releases/tag/v4) | [`b7c566a`](b7c566a772) | [Release](https://github.com/actions/upload-artifact/releases/tag/v6) | scorecard.yml, test_cpp.yml, test_php_ext.yml, test_ruby.yml, test_upb.yml |

## Context

Per [GitHub's announcement](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/), Node 20 is being deprecated and runners will begin using Node 24 by default starting March 4th, 2026.

### Why this matters

- **Node 20 EOL**: April 2026
- **Node 24 default**: March 4th, 2026
- **Action**: Update to latest action versions that support Node 24

### Security Note

Actions that were previously pinned to commit SHAs remain pinned to SHAs (updated to the latest release SHA) to maintain the security benefits of immutable references.

### Testing

These changes only affect CI/CD workflow configurations and should not impact application functionality. The workflows should be tested by running them on a branch before merging.

Closes #25572

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/25572 from salmanmkc:upgrade-github-actions-node24 ef77dcfa4f
PiperOrigin-RevId: 874140973
2026-02-23 10:27:07 -08:00
Rachel Goldfinger
f988fc7b32 Add coverage for windows. Fix cc_proto_library and proto_common_compile bazel tests from new windows tests.
PiperOrigin-RevId: 872879086
2026-02-20 06:54:42 -08:00
Rachel Goldfinger
b379867a67 Remove Bazel test from upb macOS and macOS Intel tests.
PiperOrigin-RevId: 872431180
2026-02-19 09:22:24 -08:00
Rachel Goldfinger
f9f32d2800 Breaking Change: Change @protobuf//bazel/flags:prefer_prebuilt_proto flag to True.
PiperOrigin-RevId: 871890409
2026-02-18 08:48:25 -08:00
Joshua Haberman
1816758069 Dropped support for Bazel 7.
This was previously announced here: https://protobuf.dev/support/migration/#dropped-bazel-7-support

#test-continuous

PiperOrigin-RevId: 870256373
2026-02-14 14:50:17 -08:00
Joshua Haberman
1ea2c4bab5 Updated release builds to use Bazel 8 and platforms.
Bazel 8 no longer supports legacy toolchains, so all of our release toolchains have been updated to use platforms.

#test-continuous

PiperOrigin-RevId: 870017275
2026-02-13 21:47:47 -08:00
Tony Liao
15811028e4 Update the path to prebuilt_tool_integrity.bzl after refactor.
This filed is moved to a different location in c24d4c4e47
but the path in the script was not updated.

PiperOrigin-RevId: 866910938
2026-02-07 08:58:29 -08:00
Protobuf Team Bot
52efc0b2bb Update Ruby 4.0 test Docker image and enable continuous tests.
This docker image includes ruby gems v4.0.5, which includes https://github.com/ruby/rubygems/pull/9245 that fixes building multiple native extensions.

PiperOrigin-RevId: 863399053
2026-01-30 14:44:44 -08:00
Rachel Goldfinger
6556a4ea26 Update php and php_ext tests to include 8.5.0
PiperOrigin-RevId: 862834652
2026-01-29 11:53:41 -08:00
Rachel Goldfinger
2390c69218 Move bazel tests from upb to bazel
PiperOrigin-RevId: 862308886
2026-01-28 11:00:57 -08:00
Joshua Haberman
c24d4c4e47 Moved prebuilt-related Bazel files to standard locations.
- Standard location for flags is `bazel/flags/`
- Standard location for OSS-only internal files is `bazel/private/oss`.

PiperOrigin-RevId: 862267301
2026-01-28 09:24:02 -08:00
Sandy Zhang
16d64853a8 Set days-before-close to -1 for "wait for user action"
Seems like an oversight since the default is 7 when unset.

Example:
https://github.com/protocolbuffers/protobuf/issues/25194
PiperOrigin-RevId: 861822507
2026-01-27 11:51:59 -08:00
Rachel Goldfinger
2837647d40 add 34.x to test_release_branches
#test-continuous

PiperOrigin-RevId: 861721626
2026-01-27 07:57:53 -08:00
Sandy Zhang
74a5ee1852 Fix release_bazel_module.yaml to disable release notes generation.
This ends up editing our release notes to add a giant junk "What's Changed" section.

PiperOrigin-RevId: 861302462
2026-01-26 12:18:54 -08:00
Sandy Zhang
c157747a31 Fix release_bazel_module.yaml to set prerelease correctly.
Theoretically, I think this would've edit our release for -RCs from prerelease to release but we didn't hit this for v34.0-rc1 since the release was set to immutable.

PiperOrigin-RevId: 859735492
2026-01-22 12:56:35 -08:00
Protobuf Team Bot
783da0a940 Disable constinit on MSVC for static library builds
38927bf2b9 cleaned up the constinit suppressions based on our understanding of the Windows/MSVC limitations at the time. It turns out this was incomplete and, by restoring constinit on static library MSVC builds, we broke something.

On MSVC, but not clang-cl, the workaround must extend to static library builds too. Although pointers to same-dll symbols are fine and MSVC, with optimizations, will avoid a static initializer, it doesn't seem to consistently recognize it in the type systems, so we can't enforce constinit. See https://godbolt.org/z/cYeYaaWq5

On MSVC, but not clang-cl, the above workaround must extend to static library builds too. MSVC can avoid a global constructor when initializing structures containing pointers to same-dll symbols, it relies on the optimizer for this, so we can't enforce constinit. This limitation does not apply to constexpr. See https://godbolt.org/z/hsT9e3zs4

Add a Windows Bazel C++20 build configuration, which would have caught this.

PiperOrigin-RevId: 858801389
2026-01-20 16:25:34 -08:00
Frederik Spang
93f4eba258 Support Ruby 4.0 (#25051)
Note: Building the protobuf gem with versions of rubygems that include https://github.com/ruby/rubygems/pull/8569 is broken due to the issue reported in https://github.com/ruby/rubygems/issues/9244. Workaround is to use a rubygems version below 3.7.0 to build the gem.

Closes #25051

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/25051 from frederikspang:main 83f91c76e1
PiperOrigin-RevId: 858713403
2026-01-20 12:54:12 -08:00
Rachel Goldfinger
5d29dcaed0 Raise minimum php version to 8.2.0. Drop tests for 8.1.
#test-continuous

PiperOrigin-RevId: 856246964
2026-01-14 09:32:06 -08:00
Jie Luo
b046c9a30e Drop Bazel 7 tests for bazel, python, partially java partially cpp.
C++, java, PHP, Ruby and upb still have some cross-compilation Bazel 7 tests.

PiperOrigin-RevId: 855994201
2026-01-13 20:11:39 -08:00
Sandy Zhang
c8fb912fed Make BCR PRs non-draft by default.
The `publish-to-bcr` workflow now sets `draft: false` when creating the pull request in the Bazel Central Registry fork. This ensures the PR is immediately ready for review.

PiperOrigin-RevId: 855330394
2026-01-12 12:13:19 -08:00
Jie Luo
bbc9dd9e8a Drop Python 3.9 support
Python 3.9 reached its official End-of-Life (EOL) on October 31, 2025
https://devguide.python.org/versions/

PiperOrigin-RevId: 854341311
2026-01-09 14:20:23 -08:00
Mikita Belahlazau
4f076d951f Add metadata annotations for generated Python protobuf symbols.
The pyi generator now includes Kythe annotations for:
*   Extension field constants (e.g., `EXTENSION_FIELD`).
*   Field number constants (e.g., `STRING_FIELD_FIELD_NUMBER`).
*   `Create` methods in generated Stubby client classes.

These annotations allow the Python indexer to link these generated symbols back to their definitions in the `.proto` files.

PiperOrigin-RevId: 852971617
2026-01-06 16:05:56 -08:00
Protobuf Team Bot
ae67a4c195 Internal version update.
PiperOrigin-RevId: 852733884
2026-01-06 05:27:44 -08:00
Mike Kruskal
9d60ddf810 Don't ignore platform requirements
#test-continuous

This locks new non-hermetic versions of dependencies that don't work.  In this case, webmozart/assert was upgraded from 1.12.1 to 2.0.0

PiperOrigin-RevId: 848269028
2025-12-23 12:51:32 -08:00
Hong Shin
66a9ea7540 update min mac ver from 11 to 12
PiperOrigin-RevId: 845329387
2025-12-16 10:18:38 -08:00
Alex Eagle
cc23698b48 feat(bazel): wire up prebuilt protoc toolchain (#24115)
Upstreamed from my https://github.com/aspect-build/toolchains_protoc which provided this feature outside the protobuf repo.

Adds:
- private API: module_extension + tag `protoc.prebuilt_toolchain` to provide and register toolchain for bzlmod users
- WORKSPACE users can live with the inconvenience of having to create toolchains themselves
- example of proto_library rule with intentionally non-functional cc toolchain, exercising the feature

This needs work with @thesayyn to:
- constrain users to choosing a protoc version agreeing with design doc
https://docs.google.com/document/d/16N-eU-0zHbWmxEuaUAIFTJwQLekIXZ8zIC3K4XDr20E/edit
- also register lang toolchains when the flag is enabled

Work towards #19558

Closes #24115

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/24115 from protocolbuffers:alexeagle/use_prebuilt_toolchain b18667d82c
PiperOrigin-RevId: 844859103
2025-12-15 11:43:45 -08:00
Eric Salo
7b9fecae65 protobuf: update php from macos-13 to macos-15-intel
PiperOrigin-RevId: 842419205
2025-12-09 15:25:32 -08:00
Protobuf Team Bot
54a48aa45c Add tests for the C++ PyProto_API interface
PiperOrigin-RevId: 841620471
2025-12-07 23:59:35 -08:00
Eric Salo
0d704ffbf5 Update GitHub Actions to use macOS-14 (again).
See https://github.com/actions/runner-images/issues/13046.

#test-continuous

PiperOrigin-RevId: 836365578
2025-11-24 14:34:28 -08:00
Eric Salo
244e1ea61c Delete redundant ARM tests
PiperOrigin-RevId: 836244136
2025-11-24 08:58:09 -08:00
Eric Salo
a6fbd40d7e Update GitHub Actions to use macOS-14.
See https://github.com/actions/runner-images/issues/13046.

#test-continuous

PiperOrigin-RevId: 835391347
2025-11-21 16:05:25 -08:00
Mike Kruskal
01331f9e51 Automated rollback of commit efacad9581.
PiperOrigin-RevId: 833991536
2025-11-18 15:24:59 -08:00
Sebastian Pipping
88261aab23 CMake: Stop building tests by default (related to #20539) (#24373)
#test-continuous

Related to #20539, in reaction to https://github.com/protocolbuffers/protobuf/issues/20539#issuecomment-3505491543

CC @mkruskal-google

Closes #24373

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/24373 from hartwork:cmake-stop-building-tests-by-default 6be6748d4b
PiperOrigin-RevId: 831962270
2025-11-13 12:30:47 -08:00
Protobuf Team Bot
efacad9581 Automated rollback of commit cdce70d4e5.
PiperOrigin-RevId: 830414655
2025-11-10 06:39:26 -08:00
Protobuf Team Bot
cdce70d4e5 Automated rollback of commit 4e5868ec4a.
PiperOrigin-RevId: 829733308
2025-11-08 00:21:09 -08:00
Protobuf Team Bot
4e5868ec4a Automated rollback of commit a531523b86.
PiperOrigin-RevId: 829708292
2025-11-07 22:29:47 -08:00
Mike Kruskal
a531523b86 Define a generated registry for tracking linked-in extensions.
#test-continuous

This behaves similarly to the generated extension registry in other languages.  A global ref-counted (lock-free thread-safe) singleton registry can be lazily constructed from the linker array data produced by gencode.  For now, this is simply used to preserve custom options on the descriptors in our DefPool.

This design makes heavy use of various non-standard C extensions.  It expands on the pre-existing linker arrays used for extensions, adding weak constructors to register all of the extensions linked into each binary.  This was tested and works with clang and gcc, and a similar approach was implemented for MSVC.  For unsupported compilers or architectures, the generated registry will be unpopulated.

PiperOrigin-RevId: 829698259
2025-11-07 21:45:59 -08:00
Jie Luo
8e3543177e Add Python 3.14 test coverage
#test-continuous

PiperOrigin-RevId: 829211258
2025-11-06 19:21:19 -08:00
Mike Kruskal
fe46538025 Upgrade our non-release upb tests to Bazel 8
#test-continuous

We're dropping support for Bazel 7, but our release infra currently still depends on it.

PiperOrigin-RevId: 825735925
2025-10-29 15:37:05 -07:00
Joshua Haberman
2c90abbf75 Fasttable: normalized the calling convention
After this CL, fasttable functions always take `upb_DecodeFastNext` as a parameter, instead of having some functions return it.

This helps functions compose more easily, since all functions follow the same calling convention.

Also simplified and normalized the set of `upb_DecodeFastNext` values.

PiperOrigin-RevId: 825705376
2025-10-29 14:20:05 -07:00
zhangskz
fab448d12d Update issue templates 2025-10-29 17:16:52 -04:00
Mike Kruskal
f764f12dc8 Upgrade to protobuf-ci v5
PiperOrigin-RevId: 825653280
2025-10-29 12:14:52 -07:00
Alex Eagle
75196cd244 refactor(bazel): publish a separate .tar.gz (#24065)
Avoids mutating the protobuf tar.gz file that's created prior to the Bazel Central Registry publishing step.

Closes #24065

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/24065 from protocolbuffers:alexeagle/bazel-tar c7df27ec9f
PiperOrigin-RevId: 821727519
2025-10-20 11:24:35 -07:00
Alex Eagle
ef15a939c1 fix(publish-to-bcr): disable attestations (#24018)
FYI @loosebazooka

Closes #24018

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/24018 from protocolbuffers:alexeagle-patch-1 7cad53e5f3
PiperOrigin-RevId: 820357884
2025-10-16 12:53:06 -07:00