The test wrappers were another way to document nonconformant behaviour between
different python backends. We can achieve the same by removing the wrapper
script and adding an if-condition in the test itself based on
api_implementation.Type(). Since we already do that for nonconformance between
pure Python vs. C++ backends, this change makes it easier to look for UPB
nonconformance instead of going through another layer of indirection.
Since this is the last remaining test file in the pb_unit_tests directory, I
have removed the entire directory. Future UPB tests will be in the same
directory as C++ and pure python implementations, namely:
//python/google/protobuf/internal.
Temporarily, we will need to hardcode the migrated test name in test_upb.yml
because not all tests under google.protobuf.internal support UPB yet.
(UPB testing for selected tests are added in 21e9aa6cac).
The reflection_test is a slightly more complicated test. In this commit I've
removed exemption of testParsingNestedClass in reflection_test. A follow-up
commit will ensure further conformance within the reflection_test. There are
quite a few if-conditions that were added to skip certain checks due to
nonconformant behavior -- they seem to no longer apply.
PiperOrigin-RevId: 712943652
The test wrappers were another way to document nonconformant behaviour between
different python backends. We can achieve the same by removing the wrapper
script and adding an if-condition in the test itself based on
api_implementation.Type(). Since we already do that for nonconformance between
pure Python vs. C++ backends, this change makes it easier to look for UPB
nonconformance instead of going through another layer of indirection.
Temporarily, we will need to hardcode the migrated test name in test_upb.yml
because not all tests under google.protobuf.internal support UPB yet.
(UPB testing for selected tests are added in 21e9aa6cac).
PiperOrigin-RevId: 712672890
The test wrappers were another way to document nonconformant behaviour between
different python backends. We can achieve the same by removing the wrapper
script and adding an if-condition in the test itself based on
api_implementation.Type(). Since we already do that for nonconformance between
pure Python vs. C++ backends, this change makes it easier to look for UPB
nonconformance instead of going through another layer of indirection.
Temporarily, we will need to hardcode the migrated test name in test_upb.yml
because not all tests under google.protobuf.internal support UPB yet.
(UPB testing for selected tests are added in 21e9aa6cac).
PiperOrigin-RevId: 711837521
This will help us avoid further bugs like #19735, where we're typically not very aware of how our files get installed as long as everything builds. With these tests in place, we will need to manually update the golden files whenever we add a new file to users' installations.
PiperOrigin-RevId: 709134471
I've been gradually moving the location of our UPB tests to make them "more
default" (see an example here:
a02ec0f353)
It turns out that reduced some of our open-source coverage around UPB python
unit tests. In this commit, I temporarily hard-code the tests I've migrated,
and eventually I'll change it into a wildcard expansion to be more robust. We
can't do wildcards right now because not all tests in the
google.protobuf.internal namespace support UPB by default yet.
#test-continuous
PiperOrigin-RevId: 707661811
The main branch was upgraded to use C++17 after the 29.0 branch cut, in commit
fe535930d3
There are still stale references to C++14 in the code, build chain, and
READMEs. This commit cleans up the stale configs and settings.
PiperOrigin-RevId: 706000867
Migrate all tests to run on bazel 7 and fix errors that came up in the process. 30.x will no longer guarantee support for bazel 6.
#test-continuous
PiperOrigin-RevId: 703590770
Some of the more complex GHA were invoking inline bash scripts without setting `-e`, meaning that failures would go unnoticed.
#test-continuous
PiperOrigin-RevId: 702413176
Upgrading to rules_rust 0.54.1 seems to have fixed some of our Rust linking
problems, but not all, so this change adds back in the
`--@rules_rust//rust/settings:experimental_use_cc_common_link=True` flag.
This fixes some local build errors like the following:
```
$ bazel build //rust/test/shared:bad_names_cpp_test
...
= note: bazel-out/k8-fastbuild/bin/rust/test/shared/_ambiguous_libs/bad_names_cpp_test/libport-330124825.a(port.pic.o):port.cc:function google::protobuf::internal::CounterMap():(.text+0xe6): error: undefined reference to 'atexit'
```
PiperOrigin-RevId: 702380176
Enable Bazel 7 macOS test coverage which otherwise fails with
```
Undefined symbols for architecture arm64:
"_PyModule_AddIntConstant", referenced from:
_PyInit__api_implementation in api_implementation.o
"_PyModule_Create2", referenced from:
_PyInit__api_implementation in api_implementation.o
"__Py_Dealloc", referenced from:
_PyInit__api_implementation in api_implementation.o
ld: symbol(s) not found for architecture arm64
```
Fixes https://github.com/protocolbuffers/protobuf/issues/19454
#test-continuous
PiperOrigin-RevId: 702375059
This will have the side effect of upgrading the Rust version we test against to
1.82.0.
This should fix some build issues caused by Bazel trying to use two separate
linkers, one for for Rust and one for C++. The workaround for that was setting
`--@rules_rust//rust/settings:experimental_use_cc_common_link=True`, but this
upgrade makes that unnecessary.
PiperOrigin-RevId: 702349267
Instead of fetching dependencies by default, we will first look for a local installation and only fetch as a fallback. Two new options are added for forcing either of these behaviors. protobuf_FORCE_FETCH_DEPENDENCIES will always fetch dependencies, and protobuf_PREVENT_FETCH_DEPENDENCIES will never do so.
#test-continuous
PiperOrigin-RevId: 693898394
These were already being grouped because we group by branch name for scheduled workflow runs. By not canceling in-progress runs, a single stalled execution could block our CI indefinitely.
PiperOrigin-RevId: 692298661
macos-12 runner image is deprecated and is EOL 12/3/24 per https://github.com/actions/runner-images/issues/10721
Note that Python 3.8 is EOL and these tests should also be dropped / upgraded in
favor of 3.9 soon anyways.
#test-continuous
PiperOrigin-RevId: 687002433
This also prevents the validate_yaml script from erroring when trying to log that a step is mishandling continuous-run / continuous-prefix
PiperOrigin-RevId: 686952188
This flips the default behavior to "fetch", downloading local copies of required dependencies. This can be disabled by setting `-Dprotobuf_FETCH_DEPENDENCIES=OFF`, in which case we will look for a local installation using find_package. Setting `-Dprotobuf_ABSL_PROVIDER=package` will continue to have the same behavior as before.
See https://protobuf.dev/news/2024-10-02/#replace-cmake-submods for more details.
#test-continuous
PiperOrigin-RevId: 686649864
This ports upb's WORKSPACE scraping logic to protobuf, and allows us to dynamically fetch our dependencies at the exact same pinned version as in Bazel via protobuf_FETCH_DEPENDENCIES=ON. This is mostly for development purposes, and is preferable to git submodules. In a later cl we will flip the default behavior to "package"
#test-continuous
PiperOrigin-RevId: 686265348
Bumps [shivammathur/setup-php](https://github.com/shivammathur/setup-php) from 2.30.2 to 2.31.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/shivammathur/setup-php/releases">shivammathur/setup-php's releases</a>.</em></p>
<blockquote>
<h2>2.31.1</h2>
<h2>Changelog</h2>
<ul>
<li>
<p>Fix installing PECL extensions on Windows with a build version <a href="https://redirect.github.com/shivammathur/setup-php/issues/855">#855</a></p>
</li>
<li>
<p>Fix cache support for ioncube extension <a href="https://redirect.github.com/shivammathur/setup-php/issues/856">#856</a></p>
</li>
<li>
<p>Updated Node.js dependencies.</p>
</li>
</ul>
<p>For the complete list of changes, please refer to the <a href="https://github.com/shivammathur/setup-php/compare/2.31.0...2.31.1">Full Changelog</a></p>
<!-- raw HTML omitted -->
<h2>2.31.0</h2>
<h2>Changelog</h2>
<ul>
<li>
<p>Added support for a fallback mirror for <code>ondrej/php</code> PPA when launchpad is down (<a href="https://redirect.github.com/shivammathur/setup-php/issues/834">#834</a>).</p>
</li>
<li>
<p>Fixed installing packages on self-hosted environments with existing conf files (<a href="https://redirect.github.com/shivammathur/setup-php/issues/852">#852</a>).</p>
</li>
<li>
<p>Fixed support for <code>oci8</code> and <code>pdo_oci</code> extensions on <code>ubuntu-24.04</code>.</p>
</li>
<li>
<p>Fixed support for <code>couchbase</code> extension on <code>ubuntu-24.04</code>.</p>
</li>
<li>
<p>Fixed support for <code>ubuntu-24.04</code> after <code>apt-fast</code> was dropped from the GA images.</p>
</li>
<li>
<p>Fixed support for <code>firebird</code> extension on <code>macos-14</code></p>
</li>
<li>
<p>Fixed support for <code>blackfire</code> extension on <code>macos-14</code>.</p>
</li>
<li>
<p>Fixed support for <code>relay</code> extension.</p>
</li>
<li>
<p>Fixed support for <code>phalcon</code> extension for PHP 7.4 on Ubuntu.</p>
</li>
<li>
<p>Updated Node.js dependencies.</p>
</li>
</ul>
<p>For the complete list of changes, please refer to the <a href="https://github.com/shivammathur/setup-php/compare/2.30.5...2.31.0">Full Changelog</a></p>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c541c155ee"><code>c541c15</code></a> Bump version 2.31.1</li>
<li><a href="afff805ea3"><code>afff805</code></a> Fix cache support for ioncube</li>
<li><a href="594bd591ec"><code>594bd59</code></a> Fix version regex in Add-Extension</li>
<li><a href="2e947f1f69"><code>2e947f1</code></a> Bump version to 2.31.0</li>
<li><a href="2a5212466c"><code>2a52124</code></a> Add fallback mirror for php PPA when launchpad is down</li>
<li><a href="9c28f9ba58"><code>9c28f9b</code></a> Fix support for phalcon on PHP 7.4</li>
<li><a href="b9f1db485f"><code>b9f1db4</code></a> Improve support for firebird</li>
<li><a href="588b5da142"><code>588b5da</code></a> Fix support for couchbase on Ubuntu 24.04</li>
<li><a href="a0edbac27b"><code>a0edbac</code></a> Fix support for blackfire</li>
<li><a href="606ac25b84"><code>606ac25</code></a> Fix oci extension support on Ubuntu 24.04</li>
<li>Additional commits viewable in <a href="8872c784b0...c541c155ee">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Closes#17855
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/17855 from protocolbuffers:dependabot/github_actions/shivammathur/setup-php-2.31.1 5cdf92ee64
PiperOrigin-RevId: 684962209