Skip to content

Commit fae78ae

Browse files
authored
bump polly and fix lua context binding (#487)
1 parent 15b251e commit fae78ae

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ require (
3737
github.com/opencost/opencost/core v0.0.0-20241216191657-30e5d9a27f41
3838
github.com/orcaman/concurrent-map/v2 v2.0.1
3939
github.com/pkg/errors v0.9.1
40-
github.com/pluralsh/console/go/client v1.46.1
40+
github.com/pluralsh/console/go/client v1.46.4
4141
github.com/pluralsh/controller-reconcile-helper v0.1.0
4242
github.com/pluralsh/gophoenix v0.1.3-0.20231201014135-dff1b4309e34
43-
github.com/pluralsh/polly v0.3.2
43+
github.com/pluralsh/polly v0.3.3
4444
github.com/prometheus/client_golang v1.21.1
4545
github.com/sahilm/fuzzy v0.1.1
4646
github.com/samber/lo v1.50.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,14 +1802,14 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ
18021802
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
18031803
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=
18041804
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
1805-
github.com/pluralsh/console/go/client v1.46.1 h1:ozpSUpa8G3dNJVnN/YsFL/o/daliTz62lBqhVtT/Ljg=
1806-
github.com/pluralsh/console/go/client v1.46.1/go.mod h1:8XlMMN3LLAN9JZo69f8X/XN7Qt1+aaKpgTvvQGfSiEU=
1805+
github.com/pluralsh/console/go/client v1.46.4 h1:p9RXX5p0WQw4Zi545HVHyadXFy0trih1Y34otJvAblg=
1806+
github.com/pluralsh/console/go/client v1.46.4/go.mod h1:8XlMMN3LLAN9JZo69f8X/XN7Qt1+aaKpgTvvQGfSiEU=
18071807
github.com/pluralsh/controller-reconcile-helper v0.1.0 h1:BV3dYZFH5rn8ZvZjtpkACSv/GmLEtRftNQj/Y4ddHEo=
18081808
github.com/pluralsh/controller-reconcile-helper v0.1.0/go.mod h1:RxAbvSB4/jkvx616krCdNQXPbpGJXW3J1L3rASxeFOA=
18091809
github.com/pluralsh/gophoenix v0.1.3-0.20231201014135-dff1b4309e34 h1:ab2PN+6if/Aq3/sJM0AVdy1SYuMAnq4g20VaKhTm/Bw=
18101810
github.com/pluralsh/gophoenix v0.1.3-0.20231201014135-dff1b4309e34/go.mod h1:IagWXKFYu6NTHzcJx2dJyrIlZ1Sv2PH3fhOtplA9qOs=
1811-
github.com/pluralsh/polly v0.3.2 h1:IxlRazgvSn4pQsHrcYnkghWbBQZ9PVW+yBJTBByIT8Q=
1812-
github.com/pluralsh/polly v0.3.2/go.mod h1:gk48el0JCoEV2FZXW5DV5FvlDf4G/01Wb+Py7attQjU=
1811+
github.com/pluralsh/polly v0.3.3 h1:Vh8oc6Fvx/ZulVxZHUh160+G8dMSeoye6EpuENeC6b8=
1812+
github.com/pluralsh/polly v0.3.3/go.mod h1:gk48el0JCoEV2FZXW5DV5FvlDf4G/01Wb+Py7attQjU=
18131813
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
18141814
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
18151815
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=

pkg/manifests/template/helm_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ var _ = Describe("Helm template", func() {
2020
Namespace: "default",
2121
Name: "test",
2222
Cluster: &console.ServiceDeploymentForAgent_Cluster{
23-
ID: "123",
24-
Name: "test",
23+
ID: "123",
24+
Name: "test",
25+
Version: lo.ToPtr("1.2.3"),
26+
CurrentVersion: lo.ToPtr("4.5.6"),
2527
},
2628
}
2729

@@ -90,6 +92,8 @@ var _ = Describe("Helm template", func() {
9092
values = {}
9193
values["name"] = "new-name"
9294
values["namespace"] = "new-namespace"
95+
values["version"] = cluster.version
96+
values["currentVersion"] = cluster.currentVersion
9397
`)
9498

9599
resp, err = NewHelm(dir).Render(svc, utilFactory)
@@ -98,6 +102,9 @@ var _ = Describe("Helm template", func() {
98102

99103
Expect(resp[0].GetName()).To(Equal("new-name"))
100104
Expect(resp[0].GetNamespace()).To(Equal("new-namespace"))
105+
106+
Expect(resp[0].GetLabels()["version"]).To(Equal("1.2.3"))
107+
Expect(resp[0].GetLabels()["currentVersion"]).To(Equal("4.5.6"))
101108
})
102109

103110
It("should successfully render handle lua errors", func() {

test/helm/lua/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ kind: Deployment
33
metadata:
44
name: {{ .Values.name }}
55
namespace: {{ .Values.namespace }}
6+
labels:
7+
version: {{ .Values.version }}
8+
currentVersion: {{ .Values.currentVersion }}
69
spec:
710
replicas: 1
811
selector:

test/helm/lua/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
name: myapp
2-
namespace: default
2+
namespace: default
3+
version: 0.0.0
4+
currentVersion: 0.0.0

0 commit comments

Comments
 (0)