Commit Graph

33 Commits

Author SHA1 Message Date
Eng Zer Jun 66075eab85
.github/workflows: Bump action major versions from Node16 to Node20 (#11476)
GitHub began the Node16 deprecation process a year ago [1][2]. This
commit updates all workflows to use the latest Node20 actions.

[1]: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
[2]: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
2024-08-22 12:01:02 +05:30
Eric Anderson 36e687f9d9 examples: Add bzlmod support
This also updates the version number of the grpc-java module as part of
the release process.
2024-07-23 08:32:13 -07:00
Eric Anderson 1d6f1f1b42 bazel: Verify Maven deps in bzlmod and WORKSPACE match
The text between the GRPC_DEPS_{START,END} must be identical in
formatting. Probably not a problem in general and not necessarily bad.
But it is simplistic.

Eric waking up this morning:
> We need more sed.
2024-04-04 14:05:05 -07:00
Keith Smiley d1890c0acc
bazel: Add support for bzlmod (#11046) 2024-04-04 08:36:55 -07:00
Eric Anderson ac62c8b055 Fix tests and warnings on Java 17
SelfSignedCertificate is not available on Java 17 because
OpenJdkSelfSignedCertGenerator is not available. This only impacted
tests.

AccessController is being removed, and these locations are doing simple
reflection which is unlikely to require it even when a security policy
is in effect. There's other places we do reflection without the
AccessController, so either no security policies care or the users can
update their policies to allow it.
2024-02-29 16:55:46 -08:00
Eric Anderson 55a9c012c3 Drop support for Bazel 5
Protobuf 25.0 drops support for Bazel 5. Bazel 7 is coming out very
soon, at which point we'd drop Bazel 5 anyway.
2023-12-07 10:06:42 -08:00
Eric Anderson 1638ce39f8 .github: Use checkout@v3 for Bazel
The other jobs were swapped to v3 in 38311e8730. Bazel was added later
with the older version.

This fixes the warning:
```
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
```
2023-08-03 07:28:22 -07:00
Eric Anderson 445efe7423 .github/workflows: Add Bazel CI
This will replace the kokoro-based CI. We need to upgrade the image
Kokoro runs on, but it is easier to add a GitHub Actions CI than to run
a one-off test on a new image with Kokoro.

A clean run takes 10 minutes and a cached run takes 8.5. So it is a
little bit slower than the 5.5 minutes on Kokoro, but still pretty
quick.
2023-04-13 15:12:47 -07:00
Eric Anderson 9af202fbd0 .github/workflows: Fix duplicate key in testing CI
This has been broken and not running tests since d580bd3 (just a few
days ago).
2023-04-13 14:30:31 -07:00
Eric Anderson d580bd3d1c .github/workflows: Save subproject reports on test failure
There was recently a failure with the Tomcat test in servlet/jakarta:
```
io.grpc.servlet.jakarta.TomcatInteropTest > pingPong FAILED
    java.lang.AssertionError at AbstractInteropTest.java:845
        Caused by: io.grpc.StatusRuntimeException at Status.java:539
...
* What went wrong:
Execution failed for task ':grpc-servlet-jakarta:tomcat10Test'.
> There were failing tests. See the report at: file:///home/runner/work/grpc-java/grpc-java/servlet/jakarta/build/reports/tests/tomcat10Test/index.html
```

But we couldn't get more details because servlet/jakarta didn't match
the artifact glob.
2023-04-11 12:03:00 -07:00
Eric Anderson db433ae372
.github/workflows: Pass COVERALLS_REPO_TOKEN to coveralls task (#9935)
The coveralls task has been silently failing since we migrated to GitHub
Actions, away form Travis-CI:
```
no COVERALLS_REPO_TOKEN environmental variable found

no available CI service
> Task :grpc-all:coveralls

BUILD SUCCESSFUL in 23s
7 actionable tasks: 1 executed, 6 up-to-date
```

We'd rather not deal with private tokens, but the Coveralls GitHub
Action [only supports lcov][1] which makes it unhelpful for Java.
Looking deeper, yep, we [aren't the only ones impacted][2]:

[1]: https://github.com/marketplace/actions/coveralls-github-action
[2]: https://github.com/coverallsapp/github-action/issues/22
2023-03-24 12:51:14 -07:00
Terry Wilson b5b7cacba9
Upgrade Android Gradle plugin to 7.4.0 (#9933)
This is the latest version of the plugin supported by the Gradle version
in use at the moment (7.6).

Note that this also upgrades the R8 optimizer to a version (4.0.48) that
now uses "full mode" optimization by default.

This also splits off Android projects to run under Java 11 (Gradle
plugin requirement) while the other projects continue to run under Java
8.
2023-03-08 11:18:27 -08:00
Eric Anderson 7e41d82b5a .github/workflows: Bump dessant/lock-threads to v4 2023-03-02 10:42:45 -08:00
Eric Anderson 38311e8730 .github/workflows: Bump action major versions
Almost all of these major version bumps are because they upgraded to
Node 16, which requires a new minimum version of the Runner (which
matters for those maintaining their own runners). The main outlier is
lock-threads, which changed the names of its input parameters.
2022-10-21 10:25:10 -07:00
ZHANG Dapeng 86b8b265ba
.github/workflows: publish test results for failed job
The GitHub Actions Linux Testing only reports limited information (can not see full stacktrace, time consumed, or stderr from child threads) when unit tests fail. Adding a step to upload the test report to Artifacts if the test fails. If the test is successful, no artifacts will be uploaded.
2022-01-05 10:31:22 -08:00
Eric Anderson 7cf0578176 .github/workflows: Bump codecov-action to v2
The codecov bash uploader is being replaced (supposedly partially for
security reasons, but it seems maintenance reasons are the real goal).
https://about.codecov.io/blog/codecov-uploader-deprecation-plan/

v1 uses the bash uploader. v2 uses the new uploader. The bash uploader
will begin seeing brownouts soon.
2021-10-13 10:37:31 -07:00
Eric Anderson 0e85737636 .github/workflows: Swap from adoptopenjdk to temurin
Adopt OpenJDK is longer seeing new releases, and instead has moved under
the Eclipse umbrella with Temurin releases.
https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/
https://github.com/actions/setup-java#supported-distributions

The adopt binaries still work, but won't see new versions.
2021-09-29 14:55:12 -07:00
Eric Anderson 79e75bace4
Port from Travis-CI to GitHub Actions
Travis-CI no longer has a free tier (only a free trial). That was a
major reason we used Travis-CI, so that external contributors would be
able to run the CI on their forks. Iterating on a Travis config in a
personal repo was also quite convenient. The other reason was that
Travis-CI was safe to run even with untrusted code.

Since the introduction of the permissions field in workflows, GitHub
Actions appears safe to run untrusted code and has a free tier for
external contributors. GitHub Actions and Google Cloud Build are the
main contenders for a Kokoro replacement, but Cloud Build isn't safe for
untrusted code. Instead of migrating to Travis-CI.com from
Travis-CI.org, let's migrate to GitHub Actions and gain some familiarity.

I've really appreciated Travis-CI.org and have wanted to pay for it for
years but wasn't about to give it write permission to the repo. I'm
disappointed to migrate off it, now that the permissions issues have
been sorted out.
2021-06-17 13:32:56 -07:00
Eric Anderson 005452f6cf Replace accidental U+FFFC with space in GH Action lock.yml 2021-06-03 07:43:50 -07:00
Eric Anderson 01a6364b05 Swap from the Lock GH App to lock-threads GH Action
The Lock App [is unhealthy][1]. GitHub Actions now has [a better
security model][2] such that we think we can safely use it.

The time of day to run the action was randomly generated.

[1]: https://github.com/dessant/lock-threads-app/issues/2
[2]: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
2021-06-02 15:51:12 -07:00
Eric Anderson a7792d3d14 Limit permissions to gradlew validator GH Action
I've already limited the grpc-wide setting to read-only access, but
limiting it explicitly here seems like a good idea; all workflows should
explicitly set their permissions since any action can implicitly access
the GITHUB_TOKEN.
2021-05-26 14:24:29 -07:00
Sean C. Sullivan d52b359631 enable Gradle wrapper validation
https://blog.gradle.org/gradle-wrapper-checksum-verification-github-action
2020-11-03 10:53:29 -08:00
Eric Anderson 2e1cd05d54 github: Remove bug label from newly filed bugs
We've been using the bug label for "confirmed" bugs. Many issues filed as bugs
turn out not to be bugs, but we've not generally remembered to remove the bug
label. This has been causing trouble for tracking bug closure rate, as the data
is now mostly garbage. This change is to put us back into our old flow where
confirmed bugs have the label.
2020-06-26 10:41:34 -05:00
Chengyuan Zhang be27d0ba8b
Revert "github: add Github workflow for Gradle wrapper validation (#6634)" (#6668)
This reverts commit 6548c6ff5e.
2020-01-31 15:32:44 -08:00
Chengyuan Zhang 6548c6ff5e
github: add Github workflow for Gradle wrapper validation (#6634) 2020-01-31 15:04:20 -08:00
Ran 03c75e180c
github: wrap non-title content into comment blocks. (#6331) 2019-10-24 10:02:44 -07:00
Jihun Cho e67fdb3af9
github: wrap question template in comment blocks (#6199) 2019-09-26 14:21:18 -07:00
Jihun Cho 5912d62019
github: update issue templates (#6191) 2019-09-25 13:44:01 -07:00
Eric Anderson 1f006959b0 github/lock.yml: Lock GitHub issues after 90 days
The earlier year was just for testing. Things are working as we'd hope.
Choosing 90 days for now. If an issue is closed at the beginning of a
release cycle, that gives release cycle + 6 weeks to upgrade, which
seems plenty. Worst-case, is users open a new issue referencing the old
one they found.
2018-09-28 09:48:13 -07:00
Eric Anderson 2653cf4d6b github/lock: Use reason "resolved", which is the default
What the "reason" means was explained in
https://github.com/grpc/grpc-java/pull/4862#issuecomment-423662264 , and
it's probably fair to accept the default.
2018-09-21 16:32:53 -07:00
Eric Anderson be04325a6a github/lock: Override some of the defaults before enabling
These are settings for the Lock app: https://github.com/apps/lock

We'll probably want to reduce the daysUntilLock to something lower, but
want to try it out first and a larger value will impact fewer issues.
365 is the default, but making it clear what setting we are using.

I disable the comment because I don't want notification noise. I disable
the resolved feature because I'm not quite sure what it is and I'm not
really looking for anything fancy.

The defaults can be found at
https://github.com/dessant/lock-threads/blob/master/src/schema.js
2018-09-21 11:14:37 -07:00
Carl Mastrangelo bb41e0a290
all: update github issue template 2017-11-16 18:43:19 -08:00
Carl Mastrangelo 91e61ec406 github: add an issue template
Fixes: #2393
2016-11-02 15:28:47 -07:00