Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Patch types should be generated for resources that end in List #146

Merged
merged 3 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## 1.5.1 (2024-09-13)

- Fixed Patch varaints not generated for types that end in List. [#146](https://github.com/pulumi/crd2pulumi/pull/146)

## 1.5.0 (2024-09-13)

### Added
Expand All @@ -11,7 +15,7 @@
- The Pulumi schema generation now utilizes the library from the Pulumi Kubernetes provider, replacing the previous custom implementation. This resolves a number of correctness issues when generating code. [#143](https://github.com/pulumi/crd2pulumi/pull/143)
- Golang package generation now correctly adheres to the `--goPath` CLI flag, aligning with the behavior of other languages. [#89](https://github.com/pulumi/crd2pulumi/issues/89)
- CRDs with oneOf fields are now correctly typed and not generic. [#97](https://github.com/pulumi/crd2pulumi/issues/97)
-


### Fixed
- Various code generation correctness issues have been addressed, including:
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,5 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/pulumi/pulumi-kubernetes/provider/v4 => github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0-20240914001316-08cb0541a657
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ github.com/pulumi/inflector v0.1.1 h1:dvlxlWtXwOJTUUtcYDvwnl6Mpg33prhK+7mzeF+Sob
github.com/pulumi/inflector v0.1.1/go.mod h1:HUFCjcPTz96YtTuUlwG3i3EZG4WlniBvR9bd+iJxCUY=
github.com/pulumi/pulumi-java/pkg v0.14.0 h1:CKL7lLF81Fq6VRhA5TNFsSMnHraTNCUzIhqCzYX8Wzk=
github.com/pulumi/pulumi-java/pkg v0.14.0/go.mod h1:VybuJMWJtJc9ZNbt1kcYH4TbpocMx9mEi7YWL2Co99c=
github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0-20240913215025-7155e2ed5604 h1:5ZxljW4EKLgFgPSPOJUPT7tiXA0kfqdOQ3gPyehehEU=
github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0-20240913215025-7155e2ed5604/go.mod h1:glS84cIQOYkQBbAtHQjlNnx28XAZrPMwlPah4+Izj2U=
github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0-20240914001316-08cb0541a657 h1:HrSLsABbaFT0TQsAzh2thOri4xGmj+X+P8waXzH4RzE=
github.com/pulumi/pulumi-kubernetes/provider/v4 v4.0.0-20240914001316-08cb0541a657/go.mod h1:glS84cIQOYkQBbAtHQjlNnx28XAZrPMwlPah4+Izj2U=
github.com/pulumi/pulumi/pkg/v3 v3.130.0 h1:lS51XeCnhg72LXkMiw2FP1cGP+Y85wYD3quWhCPD5+M=
github.com/pulumi/pulumi/pkg/v3 v3.130.0/go.mod h1:jhZ1Ug5Rl1qivexgEWvmwSWYIT/jRnKSFhLwwv6PrZ0=
github.com/pulumi/pulumi/sdk/v3 v3.130.0 h1:gGJNd+akPqhZ+vrsZmAjSNJn6kGJkitjjkwrmIQMmn8=
Expand Down
6 changes: 5 additions & 1 deletion tests/crds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,15 @@ func TestCRDsFromUrl(t *testing.T) {
name: "Istio",
url: "https://raw.githubusercontent.com/istio/istio/c132663/manifests/charts/base/crds/crd-all.gen.yaml",
},
{
name: "Argo Application Set",
url: "https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/crds/applicationset-crd.yaml",
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
for _, lang := range languages {
for _, lang := range []string{"go"} {
rquitales marked this conversation as resolved.
Show resolved Hide resolved
t.Run(lang, func(t *testing.T) {
if lang == "dotnet" && (tt.name == "CertManager" || tt.name == "GKEManagedCerts") {
t.Skip("Skipping compilation for dotnet. See https://github.com/pulumi/crd2pulumi/issues/17")
Expand Down
Loading