Skip to content

Commit

Permalink
Merge branch 'main' into gh-2043-java-dns-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmahapatra authored Aug 26, 2024
2 parents b5c6b97 + f269db8 commit b69274f
Show file tree
Hide file tree
Showing 22 changed files with 120 additions and 147 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/init@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually
- name: Autobuild
uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/autobuild@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/analyze@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up JDK 17
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: "zulu"
java-version: "17"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -57,14 +57,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/upload-sarif@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
with:
sarif_file: resultsFiltered.sarif
65 changes: 13 additions & 52 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,65 +40,26 @@ jobs:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: "zulu"
java-version: ${{matrix.java-version}}

- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
# only needed for Flakybot on periodic (schedule) and continuous (push) events
if: ${{ github.event_name == 'schedule' || github.event_name == 'push' }}
uses: google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2 # v2.1.4
with:
workload_identity_provider: ${{ vars.PROVIDER_NAME }}
service_account: ${{ vars.SERVICE_ACCOUNT }}
access_token_lifetime: 600s

- id: secrets
name: Get secrets
uses: google-github-actions/get-secretmanager-secrets@dc4a1392bad0fd60aee00bb2097e30ef07a1caae # v2.1.3
with:
secrets: |-
MYSQL_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_CONNECTION_NAME
MYSQL_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_USER
MYSQL_IAM_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_JAVA_IAM_CONNECTION_NAME
MYSQL_IAM_USER_JAVA:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_USER_IAM_JAVA
MYSQL_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_PASS
MYSQL_DB:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_DB
POSTGRES_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_CONNECTION_NAME
POSTGRES_IAM_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_IAM_CONNECTION_NAME
POSTGRES_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_USER
POSTGRES_IAM_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_USER_IAM_JAVA
POSTGRES_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_PASS
POSTGRES_DB:${{ vars.GOOGLE_CLOUD_PROJECT }}/POSTGRES_DB
SQLSERVER_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/SQLSERVER_CONNECTION_NAME
SQLSERVER_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/SQLSERVER_USER
SQLSERVER_PASS:${{ vars.GOOGLE_CLOUD_PROJECT }}/SQLSERVER_PASS
SQLSERVER_DB:${{ vars.GOOGLE_CLOUD_PROJECT }}/SQLSERVER_DB
IMPERSONATED_USER:${{ vars.GOOGLE_CLOUD_PROJECT }}/IMPERSONATED_USER
QUOTA_PROJECT:${{ vars.GOOGLE_CLOUD_PROJECT }}/QUOTA_PROJECT
- name: Run tests
env:
MYSQL_CONNECTION_NAME: "${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}"
MYSQL_USER: "${{ steps.secrets.outputs.MYSQL_USER }}"
MYSQL_IAM_CONNECTION_NAME: "${{ steps.secrets.outputs.MYSQL_IAM_CONNECTION_NAME }}"
MYSQL_IAM_USER: "${{ steps.secrets.outputs.MYSQL_IAM_USER_JAVA }}"
MYSQL_PASS: "${{ steps.secrets.outputs.MYSQL_PASS }}"
MYSQL_DB: "${{ steps.secrets.outputs.MYSQL_DB }}"
POSTGRES_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}"
POSTGRES_IAM_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_IAM_CONNECTION_NAME }}"
POSTGRES_USER: "${{ steps.secrets.outputs.POSTGRES_USER }}"
POSTGRES_IAM_USER: "${{ steps.secrets.outputs.POSTGRES_IAM_USER }}"
POSTGRES_PASS: "${{ steps.secrets.outputs.POSTGRES_PASS }}"
POSTGRES_DB: "${{ steps.secrets.outputs.POSTGRES_DB }}"
SQLSERVER_CONNECTION_NAME: "${{ steps.secrets.outputs.SQLSERVER_CONNECTION_NAME }}"
SQLSERVER_USER: "${{ steps.secrets.outputs.SQLSERVER_USER }}"
SQLSERVER_PASS: "${{ steps.secrets.outputs.SQLSERVER_PASS }}"
SQLSERVER_DB: "${{ steps.secrets.outputs.SQLSERVER_DB }}"
IMPERSONATED_USER: "${{ steps.secrets.outputs.IMPERSONATED_USER }}"
QUOTA_PROJECT: "${{ steps.secrets.outputs.QUOTA_PROJECT }}"
JOB_TYPE: test
run: ./.github/scripts/run_tests.sh
shell: bash
Expand Down Expand Up @@ -144,25 +105,25 @@ jobs:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: "zulu"
java-version: ${{matrix.java-version}}

- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
uses: google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2 # v2.1.4
with:
workload_identity_provider: ${{ vars.PROVIDER_NAME }}
service_account: ${{ vars.SERVICE_ACCOUNT }}
access_token_lifetime: 600s

- id: secrets
name: Get secrets
uses: google-github-actions/get-secretmanager-secrets@dc4a1392bad0fd60aee00bb2097e30ef07a1caae # v2.1.3
uses: google-github-actions/get-secretmanager-secrets@95a0b09b8348ef3d02c68c6ba5662a037e78d713 # v2.1.4
with:
secrets: |-
MYSQL_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_CONNECTION_NAME
Expand Down Expand Up @@ -241,10 +202,10 @@ jobs:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up GraalVM
uses: graalvm/setup-graalvm@2911b2304bee2c2f59b9a67bf45f025a6b6de4b1 # v1.2.2
uses: graalvm/setup-graalvm@22cc13fe88ef133134b3798e128fb208df55e1f5 # v1.2.3
with:
java-version: "21"
distribution: "graalvm-community"
Expand All @@ -253,15 +214,15 @@ jobs:

- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@71fee32a0bb7e97b4d33d548e7d957010649d8fa # v2.1.3
uses: google-github-actions/auth@f112390a2df9932162083945e46d439060d66ec2 # v2.1.4
with:
workload_identity_provider: ${{ vars.PROVIDER_NAME }}
service_account: ${{ vars.SERVICE_ACCOUNT }}
access_token_lifetime: 600s

- id: secrets
name: Get secrets
uses: google-github-actions/get-secretmanager-secrets@dc4a1392bad0fd60aee00bb2097e30ef07a1caae # v2.1.3
uses: google-github-actions/get-secretmanager-secrets@95a0b09b8348ef3d02c68c6ba5662a037e78d713 # v2.1.4
with:
secrets: |-
MYSQL_CONNECTION_NAME:${{ vars.GOOGLE_CLOUD_PROJECT }}/MYSQL_CONNECTION_NAME
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.1
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [1.20.0](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/compare/v1.19.1...v1.20.0) (2024-08-14)


### Features

