Skip to content

Commit 578b735

Browse files
Merge pull request #835 from linode/dev
Release v5.64.0
2 parents 1ebbdb8 + b6a1b6a commit 578b735

File tree

14 files changed

+844
-15
lines changed

14 files changed

+844
-15
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
uses: actions/checkout@v5
2727

2828
- name: Initialize CodeQL
29-
uses: github/codeql-action/init@v3
29+
uses: github/codeql-action/init@v4
3030
with:
3131
languages: ${{ matrix.language }}
3232
build-mode: ${{ matrix.build-mode }}
3333

3434
- name: Perform CodeQL Analysis
35-
uses: github/codeql-action/analyze@v3
35+
uses: github/codeql-action/analyze@v4
3636
with:
3737
category: "/language:${{matrix.language}}"

.github/workflows/e2e-suite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127

128128
- name: Upload Test Report as Artifact
129129
if: always()
130-
uses: actions/upload-artifact@v4
130+
uses: actions/upload-artifact@v5
131131
with:
132132
name: test-report-file
133133
if-no-files-found: ignore
@@ -243,7 +243,7 @@ jobs:
243243
submodules: 'recursive'
244244

245245
- name: Download test report
246-
uses: actions/download-artifact@v5
246+
uses: actions/download-artifact@v6
247247
with:
248248
name: test-report-file
249249

.github/workflows/publish-wiki.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v5
18-
- uses: Andrew-Chen-Wang/github-wiki-action@2c80c13ee98aa43683bd77973ef4916e2eedf817 # [email protected].1
18+
- uses: Andrew-Chen-Wang/github-wiki-action@6448478bd55f1f3f752c93af8ac03207eccc3213 # [email protected].3

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
commit_sha: ${{ steps.calculate_head_sha.outputs.commit_sha }}
6767

6868
- name: Release
69-
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # pin@v2.3.3
69+
uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # pin@v2.4.1
7070
with:
7171
target_commitish: 'main'
7272
token: ${{ steps.generate_token.outputs.token }}

linodecli/plugins/get-kubeconfig.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from linodecli.exit_codes import ExitCodes
1717
from linodecli.help_formatter import SortingHelpFormatter
18+
from linodecli.plugins import inherit_plugin_args
1819

1920
PLUGIN_BASE = "linode-cli get-kubeconfig"
2021

