Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/lts-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
# This should run for only pull requests for this repository's LTS branches
pull_request:
branches:
- '*-sp'
name: LTS Library Test
jobs:
lts-library-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Only the downstream of this libraries are needed
repository:
- beam
# - google-api-java-client This does not work for LTS BOM Test due to bintray decommission
- google-auth-library-java
- google-maps-services-java
- grpc-java
- java-bigquery
- java-bigtable-hbase
- java-monitoring
- java-pubsub
- java-spanner
- java-storage
- java-trace
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- id: find_library_version
name: Find the library version in this branch
run: |
sudo apt-get install libxml2-utils
VERSION=`sed -e 's/xmlns="[^\s\\]*"//' pom.xml | xmllint --xpath '/project/version/text()' -`
echo "::set-output name=version::${VERSION}"
Comment on lines +32 to +37

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@elharo (a followup from yesterday's discussion) This command extracts the version from the root pom.xml. This configuration file no longer needs to specify a hard-coded version. The value is then used at the end of this file as version_override_value parameter.

(I tweaked the command from https://github.com/googleapis/java-cloud-bom/blob/8a45813a6590d3a25dcaad4fa5d6beaeb341b3d3/.kokoro/bom-upper-bounds-check.sh#L43)

This sed+xmllint approach should work for Yoshi repositories. Other projects, such as grpc-java and Beam, will have other regular expression to extract their versions.

- name: Install this repository's artifacts to local Maven repository
run: |
mvn --batch-mode --show-version --no-transfer-progress install \

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Is it possible to specify some strange version number (that would not conflict) when installing this artifact?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does {x-version-update:google-http-client-parent:current} help?

-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true
# The lts_tests branch has not merged to master but it hosts GitHub Actions.
- uses: GoogleCloudPlatform/cloud-opensource-java/lts-test@lts_tests
with:
repository: ${{ matrix.repository }}
version_override_key: http.version
version_override_value: ${{ steps.find_library_version.outputs.version }}
6 changes: 3 additions & 3 deletions google-http-client-android-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>google-http-client</groupId>
<artifactId>google-http-client-android-test</artifactId>
<name>Test project for google-http-client-android.</name>
<version>1.39.2</version><!-- {x-version-update:google-http-client-android-test:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-android-test:current} -->
<packaging>apk</packaging>

<build>
Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-android</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-android:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-android:current} -->
<exclusions>
<exclusion>
<artifactId>android</artifactId>
Expand All @@ -72,7 +72,7 @@
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-test</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-test:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-test:current} -->
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-android</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-android:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-android:current} -->
<name>Android Platform Extensions to the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-apache-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-apache-v2</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-apache-v2:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-apache-v2:current} -->
<name>Apache HTTP transport v2 for the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-appengine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-appengine</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-appengine:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-appengine:current} -->
<name>Google App Engine extensions to the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-assembly</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-assembly:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-assembly:current} -->
<packaging>pom</packaging>
<name>Assembly for the Google HTTP Client Library for Java</name>

Expand Down
22 changes: 11 additions & 11 deletions google-http-client-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-bom</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-bom:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-bom:current} -->
<packaging>pom</packaging>

<name>Google HTTP Client Library for Java BOM</name>
Expand Down Expand Up @@ -63,52 +63,52 @@
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-android</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-android:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-android:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-apache-v2</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-apache-v2:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-apache-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-appengine</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-appengine:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-appengine:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-findbugs</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-findbugs:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-findbugs:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-gson</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-gson:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-gson:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-jackson2:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-jackson2:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-protobuf</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-protobuf:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-protobuf:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-test</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-test:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-test:current} -->
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-xml</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-xml:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-xml:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-findbugs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-findbugs</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-findbugs:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-findbugs:current} -->
<name>Google APIs Client Library Findbugs custom plugin.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-gson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-gson</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-gson:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-gson:current} -->
<name>GSON extensions to the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-jackson2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-jackson2:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-jackson2:current} -->
<name>Jackson 2 extensions to the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-protobuf</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-protobuf:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-protobuf:current} -->
<name>Protocol Buffer extensions to the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-test</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-test:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-test:current} -->
<name>Shared classes used for testing of artifacts in the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client-xml</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-xml:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-xml:current} -->
<name>XML extensions to the Google HTTP Client Library for Java.</name>

<build>
Expand Down
4 changes: 2 additions & 2 deletions google-http-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>google-http-client</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client:current} -->
<name>Google HTTP Client Library for Java</name>
<description>
Google HTTP Client Library for Java. Functionality that works on all supported Java platforms,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ public HttpResponse execute() throws IOException {
executeException = null;

// run the interceptor
if (executeInterceptor != null) {
if (executeInterceptor == null) { // This code is wrong. Just for testing.
executeInterceptor.intercept(this);
Comment on lines +879 to 880

@suztomo suztomo May 5, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

google-cloud-storage's test threw NullPointerException correctly. Good.

Screen Shot 2021-05-05 at 17 00 57

@suztomo suztomo May 6, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

However, this approach does not work for Gradle projects such as "LTS Library Test / lts-library-test (beam)".

}
// build low-level HTTP request
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<packaging>pom</packaging>
<name>Parent for the Google HTTP Client Library for Java</name>
<description>Google HTTP Client Library for Java</description>
Expand Down Expand Up @@ -577,7 +577,7 @@
- google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here)
- Internally, update the default features.json file
-->
<project.http-client.version>1.39.2</project.http-client.version><!-- {x-version-update:google-http-client-parent:current} -->
<project.http-client.version>1.39.2-sp.2</project.http-client.version><!-- {x-version-update:google-http-client-parent:current} -->
<project.appengine.version>1.9.71</project.appengine.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.jsr305.version>3.0.2</project.jsr305.version>
Expand Down
2 changes: 1 addition & 1 deletion samples/dailymotion-simple-cmdline-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-parent</artifactId>
<version>1.39.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<version>1.39.2-sp.2</version><!-- {x-version-update:google-http-client-parent:current} -->
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>dailymotion-simple-cmdline-sample</artifactId>
Expand Down