* Retry API calls that return a 5xx error. Fixes [#2029](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/2029). ([#2041](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/2041)) ([d76e892](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/commit/d76e8926f8f8ed2e5a8be952cec22cc77fe3b6d3))


### Dependencies

* Update Non-major dependencies ([#2037](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/2037)) ([b5e9b50](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/commit/b5e9b505e834b171615ca3128ea608b640fa6319))

## [1.19.1](https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/compare/v1.19.0...v1.19.1) (2024-07-10)


Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<parent>
<groupId>com.google.cloud.sql</groupId>
<artifactId>jdbc-socket-factory-parent</artifactId>
<version>1.19.2-SNAPSHOT</version><!-- {x-version-update:jdbc-socket-factory-parent:current} -->
<version>1.20.0</version><!-- {x-version-update:jdbc-socket-factory-parent:current} -->
</parent>
<artifactId>jdbc-socket-factory-core</artifactId>
<version>1.19.2-SNAPSHOT</version><!-- {x-version-update:jdbc-socket-factory-core:current} -->
<version>1.20.0</version><!-- {x-version-update:jdbc-socket-factory-core:current} -->
<packaging>jar</packaging>

<name>Cloud SQL Core Socket Factory (Core Library, don't depend on this directly)</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.Collections;
import org.junit.Test;

public class ServiceAccountImpersonatingCredentialFactoryTest {
public class ServiceAccountImpersonatingCredentialFactoryIntegrationTests {

@Test
public void testImpersonatedCredentialsWithMultipleAccounts() {
Expand Down
16 changes: 8 additions & 8 deletions docs/jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Maven
<dependency>
    <groupId>com.google.cloud.sql</groupId>
    <artifactId>mysql-socket-factory-connector-j-8</artifactId>
    <version>1.19.1</version>
    <version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:mysql-socket-factory-connector-j-8:1.19.1'
compile 'com.google.cloud.sql:mysql-socket-factory-connector-j-8:1.20.0'
```

<!-- {x-version-update-end} -->
Expand All @@ -37,14 +37,14 @@ Maven
<dependency>
    <groupId>com.google.cloud.sql</groupId>
    <artifactId>mariadb-socket-factory</artifactId>
    <version>1.19.1</version>
    <version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:mariadb-socket-factory:1.19.1'
compile 'com.google.cloud.sql:mariadb-socket-factory:1.20.0'
```

**Note:** Also include the JDBC Driver for
Expand All @@ -60,14 +60,14 @@ Maven
<dependency>
    <groupId>com.google.cloud.sql</groupId>
    <artifactId>postgres-socket-factory</artifactId>
    <version>1.19.1</version>
    <version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:postgres-socket-factory:1.19.1'
compile 'com.google.cloud.sql:postgres-socket-factory:1.20.0'
```

**Note:** Also include the JDBC Driver for
Expand All @@ -83,14 +83,14 @@ Maven
<dependency>
    <groupId>com.google.cloud.sql</groupId>
    <artifactId>cloud-sql-connector-jdbc-sqlserver</artifactId>
    <version>1.19.1</version>
    <version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:1.19.1'
compile 'com.google.cloud.sql:cloud-sql-connector-jdbc-sqlserver:1.20.0'
```

**Note:** Also include the JDBC Driver for SQL
Expand Down
16 changes: 8 additions & 8 deletions docs/r2dbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Maven
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>cloud-sql-connector-r2dbc-mysql</artifactId>
<version>1.19.1</version>
<version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:cloud-sql-connector-r2dbc-mysql:1.19.1'
compile 'com.google.cloud.sql:cloud-sql-connector-r2dbc-mysql:1.20.0'
```

**Note:** Also include the R2DBC Driver for
Expand All @@ -40,14 +40,14 @@ Maven
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>cloud-sql-connector-r2dbc-mariadb</artifactId>
<version>1.19.1</version>
<version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud:cloud-sql-connector-r2dbc-mariadb:1.19.1'
compile 'com.google.cloud:cloud-sql-connector-r2dbc-mariadb:1.20.0'
```

**Note:** Also include the R2DBC Driver for
Expand All @@ -63,14 +63,14 @@ Maven
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>cloud-sql-connector-r2dbc-postgres</artifactId>
<version>1.19.1</version>
<version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres:1.19.1'
compile 'com.google.cloud.sql:cloud-sql-connector-r2dbc-postgres:1.20.0'
```

**Note:** Also include the R2DBC Driver for
Expand All @@ -86,14 +86,14 @@ Maven
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>cloud-sql-connector-r2dbc-sqlserver</artifactId>
<version>1.19.1</version>
<version>1.20.0</version>
</dependency>
```

Gradle

```gradle
compile 'com.google.cloud.sql:cloud-sql-connector-r2dbc-sqlserver:1.19.1'
compile 'com.google.cloud.sql:cloud-sql-connector-r2dbc-sqlserver:1.20.0'
```

**Note:** Also include the R2DBC Driver for SQL
Expand Down
Loading

0 comments on commit b69274f

Please sign in to comment.