Skip to content

Commit 91fde06

Browse files
committed
Merge branch 'dev' into proj/aclp-linode-alerts
# Conflicts: # linode_api4/groups/linode.py # linode_api4/objects/linode.py # test/integration/conftest.py # test/unit/objects/linode_test.py
2 parents 9fb4c1e + 0a1619f commit 91fde06

133 files changed

Lines changed: 7592 additions & 1051 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/labels.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
- name: breaking-change
2727
description: for breaking changes in the changelog.
2828
color: ff0000
29+
- name: security
30+
description: for security fixes and improvements in the changelog.
31+
color: AA1111
32+
- name: community-contribution
33+
description: contributions from the community.
34+
color: 22ee47
35+
- name: hotfix
36+
description: urgent fixes for production issues.
37+
color: ff0000
2938
- name: ignore-for-release
3039
description: PRs you do not want to render in the changelog
3140
color: 7b8eac

‎.github/release.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ changelog:
99
- title: ⚠️ Breaking Change
1010
labels:
1111
- breaking-change
12+
- title: 🔒 Security Fixes
13+
labels:
14+
- security
1215
- title: 🐛 Bug Fixes
1316
labels:
1417
- bugfix

‎.github/workflows/ci.yml‎

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,40 @@ on:
1212
jobs:
1313
lint:
1414
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: read
1518
steps:
19+
# Enforce TPT-1234: prefix on PR titles, with the following exemptions:
20+
# - PRs labeled 'dependencies' (e.g. Dependabot PRs)
21+
# - PRs labeled 'hotfix' (urgent fixes that may not have a ticket)
22+
# - PRs labeled 'community-contribution' (external contributors without TPT tickets)
23+
# - PRs labeled 'ignore-for-release' (release PRs that don't need a ticket prefix)
24+
- name: Validate PR Title
25+
if: github.event_name == 'pull_request'
26+
uses: amannn/action-semantic-pull-request@v6
27+
with:
28+
types: |
29+
TPT-\d+
30+
requireScope: false
31+
# Override the default header pattern to allow hyphens and digits in the type
32+
# (e.g. "TPT-4298: Description"). The default pattern only matches word
33+
# characters (\w) which excludes hyphens.
34+
headerPattern: '^([\w-]+):\s?(.*)$'
35+
headerPatternCorrespondence: type, subject
36+
ignoreLabels: |
37+
dependencies
38+
hotfix
39+
community-contribution
40+
ignore-for-release
41+
env:
42+
GITHUB_TOKEN: ${{ github.token }}
43+
1644
- name: checkout repo
17-
uses: actions/checkout@v6
45+
uses: actions/checkout@v7
1846

1947
- name: setup python 3
20-
uses: actions/setup-python@v6
48+
uses: actions/setup-python@v7
2149
with:
2250
python-version: '3.x'
2351

@@ -31,13 +59,13 @@ jobs:
3159
runs-on: ubuntu-latest
3260
strategy:
3361
matrix:
34-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
62+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
3563
steps:
36-
- uses: actions/checkout@v6
37-
- uses: actions/setup-python@v6
64+
- uses: actions/checkout@v7
65+
- uses: actions/setup-python@v7
3866
with:
3967
python-version: ${{ matrix.python-version }}
4068
- name: Run tests
4169
run: |
42-
pip install ".[test]"
43-
tox
70+
pip install ".[unit-test]"
71+
make test-unit
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Clean Release Notes
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
clean-release-notes:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- name: Remove ticket prefixes from release notes
15+
uses: actions/github-script@v9
16+
with:
17+
script: |
18+
const release = context.payload.release;
19+
20+
let body = release.body;
21+
22+
if (!body) {
23+
console.log("Release body empty, nothing to clean.");
24+
return;
25+
}
26+
27+
// Remove ticket prefixes like "TPT-1234: " or "TPT-1234:"
28+
body = body.replace(/TPT-\d+:\s*/g, '');
29+
30+
await github.rest.repos.updateRelease({
31+
owner: context.repo.owner,
32+
repo: context.repo.repo,
33+
release_id: release.id,
34+
body: body
35+
});
36+
37+
console.log("Release notes cleaned.");

‎.github/workflows/codeql.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
build-mode: none
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@v6
26+
uses: actions/checkout@v7
2727

2828
- name: Initialize CodeQL
2929
uses: github/codeql-action/init@v4

‎.github/workflows/dependency-review.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: 'Checkout repository'
14-
uses: actions/checkout@v6
14+
uses: actions/checkout@v7
1515
- name: 'Dependency Review'
16-
uses: actions/dependency-review-action@v4
16+
uses: actions/dependency-review-action@v5
1717
with:
1818
comment-summary-in-pr: on-failure

