Skip to content

Commit f1fa70e

Browse files
authored
test: update deprecated images and slack payload in workflows (#495)
* update deprecated images * fix slack payload for v2.0.0 * fix slack payload for v2.0.0 * update test image
1 parent d8bc120 commit f1fa70e

File tree

11 files changed

+71
-136
lines changed

11 files changed

+71
-136
lines changed

.github/workflows/e2e-test.yml

+26-56
Original file line numberDiff line numberDiff line change
@@ -160,64 +160,34 @@ jobs:
160160
runs-on: ubuntu-latest
161161
needs: [integration-tests]
162162
if: ${{ (success() || failure()) && github.repository == 'linode/linode_api4-python' }} # Run even if integration tests fail and only on main repository
163-
164163
steps:
165164
- name: Notify Slack
166165
uses: slackapi/[email protected]
167166
with:
168-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
167+
method: chat.postMessage
168+
token: ${{ secrets.SLACK_BOT_TOKEN }}
169169
payload: |
170-
{
171-
"blocks": [
172-
{
173-
"type": "section",
174-
"text": {
175-
"type": "mrkdwn",
176-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
177-
}
178-
},
179-
{
180-
"type": "divider"
181-
},
182-
{
183-
"type": "section",
184-
"fields": [
185-
{
186-
"type": "mrkdwn",
187-
"text": "*Build Result:*\n${{ needs.integration-tests.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
188-
},
189-
{
190-
"type": "mrkdwn",
191-
"text": "*Branch:*\n`${{ github.ref_name }}`"
192-
}
193-
]
194-
},
195-
{
196-
"type": "section",
197-
"fields": [
198-
{
199-
"type": "mrkdwn",
200-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
201-
},
202-
{
203-
"type": "mrkdwn",
204-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
205-
}
206-
]
207-
},
208-
{
209-
"type": "divider"
210-
},
211-
{
212-
"type": "context",
213-
"elements": [
214-
{
215-
"type": "mrkdwn",
216-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
217-
}
218-
]
219-
}
220-
]
221-
}
222-
env:
223-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
170+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
171+
blocks:
172+
- type: section
173+
text:
174+
type: mrkdwn
175+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
176+
- type: divider
177+
- type: section
178+
fields:
179+
- type: mrkdwn
180+
text: "*Build Result:*\n${{ needs.integration-tests.result == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
181+
- type: mrkdwn
182+
text: "*Branch:*\n`${{ github.ref_name }}`"
183+
- type: section
184+
fields:
185+
- type: mrkdwn
186+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
187+
- type: mrkdwn
188+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
189+
- type: divider
190+
- type: context
191+
elements:
192+
- type: mrkdwn
193+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"

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

+26-55
Original file line numberDiff line numberDiff line change
@@ -47,60 +47,31 @@ jobs:
4747
if: always() && github.repository == 'linode/linode_api4-python'
4848
uses: slackapi/[email protected]
4949
with:
50-
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
50+
method: chat.postMessage
51+
token: ${{ secrets.SLACK_BOT_TOKEN }}
5152
payload: |
52-
{
53-
"blocks": [
54-
{
55-
"type": "section",
56-
"text": {
57-
"type": "mrkdwn",
58-
"text": ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
59-
}
60-
},
61-
{
62-
"type": "divider"
63-
},
64-
{
65-
"type": "section",
66-
"fields": [
67-
{
68-
"type": "mrkdwn",
69-
"text": "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
70-
},
71-
{
72-
"type": "mrkdwn",
73-
"text": "*Branch:*\n`${{ github.ref_name }}`"
74-
}
75-
]
76-
},
77-
{
78-
"type": "section",
79-
"fields": [
80-
{
81-
"type": "mrkdwn",
82-
"text": "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
83-
},
84-
{
85-
"type": "mrkdwn",
86-
"text": "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
87-
}
88-
]
89-
},
90-
{
91-
"type": "divider"
92-
},
93-
{
94-
"type": "context",
95-
"elements": [
96-
{
97-
"type": "mrkdwn",
98-
"text": "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
99-
}
100-
]
101-
}
102-
]
103-
}
104-
env:
105-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
53+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
54+
blocks:
55+
- type: section
56+
text:
57+
type: mrkdwn
58+
text: ":rocket: *${{ github.workflow }} Completed in: ${{ github.repository }}* :white_check_mark:"
59+
- type: divider
60+
- type: section
61+
fields:
62+
- type: mrkdwn
63+
text: "*Build Result:*\n${{ steps.smoke_tests.outcome == 'success' && ':large_green_circle: Build Passed' || ':red_circle: Build Failed' }}"
64+
- type: mrkdwn
65+
text: "*Branch:*\n`${{ github.ref_name }}`"
66+
- type: section
67+
fields:
68+
- type: mrkdwn
69+
text: "*Commit Hash:*\n<${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>"
70+
- type: mrkdwn
71+
text: "*Run URL:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run Details>"
72+
- type: divider
73+
- type: context
74+
elements:
75+
- type: mrkdwn
76+
text: "Triggered by: :bust_in_silhouette: `${{ github.actor }}`"
10677

.github/workflows/release-notify-slack.yml

+8-14
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@ jobs:
1313
id: main_message
1414
uses: slackapi/[email protected]
1515
with:
16-
channel-id: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
16+
method: chat.postMessage
17+
token: ${{ secrets.SLACK_BOT_TOKEN }}
1718
payload: |
18-
{
19-
"blocks": [
20-
{
21-
"type": "section",
22-
"text": {
23-
"type": "mrkdwn",
24-
"text": "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"
25-
}
26-
}
27-
]
28-
}
29-
env:
30-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
19+
channel: ${{ secrets.DEV_DX_SLACK_CHANNEL_ID }}
20+
blocks:
21+
- type: section
22+
text:
23+
type: mrkdwn
24+
text: "*New Release Published: _linode_api4-python_ <${{ github.event.release.html_url }}|${{ github.event.release.tag_name }}> is now live!* :tada:"

test/integration/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def create_linode_for_pass_reset(test_linode_client, e2e_test_firewall):
184184
linode_instance, password = client.linode.instance_create(
185185
"g6-nanode-1",
186186
region,
187-
image="linode/debian10",
187+
image="linode/debian12",
188188
label=label,
189189
firewall=e2e_test_firewall,
190190
)

test/integration/linode_client/test_linode_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def setup_client_and_linode(test_linode_client, e2e_test_firewall):
1919
linode_instance, password = client.linode.instance_create(
2020
"g6-nanode-1",
2121
region,
22-
image="linode/debian10",
22+
image="linode/debian12",
2323
label=label,
2424
firewall=e2e_test_firewall,
2525
)
@@ -250,7 +250,7 @@ def test_create_linode_instance_without_image(test_linode_client):
250250
def test_create_linode_instance_with_image(setup_client_and_linode):
251251
linode = setup_client_and_linode[1]
252252

253-
assert re.search("linode/debian10", str(linode.image))
253+
assert re.search("linode/debian12", str(linode.image))
254254

255255

256256
def test_create_linode_with_interfaces(test_linode_client):
@@ -262,7 +262,7 @@ def test_create_linode_with_interfaces(test_linode_client):
262262
"g6-nanode-1",
263263
region,
264264
label=label,
265-
image="linode/debian10",
265+
image="linode/debian12",
266266
interfaces=[
267267
{"purpose": "public"},
268268
ConfigInterface(

test/integration/models/account/test_account.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_latest_get_event(test_linode_client, e2e_test_firewall):
7171
linode, password = client.linode.instance_create(
7272
"g6-nanode-1",
7373
region,
74-
image="linode/debian10",
74+
image="linode/debian12",
7575
label=label,
7676
firewall=e2e_test_firewall,
7777
)

test/integration/models/firewall/test_firewall.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def linode_fw(test_linode_client):
1414
label = get_test_label()
1515

1616
linode_instance, password = client.linode.instance_create(
17-
"g6-nanode-1", region, image="linode/debian10", label=label
17+
"g6-nanode-1", region, image="linode/debian12", label=label
1818
)
1919

2020
yield linode_instance

test/integration/models/linode/test_linode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def linode_with_disk_encryption(test_linode_client, request):
189189
linode_instance, password = client.linode.instance_create(
190190
"g6-nanode-1",
191191
target_region,
192-
image="linode/ubuntu23.10",
192+
image="linode/ubuntu24.10",
193193
label=label,
194194
booted=False,
195195
disk_encryption=disk_encryption,

test/integration/models/nodebalancer/test_nodebalancer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def linode_with_private_ip(test_linode_client, e2e_test_firewall):
3636
linode_instance, password = client.linode.instance_create(
3737
"g6-nanode-1",
3838
TEST_REGION,
39-
image="linode/debian10",
39+
image="linode/debian12",
4040
label=label,
4141
private_ip=True,
4242
firewall=e2e_test_firewall,

test/integration/models/volume/test_volume.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def linode_for_volume(test_linode_client, e2e_test_firewall):
4949
linode_instance, password = client.linode.instance_create(
5050
"g6-nanode-1",
5151
TEST_REGION,
52-
image="linode/debian10",
52+
image="linode/debian12",
5353
label=label,
5454
firewall=e2e_test_firewall,
5555
)

test/unit/objects/linode_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def test_create_disk(self):
413413
1234,
414414
label="test",
415415
authorized_users=["test"],
416-
image="linode/debian10",
416+
image="linode/debian12",
417417
)
418418
self.assertEqual(m.call_url, "/linode/instances/123/disks")
419419
self.assertEqual(
@@ -422,7 +422,7 @@ def test_create_disk(self):
422422
"size": 1234,
423423
"label": "test",
424424
"root_pass": gen_pass,
425-
"image": "linode/debian10",
425+
"image": "linode/debian12",
426426
"authorized_users": ["test"],
427427
"read_only": False,
428428
},

0 commit comments

Comments
 (0)