Skip to content

Commit 62bdfa7

Browse files
authored
Merge pull request #683 from linode/dev
Release v5.55.0
2 parents 8bc7bbe + 5bab33a commit 62bdfa7

Some content is hidden

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

48 files changed

+1905
-401
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ updates:
99
directory: "/" # Location of package manifests
1010
schedule:
1111
interval: "daily"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "monthly"

.github/workflows/e2e-suite-windows.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ on:
22
pull_request:
33
workflow_dispatch:
44
inputs:
5-
test_path:
6-
description: "The path from 'test/integration' to the target to be tested, e.g. 'cli'"
5+
module:
6+
description: "The module from 'test/integration' to the target to be tested, e.g. 'cli, domains, events, etc'"
77
required: false
8+
run_long_tests:
9+
description: "Select True to run long tests, e.g. database, rebuild, etc"
10+
required: false
11+
type: choice
12+
options:
13+
- "True"
14+
- "False"
15+
default: "False"
816
sha:
917
description: 'The hash value of the commit.'
1018
required: true
@@ -21,13 +29,6 @@ jobs:
2129
github.event_name == 'workflow_dispatch' && inputs.sha != ''
2230

2331
steps:
24-
- uses: actions-ecosystem/action-regex-match@v2
25-
id: validate-tests
26-
with:
27-
text: ${{ inputs.test_path }}
28-
regex: '[^a-z0-9-:.\/_]' # Tests validation
29-
flags: gi
30-
3132
# Check out merge commit
3233
- name: Checkout PR
3334
uses: actions/checkout@v4
@@ -72,7 +73,7 @@ jobs:
7273
env:
7374
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7475

75-
- run: make INTEGRATION_TEST_PATH="${{ inputs.test_path }}" testint
76+
- run: make MODULE="${{ inputs.module }}" RUN_LONG_TESTS="${{ inputs.run_long_tests }}" testint
7677
env:
7778
LINODE_CLI_TOKEN: ${{ secrets.LINODE_TOKEN_2 }}
7879

.github/workflows/e2e-suite.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,47 @@ on:
1010
module:
1111
description: "The module from 'test/integration' to the target to be tested, e.g. 'cli, domains, events, etc'"
1212
required: false
13+
run_long_tests:
14+
description: "Select True to run long tests, e.g. database, rebuild, etc"
15+
required: false
16+
type: choice
17+
options:
18+
- "True"
19+
- "False"
20+
default: "False"
1321
sha:
1422
description: 'The hash value of the commit.'
1523
required: true
1624
default: ''
1725
pull_request_number:
1826
description: 'The number of the PR. Ensure sha value is provided'
1927
required: false
28+
openapi_spec_url:
29+
description: 'URL of the OpenAPI spec to use for the tests'
30+
required: false
31+
default: ''
32+
python-version:
33+
description: 'Specify Python version to use'
34+
required: false
35+
run-eol-python-version:
36+
description: 'Run EOL python version?'
37+
required: false
38+
default: 'false'
39+
type: choice
40+
options:
41+
- 'true'
42+
- 'false'
43+
2044
push:
2145
branches:
2246
- main
2347
- dev
2448

49+
env:
50+
DEFAULT_PYTHON_VERSION: "3.10"
51+
EOL_PYTHON_VERSION: "3.8"
52+
EXIT_STATUS: 0
53+
2554
jobs:
2655
integration_tests:
2756
name: Run integration tests on Ubuntu
@@ -74,7 +103,7 @@ jobs:
74103
- name: Setup Python
75104
uses: actions/setup-python@v4
76105
with:
77-
python-version: '3.x'
106+
python-version: ${{ inputs.run-eol-python-version == 'true' && env.EOL_PYTHON_VERSION || inputs.python-version || env.DEFAULT_PYTHON_VERSION }}
78107

79108
- name: Install Python dependencies and update cert
80109
run: |
@@ -83,7 +112,7 @@ jobs:
83112
pip install .[obj,dev]
84113
85114
- name: Install Package
86-
run: make install
115+
run: make install SPEC="${{ inputs.OPENAPI_SPEC_URL }}"
87116
env:
88117
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89118