@@ -23,8 +24,10 @@ def call(args, context):
2324
"""
2425
The entrypoint for this plugin
2526
"""
26-
parser = argparse.ArgumentParser(
27-
PLUGIN_BASE, add_help=True, formatter_class=SortingHelpFormatter
27+
parser = inherit_plugin_args(
28+
argparse.ArgumentParser(
29+
PLUGIN_BASE, add_help=True, formatter_class=SortingHelpFormatter
30+
)
2831
)
2932

3033
group = parser.add_mutually_exclusive_group()

tests/integration/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ def create_vpc_w_subnet():
215215
vpc_label,
216216
"--region",
217217
region,
218+
# "--ipv6.range", TODO: Uncomment after VPC Dual Stack is ready to ship
219+
# "auto",
218220
"--subnets.ipv4",
219221
"10.0.0.0/24",
220222
"--subnets.label",

tests/integration/database/test_database_engine_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def test_mysql_engine_config_view():
497497
binlog_retention = mysql_config[0]["binlog_retention_period"]
498498
assert binlog_retention["type"] == "integer"
499499
assert binlog_retention["minimum"] == 600
500-
assert binlog_retention["maximum"] == 604800
500+
assert binlog_retention["maximum"] == 9007199254740991
501501
assert binlog_retention["requires_restart"] is False
502502

503503
mysql_settings = mysql_config[0]["mysql"]

tests/integration/helpers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
import random
3+
import re
34
import subprocess
45
import time
56
from string import ascii_lowercase
@@ -27,6 +28,8 @@
2728
"domains",
2829
"events",
2930
"image",
31+
"images",
32+
"image-sharegroups",
3033
"image-upload",
3134
"firewalls",
3235
"kernels",
@@ -204,3 +207,9 @@ def get_random_region_with_caps(
204207
matching_region_ids = [region["id"] for region in matching_regions]
205208

206209
return random.choice(matching_region_ids) if matching_region_ids else None
210+
211+
212+
def assert_help_actions_list(expected_actions, help_output):
213+
output_actions = re.findall(r"│\s(\S+(?:,\s)?\S+)\s*│", help_output)
214+
for expected_action in expected_actions:
215+
assert expected_action in output_actions

tests/integration/monitor/test_alerts.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,35 @@
33
from tests.integration.helpers import (
44
BASE_CMDS,
55
assert_headers_in_lines,
6+
assert_help_actions_list,
67
delete_target_id,
78
exec_test_command,
89
get_random_text,
910
retry_exec_test_command_with_delay,
1011
)
1112

1213

14+
def test_help_alerts():
15+
output = exec_test_command(
16+
BASE_CMDS["alerts"]
17+
+ [
18+
"--help",
19+
"--text",
20+
"--delimiter=,",
21+
]
22+
)
23+
24+
actions = [
25+
"channels-list",
26+
"definition-create",
27+
"definition-delete",
28+
"definition-update",
29+
"definition-view",
30+
"definitions-list-all",
31+
]
32+
assert_help_actions_list(actions, output)
33+
34+
1335
def test_channels_list():
1436
res = exec_test_command(
1537
BASE_CMDS["alerts"] + ["channels-list", "--text", "--delimiter=,"]
@@ -77,6 +99,22 @@ def test_alerts_definition_create(get_channel_id, get_service_type):
7799
)
78100

79101

102+
def test_list_alert_definitions_for_service_type(get_service_type):
103+
service_type = get_service_type
104+
output = exec_test_command(
105+
BASE_CMDS["alerts"]
106+
+ [
107+
"service-definitions-list",
108+
service_type,
109+
"--text",
110+
"--delimiter=,",
111+
]
112+
)
113+
114+
headers = ["class", "created", "label", "severity", "service_type"]
115+
assert_headers_in_lines(headers, output.splitlines())
116+
117+
80118
def test_alerts_list():
81119
res = exec_test_command(
82120
BASE_CMDS["alerts"]

tests/integration/monitor/test_metrics.py

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import pytest
22

3+
from linodecli.exit_codes import ExitCodes
34
from tests.integration.helpers import (
45
BASE_CMDS,
56
assert_headers_in_lines,
7+
exec_failing_test_command,
68
exec_test_command,
79
)
810

@@ -62,12 +64,12 @@ def test_service_list():
6264

6365

6466
def test_service_view(get_service_type):
65-
dashboard_id = get_service_type
67+
service_type = get_service_type
6668
res = exec_test_command(
6769
BASE_CMDS["monitor"]
6870
+ [
6971
"service-view",
70-
dashboard_id,
72+
service_type,
7173
"--text",
7274
"--delimiter=,",
7375
]
@@ -79,12 +81,12 @@ def test_service_view(get_service_type):
7981

8082

8183
def test_dashboard_service_type_list(get_service_type):
82-
dashboard_id = get_service_type
84+
service_type = get_service_type
8385
res = exec_test_command(
8486
BASE_CMDS["monitor"]
8587
+ [
8688
"dashboards-list",
87-
dashboard_id,
89+
service_type,
8890
"--text",
8991
"--delimiter=,",
9092
]
@@ -96,12 +98,12 @@ def test_dashboard_service_type_list(get_service_type):
9698

9799

98100
def test_metrics_list(get_service_type):
99-
dashboard_id = get_service_type
101+
service_type = get_service_type
100102
res = exec_test_command(
101103
BASE_CMDS["monitor"]
102104
+ [
103105
"metrics-list",
104-
dashboard_id,
106+
service_type,
105107
"--text",
106108
"--delimiter=,",
107109
]
@@ -117,3 +119,21 @@ def test_metrics_list(get_service_type):
117119
"scrape_interval",
118120
]
119121
assert_headers_in_lines(headers, lines)
122+
123+
124+
def test_try_create_token_with_not_existing_entity(get_service_type):
125+
service_type = get_service_type
126+
output = exec_failing_test_command(
127+
BASE_CMDS["monitor"]
128+
+ [
129+
"token-get",
130+
service_type,
131+
"--entity_ids",
132+
"99999999999",
133+
"--text",
134+
"--delimiter=,",
135+
],
136+
expected_code=ExitCodes.REQUEST_FAILED,
137+
)
138+
assert "Request failed: 403" in output
139+
assert "The following entity_ids are not valid - [99999999999]" in output

0 commit comments

Comments
 (0)