Skip to content

Commit

Permalink
Bump uptest dependency to v0.12.0-2.g635fa3e
Browse files Browse the repository at this point in the history
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed May 8, 2024
1 parent c88df8f commit a739f17
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,24 @@ KIND_VERSION = v0.21.0
UP_VERSION = v0.28.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.11.1
UPTEST_LOCAL_VERSION = v0.12.0-2.g635fa3e
UPTEST_LOCAL_CHANNEL = main
KUSTOMIZE_VERSION = v5.3.0
YQ_VERSION = v4.40.5
UXP_VERSION = 1.14.6-up.1

-include build/makelib/k8s_tools.mk

# uptest download and install
UPTEST_LOCAL := $(TOOLS_HOST_DIR)/uptest-$(UPTEST_LOCAL_VERSION)

$(UPTEST_LOCAL):
@$(INFO) installing uptest $(UPTEST_LOCAL)
@mkdir -p $(TOOLS_HOST_DIR)
@curl -fsSLo $(UPTEST_LOCAL) https://s3.us-west-2.amazonaws.com/crossplane.uptest.releases/$(UPTEST_LOCAL_CHANNEL)/$(UPTEST_LOCAL_VERSION)/bin/$(SAFEHOST_PLATFORM)/uptest || $(FAIL)
@chmod +x $(UPTEST_LOCAL)
@$(OK) installing uptest $(UPTEST_LOCAL)

# ====================================================================================
# Setup Images

Expand Down Expand Up @@ -183,9 +195,9 @@ CROSSPLANE_NAMESPACE = upbound-system
# - UPTEST_EXAMPLE_LIST, a comma-separated list of examples to test
# - UPTEST_CLOUD_CREDENTIALS (optional), cloud credentials for the provider being tested, e.g. export UPTEST_CLOUD_CREDENTIALS=$(cat ~/.aws/credentials)
# - UPTEST_DATASOURCE_PATH (optional), see https://github.com/upbound/uptest#injecting-dynamic-values-and-datasource
uptest: $(UPTEST) $(KUBECTL) $(KUTTL)
uptest: $(UPTEST_LOCAL) $(KUBECTL) $(KUTTL)
@$(INFO) running automated tests
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) CROSSPLANE_NAMESPACE=$(CROSSPLANE_NAMESPACE) $(UPTEST) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=cluster/test/setup.sh || $(FAIL)
@KUBECTL=$(KUBECTL) KUTTL=$(KUTTL) CROSSPLANE_NAMESPACE=$(CROSSPLANE_NAMESPACE) $(UPTEST_LOCAL) e2e "${UPTEST_EXAMPLE_LIST}" --setup-script=cluster/test/setup.sh || $(FAIL)
@$(OK) running automated tests

local-deploy: build controlplane.up local.xpkg.deploy.provider.$(PROJECT_NAME)
Expand Down
14 changes: 7 additions & 7 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,21 @@ func resourceList(t map[string]ujconfig.ExternalName) []string {
}

func bumpVersionsWithEmbeddedLists(pc *ujconfig.Provider) {
for _, r := range pc.Resources {
for name, r := range pc.Resources {
r := r
// nothing to do if no singleton list has been converted to
// an embedded object
crdPaths := r.CRDListConversionPaths()
if len(crdPaths) == 0 {
if len(r.CRDListConversionPaths()) == 0 {
continue
}
r.Version = "v1beta2"
// we would like to set the storage version to v1beta1 to facilitate
// downgrades.
r.SetCRDStorageVersion("v1beta1")
r.Conversions = []conversion.Conversion{
conversion.NewIdentityConversionExpandPaths("v1beta1", "v1beta2", []string{"spec.forProvider", "spec.initProvider", "status.atProvider"}, crdPaths...),
conversion.NewIdentityConversionExpandPaths("v1beta2", "v1beta1", []string{"spec.forProvider", "spec.initProvider", "status.atProvider"}, crdPaths...),
conversion.NewSingletonListConversion("v1beta1", "v1beta2", crdPaths, conversion.ToEmbeddedObject),
conversion.NewSingletonListConversion("v1beta2", "v1beta1", crdPaths, conversion.ToSingletonList)}
conversion.NewIdentityConversionExpandPaths(conversion.AllVersions, conversion.AllVersions, []string{"spec.forProvider", "spec.initProvider", "status.atProvider"}, r.CRDListConversionPaths()...),
conversion.NewSingletonListConversion("v1beta1", "v1beta2", r.CRDListConversionPaths(), conversion.ToEmbeddedObject),
conversion.NewSingletonListConversion("v1beta2", "v1beta1", r.CRDListConversionPaths(), conversion.ToSingletonList)}
pc.Resources[name] = r
}
}
2 changes: 1 addition & 1 deletion examples/conditionalaccess/v1beta2/accesspolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apiVersion: conditionalaccess.azuread.upbound.io/v1beta2
kind: AccessPolicy
metadata:
annotations:
meta.upbound.io/example-id: conditionalaccess/v1beta1/accesspolicy
meta.upbound.io/example-id: conditionalaccess/v1beta2/accesspolicy
labels:
testing.upbound.io/example-name: example
name: example
Expand Down
2 changes: 1 addition & 1 deletion examples/conditionalaccess/v1beta2/location.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apiVersion: conditionalaccess.azuread.upbound.io/v1beta2
kind: Location
metadata:
annotations:
meta.upbound.io/example-id: conditionalaccess/v1beta1/location
meta.upbound.io/example-id: conditionalaccess/v1beta2/location
labels:
testing.upbound.io/example-name: example-ip
name: example-ip
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ replace github.com/hashicorp/terraform-provider-azuread => github.com/upbound/te

replace github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0

replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240419053705-66007071bfaa
replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240422072143-9a463d567f9c
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ=
github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w=
github.com/ulucinar/upbound-upjet v0.0.0-20240419053705-66007071bfaa h1:igwpWGAwx/39QS/ALZDa7/8rHn1YaWYmpT5rNZoarJA=
github.com/ulucinar/upbound-upjet v0.0.0-20240419053705-66007071bfaa/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA=
github.com/ulucinar/upbound-upjet v0.0.0-20240422072143-9a463d567f9c h1:H+IioE227HCCHC9Fz/HRGMv/nSL1pDkOIu9krrTrsng=
github.com/ulucinar/upbound-upjet v0.0.0-20240422072143-9a463d567f9c/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA=
github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020 h1:BP26QEhnXcWxbJpbOT+e4bP+c9FTvqhGbtnkwXerOhA=
github.com/upbound/terraform-provider-azuread v0.0.0-20240311141618-ce1f46c21020/go.mod h1:iVryf2s08Hi6HLHh4W40fudtInXuK5Y1cWVOM/3szT8=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down

0 comments on commit a739f17

Please sign in to comment.