@@ -95,7 +124,7 @@ jobs:
95124
run: |
96125
timestamp=$(date +'%Y%m%d%H%M')
97126
report_filename="${timestamp}_cli_test_report.xml"
98-
make testint TEST_ARGS="--junitxml=${report_filename}" MODULE="${{ inputs.module }}"
127+
make testint TEST_ARGS="--junitxml=${report_filename}" MODULE="${{ inputs.module }}" RUN_LONG_TESTS="${{ inputs.run_long_tests }}"
99128
env:
100129
LINODE_CLI_TOKEN: ${{ env.LINODE_CLI_TOKEN }}
101130

@@ -272,4 +301,4 @@ jobs:
272301
]
273302
}
274303
env:
275-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
304+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/checkout@v4
2222
-
2323
name: Run Labeler
24-
uses: crazy-max/ghaction-github-labeler@de749cf181958193cb7debf1a9c5bb28922f3e1b
24+
uses: crazy-max/ghaction-github-labeler@b54af0c25861143e7c8813d7cbbf46d2c341680c
2525
with:
2626
github-token: ${{ secrets.GITHUB_TOKEN }}
2727
yaml-file: .github/labels.yml

.github/workflows/publish-oci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
run: make requirements
2121

2222
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # pin@v2.2.0
23+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # pin@v3.2.0
2424

2525
- name: Set up Docker Buildx
2626
uses: docker/setup-buildx-action@ecf95283f03858871ff00b787d79c419715afc34 # pin@v2.7.0
2727

2828
- name: Login to Docker Hub
29-
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # pin@v2.2.0
29+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pin@v3.3.0
3030
with:
3131
username: ${{ secrets.DOCKERHUB_USERNAME }}
3232
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/remote-release-trigger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- name: Generate App Installation Token
1111
id: generate_token
12-
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # pin@v1
12+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # pin@v1
1313
with:
1414
app_id: ${{ secrets.CLI_RELEASE_APP_ID }}
1515
private_key: ${{ secrets.CLI_RELEASE_PRIVATE_KEY }}
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Get previous tag
2525
id: previoustag
26-
uses: WyriHaximus/github-action-get-previous-tag@385a2a0b6abf6c2efeb95adfac83d96d6f968e0c # pin@v1
26+
uses: WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce # pin@v1
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
jobs:
77
unit-tests-on-ubuntu:
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [ '3.9','3.10','3.11', '3.12' ]
912
steps:
1013
- name: Clone Repository
1114
uses: actions/checkout@v3
@@ -14,9 +17,9 @@ jobs:
1417
run: sudo apt-get update -y
1518

1619
- name: Setup Python
17-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
1821
with:
19-
python-version: '3.x'
22+
python-version: ${{ matrix.python-version }}
2023

2124
- name: Install Python wheel
2225
run: pip install wheel boto3

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ testunit:
7272
@orig_xdg_config_home=$${XDG_CONFIG_HOME:-}; \
7373
export LINODE_CLI_TEST_MODE=1 XDG_CONFIG_HOME=/tmp/linode/.config; \
7474
pytest -v tests/unit; \
75-
export XDG_CONFIG_HOME=$$orig_xdg_config_home
75+
exit_code=$$?; \
76+
export XDG_CONFIG_HOME=$$orig_xdg_config_home; \
77+
exit $$exit_code
7678

7779
.PHONY: testint
7880
testint:

linodecli/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,5 @@ def main(): # pylint: disable=too-many-branches,too-many-statements
230230
if parsed.help:
231231
print_help_action(cli, parsed.command, parsed.action)
232232
sys.exit(ExitCodes.SUCCESS)
233+
233234
cli.handle_command(parsed.command, parsed.action, args)

linodecli/api_request.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,13 @@ def _build_request_body(ctx, operation, parsed_args) -> Optional[str]:
259259
if ctx.defaults:
260260
parsed_args = ctx.config.update(parsed_args, operation.allowed_defaults)
261261

262+
param_names = {param.name for param in operation.params}
263+
262264
expanded_json = {}
263265

264266
# expand paths
265267
for k, v in vars(parsed_args).items():
266-
if v is None:
268+
if v is None or k in param_names:
267269
continue
268270

269271
cur = expanded_json

0 commit comments

Comments
 (0)