‎.github/workflows/e2e-test-pr.yml‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ on:
22
pull_request:
33
workflow_dispatch:
44
inputs:
5+
run_aclp_logs_stream_tests:
6+
description: 'Set this parameter to "true" to run ACLP logs stream related test cases'
7+
required: false
8+
default: 'false'
9+
type: choice
10+
options:
11+
- 'true'
12+
- 'false'
513
run_db_fork_tests:
614
description: 'Set this parameter to "true" to run fork database related test cases'
715
required: false
@@ -56,7 +64,7 @@ jobs:
5664

5765
# Check out merge commit
5866
- name: Checkout PR
59-
uses: actions/checkout@v6
67+
uses: actions/checkout@v7
6068
with:
6169
ref: ${{ inputs.sha }}
6270
fetch-depth: 0
@@ -88,7 +96,7 @@ jobs:
8896
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8997

9098
- name: Setup Python
91-
uses: actions/setup-python@v6
99+
uses: actions/setup-python@v7
92100
with:
93101
python-version: '3.x'
94102

@@ -104,9 +112,13 @@ jobs:
104112
run: |
105113
timestamp=$(date +'%Y%m%d%H%M')
106114
report_filename="${timestamp}_sdk_test_report.xml"
107-
make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_ARGS="--junitxml=${report_filename}" TEST_SUITE="${{ github.event.inputs.test_suite }}"
115+
make test-int RUN_DB_FORK_TESTS="$RUN_DB_FORK_TESTS" RUN_DB_TESTS="$RUN_DB_TESTS" RUN_ACLP_LOGS_STREAM_TESTS="$RUN_ACLP_LOGS_STREAM_TESTS" TEST_ARGS="--junitxml=${report_filename}" TEST_SUITE="$TEST_SUITE"
108116
env:
109117
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
118+
RUN_DB_FORK_TESTS: ${{ github.event.inputs.run_db_fork_tests }}
119+
RUN_DB_TESTS: ${{ github.event.inputs.run_db_tests }}
120+
RUN_ACLP_LOGS_STREAM_TESTS: ${{ github.event.inputs.run_aclp_logs_stream_tests }}
121+
TEST_SUITE: ${{ github.event.inputs.test_suite }}
110122

111123
- name: Upload test results
112124
if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true'))
@@ -123,7 +135,7 @@ jobs:
123135
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
124136
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
125137

126-
- uses: actions/github-script@v8
138+
- uses: actions/github-script@v9
127139
id: update-check-run
128140
if: ${{ inputs.pull_request_number != '' && fromJson(steps.commit-hash.outputs.data).repository.pullRequest.headRef.target.oid == inputs.sha }}
129141
env:
@@ -158,7 +170,7 @@ jobs:
158170

159171
steps:
160172
- name: Checkout code
161-
uses: actions/checkout@v6
173+
uses: actions/checkout@v7
162174
with:
163175
fetch-depth: 0
164176
submodules: 'recursive'
@@ -184,7 +196,7 @@ jobs:
184196

185197
steps:
186198
- name: Set up Python
187-
uses: actions/setup-python@v6
199+
uses: actions/setup-python@v7
188200
with:
189201
python-version: '3.x'
190202

‎.github/workflows/e2e-test.yml‎

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ name: Integration Tests
33
on:
44
workflow_dispatch:
55
inputs:
6+
run_aclp_logs_stream_tests:
7+
description: 'Set this parameter to "true" to run ACLP logs stream related test cases'
8+
required: false
9+
default: 'false'
10+
type: choice
11+
options:
12+
- 'true'
13+
- 'false'
614
run_db_fork_tests:
715
description: 'Set this parameter to "true" to run fork database related test cases'
816
required: false
@@ -55,8 +63,8 @@ on:
5563
- dev
5664

5765
env:
58-
DEFAULT_PYTHON_VERSION: "3.10"
59-
EOL_PYTHON_VERSION: "3.9"
66+
DEFAULT_PYTHON_VERSION: "3.13"
67+
EOL_PYTHON_VERSION: "3.10"
6068
EXIT_STATUS: 0
6169

6270
jobs:
@@ -65,21 +73,21 @@ jobs:
6573
steps:
6674
- name: Clone Repository with SHA
6775
if: ${{ inputs.sha != '' }}
68-
uses: actions/checkout@v6
76+
uses: actions/checkout@v7
6977
with:
7078
fetch-depth: 0
7179
submodules: 'recursive'
7280
ref: ${{ inputs.sha }}
7381

7482
- name: Clone Repository without SHA
7583
if: ${{ inputs.sha == '' }}
76-
uses: actions/checkout@v6
84+
uses: actions/checkout@v7
7785
with:
7886
fetch-depth: 0
7987
submodules: 'recursive'
8088

