Skip to content

Commit df55bc5

Browse files
chore: Merge branch 'main' into error-on-loop
2 parents 77d922b + 76af210 commit df55bc5

37 files changed

+1009
-692
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @GoogleCloudPlatform/infra-db-sdk
1+
* @GoogleCloudPlatform/cloud-sql-connectors

.github/labels.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,72 +16,72 @@
1616
color: ededed
1717
description: ""
1818

19-
- name: 'type: bug'
19+
- name: "type: bug"
2020
color: db4437
21-
description: Error or flaw in code with unintended results or allowing sub-optimal
21+
description:
22+
Error or flaw in code with unintended results or allowing sub-optimal
2223
usage patterns.
23-
- name: 'type: cleanup'
24+
- name: "type: cleanup"
2425
color: c5def5
2526
description: An internal cleanup or hygiene concern.
26-
- name: 'type: docs'
27+
- name: "type: docs"
2728
color: 0000A0
2829
description: Improvement to the documentation for an API.
29-
- name: 'type: feature request'
30+
- name: "type: feature request"
3031
color: c5def5
3132
description: ‘Nice-to-have’ improvement, new feature or different behavior or design.
32-
- name: 'type: process'
33+
- name: "type: process"
3334
color: c5def5
3435
description: A process-related concern. May include testing, release, or the like.
35-
- name: 'type: question'
36+
- name: "type: question"
3637
color: c5def5
3738
description: Request for information or clarification.
3839

39-
- name: 'priority: p0'
40+
- name: "priority: p0"
4041
color: b60205
4142
description: Highest priority. Critical issue. P0 implies highest priority.
42-
- name: 'priority: p1'
43+
- name: "priority: p1"
4344
color: ffa03e
44-
description: Important issue which blocks shipping the next release. Will be fixed
45+
description:
46+
Important issue which blocks shipping the next release. Will be fixed
4547
prior to next release.
46-
- name: 'priority: p2'
48+
- name: "priority: p2"
4749
color: fef2c0
4850
description: Moderately-important priority. Fix may not be included in next release.
49-
- name: 'priority: p3'
51+
- name: "priority: p3"
5052
color: ffffc7
5153
description: Desirable enhancement or fix. May not be included in next release.
5254

5355
- name: automerge
5456
color: 00ff00
5557
description: Merge the pull request once unit tests and other checks pass.
56-
- name: 'automerge: exact'
58+
- name: "automerge: exact"
5759
color: 8dd517
58-
description: Summon MOG for automerging, but approvals need to be against the latest
60+
description:
61+
Summon MOG for automerging, but approvals need to be against the latest
5962
commit
6063
- name: do not merge
6164
color: d93f0b
62-
description: Indicates a pull request not ready for merge, due to either quality
65+
description:
66+
Indicates a pull request not ready for merge, due to either quality
6367
or timing.
6468

65-
- name: 'autorelease: pending'
69+
- name: "autorelease: pending"
6670
color: ededed
6771
description: Release please needs to do its work on this.
68-
- name: 'autorelease: triggered'
72+
- name: "autorelease: triggered"
6973
color: ededed
7074
description: Release please has triggered a release for this.
71-
- name: 'autorelease: tagged'
75+
- name: "autorelease: tagged"
7276
color: ededed
7377
description: Release please has completed a release for this.
7478

75-
- name: 'tests: run'
76-
color: 3DED97
77-
description: Label to trigger Github Action tests.
78-
79-
- name: 'flakybot: flaky'
79+
- name: "flakybot: flaky"
8080
color: 86d9d7
8181
description: Tells the Flaky Bot not to close or comment on this issue.
82-
- name: 'flakybot: quiet'
82+
- name: "flakybot: quiet"
8383
color: 86d9d7
8484
description: Tells the Flaky Bot to comment less.
85-
- name: 'flakybot: issue'
85+
- name: "flakybot: issue"
8686
color: a9f9f7
8787
description: An issue filed by the Flaky Bot. Should not be added manually.

.github/trusted-contribution.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,18 @@ name: "CodeQL"
1616

1717
on:
1818
push:
19-
branches: [ "main" ]
19+
branches: ["main"]
2020
pull_request:
21-
branches: [ "main" ]
21+
branches: ["main"]
2222
paths-ignore:
23-
- '**/*.md'
24-
- '**/*.txt'
25-
pull_request_target:
26-
types: [labeled]
27-
paths-ignore:
28-
- '**/*.md'
29-
- '**/*.txt'
23+
- "**/*.md"
24+
- "**/*.txt"
3025

3126
# Declare default permissions as read only.
3227
permissions: read-all
3328

3429
jobs:
3530
analyze:
36-
if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}"
3731
name: Analyze
3832
runs-on: ubuntu-latest
3933
permissions:
@@ -44,27 +38,24 @@ jobs:
4438
strategy:
4539
fail-fast: false
4640
matrix:
47-
language: [ 'python' ]
41+
language: ["python"]
4842

4943
steps:
50-
- name: Checkout repository
51-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
52-
with:
53-
ref: ${{ github.event.pull_request.head.sha }}
54-
repository: ${{ github.event.pull_request.head.repo.full_name }}
55-
56-
# Initializes the CodeQL tools for scanning.
57-
- name: Initialize CodeQL
58-
uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
59-
with:
60-
languages: ${{ matrix.language }}
61-
62-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
63-
# If this step fails, then you should remove it and run the build manually
64-
- name: Autobuild
65-
uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
66-
67-
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
69-
with:
70-
category: "/language:${{matrix.language}}"
44+
- name: Checkout repository
45+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
46+
47+
# Initializes the CodeQL tools for scanning.
48+
- name: Initialize CodeQL
49+
uses: github/codeql-action/init@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
50+
with:
51+
languages: ${{ matrix.language }}
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
54+
# If this step fails, then you should remove it and run the build manually
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
57+
58+
- name: Perform CodeQL Analysis
59+
uses: github/codeql-action/analyze@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
60+
with:
61+
category: "/language:${{matrix.language}}"

