Skip to content

Commit 7ec2a66

Browse files
authored
Merge branch 'linode:dev' into dev
2 parents 0fea538 + 6dc0564 commit 7ec2a66

14 files changed

Lines changed: 55 additions & 26 deletions

File tree

.github/pull_request_template.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@
77
**What are the steps to reproduce the issue or verify the changes?**
88

99
**How do I run the relevant unit/integration tests?**
10-
11-
## 📷 Preview
12-
13-
**If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.**

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ on:
2727
pull_request_number:
2828
description: 'The number of the PR.'
2929
required: false
30+
test_report_upload:
31+
description: 'Indicates whether to upload the test report to object storage. Defaults to "false"'
32+
required: false
33+
default: 'false'
34+
type: choice
35+
options:
36+
- 'true'
37+
- 'false'
3038

3139
name: PR E2E Tests
3240

@@ -101,7 +109,7 @@ jobs:
101109
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
102110

103111
- name: Upload test results
104-
if: always()
112+
if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true'))
105113
run: |
106114
filename=$(ls | grep -E '^[0-9]{12}_sdk_test_report\.xml$')
107115
python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \

.github/workflows/e2e-test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ on:
4141
options:
4242
- 'true'
4343
- 'false'
44+
test_report_upload:
45+
description: 'Indicates whether to upload the test report to object storage. Defaults to "false"'
46+
type: choice
47+
required: false
48+
default: 'false'
49+
options:
50+
- 'true'
51+
- 'false'
4452
push:
4553
branches:
4654
- main
@@ -172,7 +180,8 @@ jobs:
172180
process-upload-report:
173181
runs-on: ubuntu-latest
174182
needs: [integration-tests]
175-
if: always() && github.repository == 'linode/linode_api4-python' # Run even if integration tests fail and only on main repository
183+
# Run even if integration tests fail on main repository AND push event OR test_report_upload is true in case of manual run
184+
if: always() && github.repository == 'linode/linode_api4-python' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true'))
176185
outputs:
177186
summary: ${{ steps.set-test-summary.outputs.summary }}
178187

@@ -271,4 +280,4 @@ jobs:
271280
payload: |
272281
channel: ${{ secrets.SLACK_CHANNEL_ID }}
273282
thread_ts: "${{ steps.main_message.outputs.ts }}"
274-
text: "${{ needs.process-upload-report.outputs.summary }}"
283+
text: "${{ needs.process-upload-report.outputs.summary }}"

linode_api4/groups/linode.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ def instance_create(
335335
:type network_helper: bool
336336
:param maintenance_policy: The slug of the maintenance policy to apply during maintenance.
337337
If not provided, the default policy (linode/migrate) will be applied.
338-
NOTE: This field is in beta and may only
339-
function if base_url is set to `https://api.linode.com/v4beta`.
340338
:type maintenance_policy: str
341339
342340
:returns: A new Instance object, or a tuple containing the new Instance and

linode_api4/groups/maintenance.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class MaintenanceGroup(Group):
99

1010
def maintenance_policies(self):
1111
"""
12-
.. note:: This endpoint is in beta. This will only function if base_url is set to `https://api.linode.com/v4beta`.
13-
1412
Returns a collection of MaintenancePolicy objects representing
1513
available maintenance policies that can be applied to Linodes
1614

linode_api4/objects/account.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,7 @@ class AccountSettings(Base):
218218
"object_storage": Property(),
219219
"backups_enabled": Property(mutable=True),
220220
"interfaces_for_new_linodes": Property(mutable=True),
221-
"maintenance_policy": Property(
222-
mutable=True
223-
), # Note: This field is only available when using v4beta.
221+
"maintenance_policy": Property(mutable=True),
224222
}
225223

226224

@@ -249,7 +247,7 @@ class Event(Base):
249247
"duration": Property(),
250248
"secondary_entity": Property(),
251249
"message": Property(),
252-
"maintenance_policy_set": Property(), # Note: This field is only available when using v4beta.
250+
"maintenance_policy_set": Property(),
253251
"description": Property(),
254252
"source": Property(),
255253
"not_before": Property(is_datetime=True),

linode_api4/objects/linode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,7 @@ class Instance(Base):
800800
"lke_cluster_id": Property(),
801801
"capabilities": Property(unordered=True),
802802
"interface_generation": Property(),
803-
"maintenance_policy": Property(
804-
mutable=True
805-
), # Note: This field is only available when using v4beta.
803+
"maintenance_policy": Property(mutable=True),
806804
"locks": Property(unordered=True),
807805
}
808806

linode_api4/objects/nodebalancer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ class NodeBalancer(Base):
252252
"transfer": Property(),
253253
"tags": Property(mutable=True, unordered=True),
254254
"client_udp_sess_throttle": Property(mutable=True),
255+
"locks": Property(unordered=True),
255256
}
256257

257258
# create derived objects

test/fixtures/nodebalancers.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"updated": "2018-01-01T00:01:01",
1111
"label": "balancer123456",
1212
"client_conn_throttle": 0,
13-
"tags": ["something"]
13+
"tags": ["something"],
14+
"locks": ["cannot_delete_with_subresources"]
1415
},
1516
{
1617
"created": "2018-01-01T00:01:01",
@@ -22,7 +23,8 @@
2223
"updated": "2018-01-01T00:01:01",
2324
"label": "balancer123457",
2425
"client_conn_throttle": 0,
25-
"tags": []
26+
"tags": [],
27+
"locks": []
2628
}
2729
],
2830
"results": 2,

test/fixtures/nodebalancers_123456.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"client_conn_throttle": 0,
1111
"tags": [
1212
"something"
13+
],
14+
"locks": [
15+
"cannot_delete_with_subresources"
1316
]
1417
}

0 commit comments

Comments
 (0)