8189
- name: Setup Python
82-
uses: actions/setup-python@v6
90+
uses: actions/setup-python@v7
8391
with:
8492
python-version: ${{ inputs.run-eol-python-version == 'true' && env.EOL_PYTHON_VERSION || inputs.python-version || env.DEFAULT_PYTHON_VERSION }}
8593

@@ -99,13 +107,17 @@ jobs:
99107
run: |
100108
timestamp=$(date +'%Y%m%d%H%M')
101109
report_filename="${timestamp}_sdk_test_report.xml"
102-
make test-int RUN_DB_FORK_TESTS=${{ github.event.inputs.run_db_fork_tests }} RUN_DB_TESTS=${{ github.event.inputs.run_db_tests }} TEST_SUITE="${{ github.event.inputs.test_suite }}" TEST_ARGS="--junitxml=${report_filename}"
110+
make test-int RUN_DB_FORK_TESTS="$RUN_DB_FORK_TESTS" RUN_DB_TESTS="$RUN_DB_TESTS" RUN_ACLP_LOGS_STREAM_TESTS="$RUN_ACLP_LOGS_STREAM_TESTS" TEST_SUITE="$TEST_SUITE" TEST_ARGS="--junitxml=${report_filename}"
103111
env:
104112
LINODE_TOKEN: ${{ env.LINODE_TOKEN }}
113+
RUN_DB_FORK_TESTS: ${{ github.event.inputs.run_db_fork_tests }}
114+
RUN_DB_TESTS: ${{ github.event.inputs.run_db_tests }}
115+
RUN_ACLP_LOGS_STREAM_TESTS: ${{ github.event.inputs.run_aclp_logs_stream_tests }}
116+
TEST_SUITE: ${{ github.event.inputs.test_suite }}
105117

106118
- name: Upload Test Report as Artifact
107119
if: always()
108-
uses: actions/upload-artifact@v6
120+
uses: actions/upload-artifact@v7
109121
with:
110122
name: test-report-file
111123
if-no-files-found: ignore
@@ -119,7 +131,7 @@ jobs:
119131

120132
steps:
121133
- name: Checkout code
122-
uses: actions/checkout@v6
134+
uses: actions/checkout@v7
123135
with:
124136
fetch-depth: 0
125137
submodules: 'recursive'
@@ -149,7 +161,7 @@ jobs:
149161

150162
steps:
151163
- name: Set up Python
152-
uses: actions/setup-python@v6
164+
uses: actions/setup-python@v7
153165
with:
154166
python-version: '3.x'
155167

@@ -187,18 +199,18 @@ jobs:
187199

188200
steps:
189201
- name: Checkout code
190-
uses: actions/checkout@v6
202+
uses: actions/checkout@v7
191203
with:
192204
fetch-depth: 0
193205
submodules: 'recursive'
194206

195207
- name: Download test report
196-
uses: actions/download-artifact@v7
208+
uses: actions/download-artifact@v8
197209
with:
198210
name: test-report-file
199211

200212
- name: Set up Python
201-
uses: actions/setup-python@v6
213+
uses: actions/setup-python@v7
202214
with:
203215
python-version: '3.x'
204216

@@ -241,7 +253,7 @@ jobs:
241253
steps:
242254
- name: Notify Slack
243255
id: main_message
244-
uses: slackapi/slack-github-action@v2.1.1
256+
uses: slackapi/slack-github-action@v4
245257
with:
246258
method: chat.postMessage
247259
token: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -273,7 +285,7 @@ jobs:
273285
274286
- name: Test summary thread
275287
if: success()
276-
uses: slackapi/slack-github-action@v2.1.1
288+
uses: slackapi/slack-github-action@v4
277289
with:
278290
method: chat.postMessage
279291
token: ${{ secrets.SLACK_BOT_TOKEN }}

‎.github/workflows/labeler.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
steps:
1919
-
2020
name: Checkout
21-
uses: actions/checkout@v6
21+
uses: actions/checkout@v7
2222
-
2323
name: Run Labeler
24-
uses: crazy-max/ghaction-github-labeler@24d110aa46a59976b8a7f35518cb7f14f434c916
24+
uses: crazy-max/ghaction-github-labeler@548a7c3603594ec17c819e1239f281a3b801ab4d
2525
with:
2626
github-token: ${{ secrets.GITHUB_TOKEN }}
2727
yaml-file: .github/labels.yml

‎.github/workflows/nightly-smoke-tests.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919

2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@v7
2323
with:
2424
ref: dev
2525

2626
- name: Set up Python
27-
uses: actions/setup-python@v6
27+
uses: actions/setup-python@v7
2828
with:
2929
python-version: '3.x'
3030

@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Notify Slack
4747
if: always() && github.repository == 'linode/linode_api4-python'
48-
uses: slackapi/slack-github-action@v2.1.1
48+
uses: slackapi/slack-github-action@v4
4949
with:
5050
method: chat.postMessage
5151
token: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)