.github/workflows/coverage.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,23 @@
1515
name: Code Coverage
1616
on:
1717
pull_request:
18-
pull_request_target:
19-
types: [labeled]
2018

2119
# Declare default permissions as read only.
2220
permissions: read-all
2321

2422
jobs:
2523
coverage:
26-
if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}"
2724
runs-on: ubuntu-latest
28-
permissions:
29-
issues: write
30-
pull-requests: write
3125
steps:
32-
- name: Remove PR Label
33-
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
34-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
35-
with:
36-
github-token: ${{ secrets.GITHUB_TOKEN }}
37-
script: |
38-
try {
39-
await github.rest.issues.removeLabel({
40-
name: 'tests: run',
41-
owner: context.repo.owner,
42-
repo: context.repo.repo,
43-
issue_number: context.payload.pull_request.number
44-
});
45-
} catch (e) {
46-
console.log('Failed to remove label. Another job may have already removed it!');
47-
}
48-
4926
- name: Setup Python
50-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
27+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
5128
with:
5229
python-version: "3.10"
5330

5431
- run: pip install nox coverage
5532

5633
- name: Checkout base branch
57-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
34+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5835
with:
5936
ref: ${{ github.base_ref }}
6037

@@ -67,7 +44,7 @@ jobs:
6744
coverage erase
6845
6946
- name: Checkout PR branch
70-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
47+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
7148
with:
7249
ref: ${{ github.event.pull_request.head.sha }}
7350
repository: ${{ github.event.pull_request.head.repo.full_name }}

.github/workflows/labels.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
issues: write
2929
pull-requests: write
3030
steps:
31-
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
31+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3232
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
3333
env:
3434
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,51 +15,25 @@
1515
name: Lint
1616
on:
1717
pull_request:
18-
pull_request_target:
19-
types: [labeled]
2018

2119
# Declare default permissions as read only.
2220
permissions: read-all
2321

2422
jobs:
2523
lint:
26-
if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}"
2724
name: Run lint
2825
runs-on: ubuntu-latest
29-
permissions:
30-
issues: write
31-
pull-requests: write
3226
steps:
33-
- name: Remove PR Label
34-
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
35-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
36-
with:
37-
github-token: ${{ secrets.GITHUB_TOKEN }}
38-
script: |
39-
try {
40-
await github.rest.issues.removeLabel({
41-
name: 'tests: run',
42-
owner: context.repo.owner,
43-
repo: context.repo.repo,
44-
issue_number: context.payload.pull_request.number
45-
});
46-
} catch (e) {
47-
console.log('Failed to remove label. Another job may have already removed it!');
48-
}
49-
5027
- name: Setup Python
51-
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
28+
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
5229
with:
5330
python-version: "3.12"
54-
31+
5532
- name: Install nox
5633
run: pip install nox
5734

5835
- name: Checkout code
59-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
60-
with:
61-
ref: ${{ github.event.pull_request.head.sha }}
62-
repository: ${{ github.event.pull_request.head.repo.full_name }}
36+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
6337

6438
- name: Run nox lint session
6539
run: nox --sessions lint

.github/workflows/scorecard.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ on:
1818
branch_protection_rule:
1919
schedule:
2020
# weekly on Sunday
21-
- cron: '0 20 * * 0'
21+
- cron: "0 20 * * 0"
2222
push:
23-
branches: [ "main" ]
23+
branches: ["main"]
2424

2525
# Declare default permissions as read only.
2626
permissions: read-all
@@ -35,16 +35,16 @@ jobs:
3535

3636
steps:
3737
- name: "Checkout code"
38-
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
38+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3939
with:
4040
persist-credentials: false
4141

4242
- name: "Run analysis"
43-
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
43+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
4444
with:
4545
results_file: results.sarif
4646
results_format: sarif
47-
47+
4848
- name: Filter SARIF to skip false positives
4949
# filter out DangerousWorkflow alerts as they do not account for safe use of labels to trigger actions
5050
env:
@@ -53,18 +53,18 @@ jobs:
5353
SCORECARD_SKIPPED_RULE_IDS_JSON=$(echo $SCORECARD_SKIPPED_RULE_IDS | jq -cR 'split(",")')
5454
# Trim the SARIF file to remove false positive detections
5555
cat results.sarif | jq '.runs[].results |= map(select(.ruleId as $id | '$SCORECARD_SKIPPED_RULE_IDS_JSON' | all($id != .)))' > resultsFiltered.sarif
56-
56+
5757
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5858
# format to the repository Actions tab.
5959
- name: "Upload artifact"
60-
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
60+
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
6161
with:
6262
name: SARIF file
6363
path: results.sarif
6464
retention-days: 5
6565

6666
# Upload the results to GitHub's code scanning dashboard.
6767
- name: "Upload to code-scanning"
68-
uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7
68+
uses: github/codeql-action/upload-sarif@8214744c546c1e5c8f03dde8fab3a7353211988d # v3.26.7
6969
with:
7070
sarif_file: resultsFiltered.sarif

0 commit comments

Comments
 (0)