Skip to content

Commit f0bd6cd

Browse files
authored
Merge branch 'Shopify:main' into master
2 parents 2c134e2 + 390d78a commit f0bd6cd

7 files changed

Lines changed: 51 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
- "3.0.4"
1919
- "2.7.6"
2020
kubernetes_version:
21+
- "1.33.1"
22+
- "1.32.5"
2123
- "1.31.2"
2224
- "1.30.0"
2325
- "1.29.4"
@@ -30,6 +32,10 @@ jobs:
3032
- "serial_integration_test"
3133
- "integration_test"
3234
include:
35+
- kubernetes_version: "1.33.1"
36+
kind_image: "kindest/node:v1.33.1@sha256:050072256b9a903bd914c0b2866828150cb229cea0efe5892e2b644d5dd3b34f"
37+
- kubernetes_version: "1.32.5"
38+
kind_image: "kindest/node:v1.32.5@sha256:e3b2327e3a5ab8c76f5ece68936e4cafaa82edf58486b769727ab0b3b97a5b0d"
3339
- kubernetes_version: "1.31.2"
3440
kind_image: "kindest/node:v1.31.2@sha256:18fbefc20a7113353c7b75b5c869d7145a6abd6269154825872dc59c1329912e"
3541
- kubernetes_version: "1.30.0"

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
## next
22

3+
## 3.9.0
4+
5+
- Remove Elasticsearch specific logic that was introduced in 3.8.0
6+
- Remove check for observedGeneration.present? introduced in 3.8.1 because it was redundant
7+
8+
## 3.8.1
9+
10+
- check if observedGeneration is present before comparing with generation for custom resources
11+
12+
## 3.8.0
13+
14+
- Add Elasticsearch resource to the black list so it is not marked for deletion
15+
16+
## 3.7.4
17+
18+
- Handle bad encoding in container log output
19+
20+
## 3.7.3
21+
22+
- Test against k8s 1.32 and 1.33
23+
324
## 3.7.2
425

526
- Explicitly convert `current_generation` and `observed_generation` values to integers using `.to_i` to ensure consistentency during comparison

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ Krane provides support for official upstream supported versions [Kubernetes](htt
9898
| 1.29 | Yes | -- |
9999
| 1.30 | Yes | -- |
100100
| 1.31 | Yes | -- |
101+
| 1.32 | Yes | -- |
102+
| 1.33 | Yes | -- |
101103

102104
## Installation
103105

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ up:
66
- podman
77
- kind:
88
name: krane
9-
image: kindest/node:v1.31.2@sha256:18fbefc20a7113353c7b75b5c869d7145a6abd6269154825872dc59c1329912e
9+
image: kindest/node:v1.32.5@sha256:e3b2327e3a5ab8c76f5ece68936e4cafaa82edf58486b769727ab0b3b97a5b0d
1010
commands:
1111
test:
1212
run: bin/test unit_test && bin/test cli_test && bin/test serial_integration_test && bin/test integration_test

lib/krane/container_logs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def fetch_latest
5555
"--tail=#{DEFAULT_LINE_LIMIT}"
5656
end
5757
out, _err, _st = kubectl.run(*cmd, log_failure: false)
58-
out.split("\n")
58+
out.encode('UTF-8', invalid: :replace, replace: '').split("\n")
5959
end
6060

6161
def kubectl

lib/krane/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22
module Krane
3-
VERSION = "3.7.2"
3+
VERSION = "3.9.0"
44
end

test/integration/runner_task_test.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,25 @@ def test_run_adds_custom_image_tag_provided_to_the_task_container
300300
assert_equal('busybox:latest', container.image, "Container image should have been upadted")
301301
end
302302

303+
def test_run_with_verify_result_succeeds_with_bad_output_encoding
304+
deploy_task_template
305+
306+
task_runner = build_task_runner
307+
assert_nil(task_runner.pod_name)
308+
result = task_runner.run(
309+
template: 'hello-cloud-template-runner',
310+
command: ['/bin/sh', '-c'],
311+
arguments: ['printf \'\xFF\xFE\x00\x01\''],
312+
verify_result: true,
313+
)
314+
315+
assert_task_run_success(result)
316+
317+
pods = kubeclient.get_pods(namespace: @namespace)
318+
assert_equal(1, pods.length, "Expected 1 pod to exist, found #{pods.length}")
319+
assert_equal(task_runner.pod_name, pods.first.metadata.name, "Pod name should be available after run")
320+
end
321+
303322
private
304323

305324
def deploy_unschedulable_template

0 commit comments

Comments
 (0)