diff --git a/backend/pkg/informers/informers_test.go b/backend/pkg/informers/informers_test.go index 4540609f93a..a17d5c24e8f 100644 --- a/backend/pkg/informers/informers_test.go +++ b/backend/pkg/informers/informers_test.go @@ -260,15 +260,14 @@ func subscriptionInformerTestCase() informerTestCase { expectedInitialAdds: 2, mutateDB: func(t *testing.T, ctx context.Context, mockResourcesDBClient *databasetesting.MockResourcesDBClient) { t.Helper() - // Update sub-1. - sub1Updated := &arm.Subscription{ - CosmosMetadata: arm.CosmosMetadata{ - ResourceID: mustParseResourceID(t, "/subscriptions/sub-1"), - }, - ResourceID: mustParseResourceID(t, "/subscriptions/sub-1"), - State: arm.SubscriptionStateWarned, - } - _, err := mockResourcesDBClient.Subscriptions().Replace(ctx, sub1Updated, nil) + // Update sub-1. Deep-copy the existing document so the Replace + // carries the existing etag and instance version forward; the + // crud_helpers PrepareForReplace check rejects fresh-built docs. + existing, err := mockResourcesDBClient.Subscriptions().Get(ctx, "sub-1") + require.NoError(t, err) + sub1Updated := existing.DeepCopy() + sub1Updated.State = arm.SubscriptionStateWarned + _, err = mockResourcesDBClient.Subscriptions().Replace(ctx, sub1Updated, nil) require.NoError(t, err) // Add sub-3. @@ -380,8 +379,14 @@ func clusterInformerTestCase() informerTestCase { t.Helper() clusterCRUD := mockResourcesDBClient.HCPClusters(subscriptionID, resourceGroupName) - // Update cluster-1 state. - _, err := clusterCRUD.Replace(ctx, newCluster(t, "cluster-1", arm.ProvisioningStateDeleting), nil) + // Update cluster-1 state. Deep-copy the existing document so the + // Replace carries the existing etag and instance version forward; + // the crud_helpers PrepareForReplace check rejects fresh-built docs. + existing, err := clusterCRUD.Get(ctx, "cluster-1") + require.NoError(t, err) + updated := existing.DeepCopy() + updated.ServiceProviderProperties.ProvisioningState = arm.ProvisioningStateDeleting + _, err = clusterCRUD.Replace(ctx, updated, nil) require.NoError(t, err) // Add cluster-3. @@ -515,8 +520,14 @@ func nodePoolInformerTestCase() informerTestCase { t.Helper() npCRUD := mockResourcesDBClient.HCPClusters(subscriptionID, resourceGroupName).NodePools(clusterName) - // Update np-1 replica count. - _, err := npCRUD.Replace(ctx, newNodePool(t, "np-1", 10), nil) + // Update np-1 replica count. Deep-copy the existing document so + // the Replace carries the existing etag and instance version forward; + // the crud_helpers PrepareForReplace check rejects fresh-built docs. + existing, err := npCRUD.Get(ctx, "np-1") + require.NoError(t, err) + updated := existing.DeepCopy() + updated.Properties.Replicas = 10 + _, err = npCRUD.Replace(ctx, updated, nil) require.NoError(t, err) // Add np-3. @@ -618,8 +629,14 @@ func activeOperationInformerTestCase() informerTestCase { // Transition op-1 to succeeded (terminal) — the active operations // informer should see this as a deletion since it only tracks - // non-terminal operations. - _, err := opCRUD.Replace(ctx, newOperation(t, "op-1", arm.ProvisioningStateSucceeded), nil) + // non-terminal operations. Deep-copy the existing document so the + // Replace carries the existing etag and instance version forward; + // the crud_helpers PrepareForReplace check rejects fresh-built docs. + existing, err := opCRUD.Get(ctx, "op-1") + require.NoError(t, err) + updated := existing.DeepCopy() + updated.Status = arm.ProvisioningStateSucceeded + _, err = opCRUD.Replace(ctx, updated, nil) require.NoError(t, err) // Add a new active operation op-3. diff --git a/frontend/pkg/frontend/frontend.go b/frontend/pkg/frontend/frontend.go index be373350c12..3d0610b8beb 100644 --- a/frontend/pkg/frontend/frontend.go +++ b/frontend/pkg/frontend/frontend.go @@ -568,6 +568,9 @@ func (f *Frontend) ArmSubscriptionPut(writer http.ResponseWriter, request *http. logger.Info(message) } if len(messages) > 0 { + // Carry the etag of the just-read document forward so Replace + // is conditional on it; the DB layer refuses unconditional updates. + requestSubscription.CosmosMetadata = *existingSubscription.CosmosMetadata.DeepCopy() resultingSubscription, err = f.resourcesDBClient.Subscriptions().Replace(ctx, &requestSubscription, nil) if err != nil { return utils.TrackError(err) diff --git a/internal/api/arm/types_cosmosdata.go b/internal/api/arm/types_cosmosdata.go index 1ff2a355bb8..d9f0237ef42 100644 --- a/internal/api/arm/types_cosmosdata.go +++ b/internal/api/arm/types_cosmosdata.go @@ -35,6 +35,13 @@ type CosmosMetadata struct { ExistingCosmosUID string `json:"-"` CosmosETag azcore.ETag `json:"etag,omitempty"` + + // InstanceVersion is a field that auto-increments every time the resource is updated. This gives us the ability to + // compare two instances of stored resources and determine which one is newer. We will use this field to integrate + // changefeeds for controllers and decide which changes are newer than the level we have already observed so that we + // can periodically re-list all items. + // The auto-incrementing happens automatically in the storage layer for conditional updates. + InstanceVersion int64 `json:"instanceVersion"` } var ( diff --git a/internal/api/v20240610preview/conversion_fuzz_test.go b/internal/api/v20240610preview/conversion_fuzz_test.go index 827681a8590..36a9b3bd253 100644 --- a/internal/api/v20240610preview/conversion_fuzz_test.go +++ b/internal/api/v20240610preview/conversion_fuzz_test.go @@ -46,6 +46,9 @@ func TestRoundTripInternalExternalInternal(t *testing.T) { j.ResourceID = api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myrg")) j.ExistingCosmosUID = "" j.CosmosETag = "" + // InstanceVersion is purely storage-layer state; it does not round-trip + // through the external API. + j.InstanceVersion = 0 }, func(j *api.HCPOpenShiftClusterCustomerProperties, c randfill.Continue) { c.FillNoCustom(j) @@ -129,22 +132,31 @@ func TestRoundTripInternalExternalInternal(t *testing.T) { for i := 0; i < 200; i++ { original := &api.HCPOpenShiftCluster{} fuzzer.Fill(original) + // InstanceVersion does not roundtrip through the external type because + // it is purely a database concern. The CosmosMetadata fuzz override + // also zeroes this, but randfill does not always dispatch the custom + // func when filling an embedded struct in-place, so zero it here too. + original.InstanceVersion = 0 roundTripHCPCluster(t, original) } for i := 0; i < 200; i++ { original := &api.HCPOpenShiftClusterNodePool{} fuzzer.Fill(original) - // CosmosETag does not roundtrip through the external type because it is purely a database concern + // CosmosETag and InstanceVersion do not roundtrip through the external + // type because they are purely database concerns. original.CosmosETag = "" + original.InstanceVersion = 0 roundTripNodePool(t, original) } for i := 0; i < 200; i++ { original := &api.HCPOpenShiftClusterExternalAuth{} fuzzer.Fill(original) - // CosmosETag does not roundtrip through the external type because it is purely a database concern + // CosmosETag and InstanceVersion do not roundtrip through the external + // type because they are purely database concerns. original.CosmosETag = "" + original.InstanceVersion = 0 roundTripExternalAuth(t, original) } } diff --git a/internal/api/v20251223preview/conversion_fuzz_test.go b/internal/api/v20251223preview/conversion_fuzz_test.go index 4c56402d951..f41864b80b0 100644 --- a/internal/api/v20251223preview/conversion_fuzz_test.go +++ b/internal/api/v20251223preview/conversion_fuzz_test.go @@ -46,6 +46,9 @@ func TestRoundTripInternalExternalInternal(t *testing.T) { j.ResourceID = api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myrg")) j.ExistingCosmosUID = "" j.CosmosETag = "" + // InstanceVersion is purely storage-layer state; it does not round-trip + // through the external API. + j.InstanceVersion = 0 }, func(j *api.ImageDigestMirror, c randfill.Continue) { c.FillNoCustom(j) @@ -107,22 +110,31 @@ func TestRoundTripInternalExternalInternal(t *testing.T) { for i := 0; i < 200; i++ { original := &api.HCPOpenShiftCluster{} fuzzer.Fill(original) + // InstanceVersion does not roundtrip through the external type because + // it is purely a database concern. The CosmosMetadata fuzz override + // also zeroes this, but randfill does not always dispatch the custom + // func when filling an embedded struct in-place, so zero it here too. + original.InstanceVersion = 0 roundTripHCPCluster(t, original) } for i := 0; i < 200; i++ { original := &api.HCPOpenShiftClusterNodePool{} fuzzer.Fill(original) - // CosmosETag does not roundtrip through the external type because it is purely a database concern + // CosmosETag and InstanceVersion do not roundtrip through the external + // type because they are purely database concerns. original.CosmosETag = "" + original.InstanceVersion = 0 roundTripNodePool(t, original) } for i := 0; i < 200; i++ { original := &api.HCPOpenShiftClusterExternalAuth{} fuzzer.Fill(original) - // CosmosETag does not roundtrip through the external type because it is purely a database concern + // CosmosETag and InstanceVersion do not roundtrip through the external + // type because they are purely database concerns. original.CosmosETag = "" + original.InstanceVersion = 0 roundTripExternalAuth(t, original) } } diff --git a/internal/database/convert_any.go b/internal/database/convert_any.go index 3ef0cb1f322..b05ee4fd028 100644 --- a/internal/database/convert_any.go +++ b/internal/database/convert_any.go @@ -20,7 +20,6 @@ import ( azcorearm "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/ARO-HCP/internal/api" "github.com/Azure/ARO-HCP/internal/api/fleet" "github.com/Azure/ARO-HCP/internal/api/kubeapplier" "github.com/Azure/ARO-HCP/internal/utils" @@ -30,15 +29,6 @@ func CosmosToInternal[InternalAPIType, CosmosAPIType any](obj *CosmosAPIType) (* var internalObj any var err error switch cosmosObj := any(obj).(type) { - case *ExternalAuth: - internalObj, err = CosmosToInternalExternalAuth(cosmosObj) - - case *HCPCluster: - internalObj, err = CosmosToInternalCluster(cosmosObj) - - case *NodePool: - internalObj, err = CosmosToInternalNodePool(cosmosObj) - case *TypedDocument: var expectedObj InternalAPIType switch castObj := any(expectedObj).(type) { @@ -86,14 +76,6 @@ func InternalToCosmos[InternalAPIType, CosmosAPIType any](obj *InternalAPIType) var cosmosObj any var err error switch internalObj := any(obj).(type) { - case *api.HCPOpenShiftClusterExternalAuth: - cosmosObj, err = InternalToCosmosExternalAuth(internalObj) - - case *api.HCPOpenShiftCluster: - cosmosObj, err = InternalToCosmosCluster(internalObj) - - case *api.HCPOpenShiftClusterNodePool: - cosmosObj, err = InternalToCosmosNodePool(internalObj) case *fleet.Stamp: cosmosObj, err = InternalToCosmosFleet(internalObj) diff --git a/internal/database/convert_cluster.go b/internal/database/convert_cluster.go deleted file mode 100644 index 90c17b14584..00000000000 --- a/internal/database/convert_cluster.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "fmt" - "strings" - - "k8s.io/utils/ptr" - - "github.com/Azure/ARO-HCP/internal/api" -) - -func InternalToCosmosCluster(internalObj *api.HCPOpenShiftCluster) (*HCPCluster, error) { - if internalObj == nil { - return nil, nil - } - - // CosmosMetadata.ResourceID is the canonical identifier for cosmos-side - // concerns (partitioning, document UID, resource-type indexing). Use it - // instead of the TrackedResource.ID, which is an ARM-surface concern. - cosmosResourceID := internalObj.GetCosmosData().ResourceID - if cosmosResourceID == nil { - return nil, fmt.Errorf("internalObj is missing CosmosMetadata.ResourceID") - } - cosmosObj := &HCPCluster{ - TypedDocument: TypedDocument{ - BaseDocument: BaseDocument{ - ID: internalObj.GetCosmosData().GetCosmosUID(), - }, - PartitionKey: strings.ToLower(cosmosResourceID.SubscriptionID), - ResourceID: cosmosResourceID, - ResourceType: cosmosResourceID.ResourceType.String(), - }, - HCPClusterProperties: HCPClusterProperties{ - HCPOpenShiftCluster: *internalObj, - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: cosmosResourceID, - InternalID: ptr.Deref(internalObj.ServiceProviderProperties.ClusterServiceID, api.InternalID{}), - ActiveOperationID: internalObj.ServiceProviderProperties.ActiveOperationID, - ProvisioningState: internalObj.ServiceProviderProperties.ProvisioningState, - Identity: internalObj.Identity.DeepCopy(), - SystemData: internalObj.SystemData, - Tags: copyTags(internalObj.Tags), - }, - InternalState: ClusterInternalState{ - InternalAPI: *internalObj, - }, - }, - } - - cosmosObj.InternalState.InternalAPI.CosmosMetadata = api.CosmosMetadata{} - - return cosmosObj, nil -} - -func copyTags(src map[string]string) map[string]string { - if src == nil { - return nil - } - tags := map[string]string{} - for k, v := range src { - tags[k] = v - } - - return tags -} - -func CosmosToInternalCluster(cosmosObj *HCPCluster) (*api.HCPOpenShiftCluster, error) { - if cosmosObj == nil { - return nil, nil - } - - internalObj := cosmosObj.DeepCopy() - internalObj.ExistingCosmosUID = cosmosObj.ID - internalObj.SetEtag(cosmosObj.CosmosETag) - if internalObj.GetResourceID() == nil { - if cosmosObj.ResourceID != nil { - internalObj.SetResourceID(cosmosObj.ResourceID) - } else { - return nil, fmt.Errorf("internalObj is missing a resourceID: %T: %q", cosmosObj, cosmosObj.ID) - } - } - - internalObj.EnsureDefaults() - - return internalObj, nil -} diff --git a/internal/database/convert_cluster_test.go b/internal/database/convert_cluster_test.go index b1761f3e08d..00b9df27013 100644 --- a/internal/database/convert_cluster_test.go +++ b/internal/database/convert_cluster_test.go @@ -15,191 +15,11 @@ package database import ( - "bytes" - "encoding/json" - "math/rand" - "strings" "testing" - "github.com/google/go-cmp/cmp" - "github.com/stretchr/testify/require" - - "k8s.io/apimachinery/pkg/api/equality" - - "sigs.k8s.io/randfill" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - azcorearm "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/ARO-HCP/internal/api" - "github.com/Azure/ARO-HCP/internal/api/arm" ) -// fuzzerFor can randomly populate api objects that are destined for version. -func fuzzerFor(funcs []interface{}, src rand.Source) *randfill.Filler { - f := randfill.New().NilChance(.5).NumElements(0, 1) - if src != nil { - f.RandSource(src) - } - f.Funcs(funcs...) - return f -} - -func TestRoundTripClusterInternalCosmosInternal(t *testing.T) { - seed := rand.Int63() - t.Logf("seed: %d", seed) - - fuzzer := fuzzerFor([]interface{}{ - func(j *azcorearm.ResourceID, c randfill.Continue) { - *j = *api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg")) - }, - func(j *arm.Resource, c randfill.Continue) { - c.FillNoCustom(j) - j.ID = api.Must(azcorearm.ParseResourceID("/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/change-channel")) - j.Name = "change-channel" - j.Type = "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - }, - func(j *api.HCPOpenShiftClusterServiceProviderProperties, c randfill.Continue) { - c.FillNoCustom(j) - if j == nil { - return - } - // we must always have an internal ID - foo := api.Must(api.NewInternalID("/api/clusters_mgmt/v1/clusters/r" + strings.ReplaceAll(c.String(10), "/", "-"))) - j.ClusterServiceID = &foo - }, - func(j *api.CosmosMetadata, c randfill.Continue) { - c.FillNoCustom(j) - j.ResourceID = api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg")) - j.ExistingCosmosUID = "" - j.CosmosETag = "" - }, - func(j *api.HCPOpenShiftCluster, c randfill.Continue) { - c.FillNoCustom(j) - if j == nil { - return - } - // Canonical defaults are applied on Cosmos read, so ensure - // defaulted fields are never zero during round-trip testing. - if len(j.CustomerProperties.Network.NetworkType) == 0 { - j.CustomerProperties.Network.NetworkType = api.NetworkTypeOVNKubernetes - } - if len(j.CustomerProperties.API.Visibility) == 0 { - j.CustomerProperties.API.Visibility = api.VisibilityPublic - } - if len(j.CustomerProperties.Platform.OutboundType) == 0 { - j.CustomerProperties.Platform.OutboundType = api.OutboundTypeLoadBalancer - } - if len(j.CustomerProperties.ClusterImageRegistry.State) == 0 { - j.CustomerProperties.ClusterImageRegistry.State = api.ClusterImageRegistryStateEnabled - } - if len(j.CustomerProperties.Etcd.DataEncryption.KeyManagementMode) == 0 { - j.CustomerProperties.Etcd.DataEncryption.KeyManagementMode = api.EtcdDataEncryptionKeyManagementModeTypePlatformManaged - } - if j.CustomerProperties.Etcd.DataEncryption.CustomerManaged != nil && - j.CustomerProperties.Etcd.DataEncryption.CustomerManaged.Kms != nil && - len(j.CustomerProperties.Etcd.DataEncryption.CustomerManaged.Kms.Visibility) == 0 { - j.CustomerProperties.Etcd.DataEncryption.CustomerManaged.Kms.Visibility = api.KeyVaultVisibilityPublic - } - for i := range j.CustomerProperties.ImageDigestMirrors { - if len(j.CustomerProperties.ImageDigestMirrors[i].MirrorSourcePolicy) == 0 { - j.CustomerProperties.ImageDigestMirrors[i].MirrorSourcePolicy = api.MirrorSourcePolicyAllowContactingSource - } - } - }, - func(j *arm.ManagedServiceIdentity, c randfill.Continue) { - c.FillNoCustom(j) - - // we only round trip keys, so only fill in keys - if j != nil && j.UserAssignedIdentities != nil { - for k := range j.UserAssignedIdentities { - j.UserAssignedIdentities[k] = nil - } - } - }, - }, rand.NewSource(seed)) - - // Try a few times, since runTest uses random values. - for i := 0; i < 20; i++ { - original := &api.HCPOpenShiftCluster{} - fuzzer.Fill(original) - roundTripInternalToCosmosToInternal[api.HCPOpenShiftCluster, HCPCluster](t, original) - } -} - -func roundTripInternalToCosmosToInternal[InternalAPIType, CosmosAPIType any](t *testing.T, original *InternalAPIType) { - originalBeforeJSON, _ := json.MarshalIndent(original, "", " ") - - intermediate, err := InternalToCosmos[InternalAPIType, CosmosAPIType](original) - require.NoError(t, err) - intermediateBeforeJSON, _ := json.MarshalIndent(intermediate, "", " ") - - final, err := CosmosToInternal[InternalAPIType, CosmosAPIType](intermediate) - require.NoError(t, err) - - // this value is set during conversion, so we need clear for comparison - switch cast := any(final).(type) { - case *api.HCPOpenShiftCluster: - cast.ExistingCosmosUID = "" - case *api.HCPOpenShiftClusterNodePool: - cast.ExistingCosmosUID = "" - case *api.HCPOpenShiftClusterExternalAuth: - cast.ExistingCosmosUID = "" - } - //finalJSON, _ := json.MarshalIndent(final, "", " ") - - // we compare the JSON here because many of these types have private fields that cannot be introspected - if !equality.Semantic.DeepEqual(original, final) { - //t.Logf("original\n%s", string(originalBeforeJSON)) - //t.Logf("intermediate\n%s", string(intermediateBeforeJSON)) - //t.Logf("final\n%s", string(finalJSON)) - t.Errorf("Round trip failed: %v", cmp.Diff(original, final, api.CmpDiffOptions...)) - } - - // now check to be sure we didn't mutate the originals. The copies still aren't deep, but at least we didn't nuke the inputs - originalAfterJSON, _ := json.MarshalIndent(original, "", " ") - if !bytes.Equal(originalBeforeJSON, originalAfterJSON) { - t.Logf("original\n%s", string(originalBeforeJSON)) - t.Logf("originalAfter\n%s", string(originalAfterJSON)) - t.Errorf("original was modified: %v", cmp.Diff(originalBeforeJSON, originalAfterJSON)) - } - - // now check to be sure we didn't mutate the originals. The copies still aren't deep, but at least we didn't nuke the inputs - intermediateAfterJSON, _ := json.MarshalIndent(intermediate, "", " ") - if !bytes.Equal(intermediateBeforeJSON, intermediateAfterJSON) { - t.Logf("intermediate\n%s", string(intermediateBeforeJSON)) - t.Logf("intermediateAfter\n%s", string(intermediateAfterJSON)) - t.Errorf("intermediate was modified: %v", cmp.Diff(intermediateBeforeJSON, intermediateAfterJSON)) - } -} - -func TestCosmosToInternalClusterPreservesETag(t *testing.T) { - expectedETag := azcore.ETag("test-etag-value-12345") - resourceID := api.Must(azcorearm.ParseResourceID("/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/rg/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/my-cluster")) - - cosmosObj := &HCPCluster{ - TypedDocument: TypedDocument{ - BaseDocument: BaseDocument{ - CosmosETag: expectedETag, - }, - }, - HCPClusterProperties: HCPClusterProperties{ - HCPOpenShiftCluster: api.HCPOpenShiftCluster{ - CosmosMetadata: arm.CosmosMetadata{ - ResourceID: resourceID, - }, - }, - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: resourceID, - }, - }, - } - - internalObj, err := CosmosToInternalCluster(cosmosObj) - require.NoError(t, err) - require.Equal(t, expectedETag, internalObj.GetCosmosData().CosmosETag) -} - func TestClusterEnsureDefaults(t *testing.T) { tests := []struct { name string diff --git a/internal/database/convert_defaults_consistency_test.go b/internal/database/convert_defaults_consistency_test.go index 0953007fda1..80c69367f1d 100644 --- a/internal/database/convert_defaults_consistency_test.go +++ b/internal/database/convert_defaults_consistency_test.go @@ -205,28 +205,26 @@ func TestPreExistingDataCluster(t *testing.T) { // Simulate a pre-existing Cosmos document: all canonically-defaulted fields // are zero-valued (empty strings), as if the document was created before // these fields were added to the API. - preExistingDoc := &HCPCluster{ + preExistingDoc := &GenericDocument[api.HCPOpenShiftCluster]{ TypedDocument: TypedDocument{ BaseDocument: BaseDocument{ID: "test-doc-id"}, ResourceID: resourceID, }, - HCPClusterProperties: HCPClusterProperties{ - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: resourceID, - InternalID: api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster")), - ProvisioningState: arm.ProvisioningStateSucceeded, + Content: api.HCPOpenShiftCluster{ + // All canonically-defaulted fields are intentionally zero-valued: + // NetworkType, Visibility, OutboundType, + // ClusterImageRegistry.State, Etcd.DataEncryption.KeyManagementMode + CosmosMetadata: arm.CosmosMetadata{ + ResourceID: resourceID, }, - InternalState: ClusterInternalState{ - InternalAPI: api.HCPOpenShiftCluster{ - // All canonically-defaulted fields are intentionally zero-valued: - // NetworkType, Visibility, OutboundType, - // ClusterImageRegistry.State, Etcd.DataEncryption.KeyManagementMode - }, + ServiceProviderProperties: api.HCPOpenShiftClusterServiceProviderProperties{ + ClusterServiceID: ptr.To(api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster"))), + ProvisioningState: arm.ProvisioningStateSucceeded, }, }, } - internalCluster, err := CosmosToInternalCluster(preExistingDoc) + internalCluster, err := CosmosGenericToInternal(preExistingDoc) if err != nil { t.Fatalf("CosmosToInternalCluster failed: %v", err) } @@ -263,44 +261,42 @@ func TestKMSVisibilityDefaultsToPublic(t *testing.T) { // Simulate a cluster created via v2024_06_10_preview with KMS encryption // but no visibility field (since that version doesn't have it). - preExistingDoc := &HCPCluster{ + preExistingDoc := &GenericDocument[api.HCPOpenShiftCluster]{ TypedDocument: TypedDocument{ BaseDocument: BaseDocument{ID: "test-doc-id"}, ResourceID: resourceID, }, - HCPClusterProperties: HCPClusterProperties{ - HCPOpenShiftCluster: api.HCPOpenShiftCluster{ - CosmosMetadata: arm.CosmosMetadata{ - ResourceID: resourceID, - }, - CustomerProperties: api.HCPOpenShiftClusterCustomerProperties{ - Etcd: api.EtcdProfile{ - DataEncryption: api.EtcdDataEncryptionProfile{ - KeyManagementMode: api.EtcdDataEncryptionKeyManagementModeTypeCustomerManaged, - CustomerManaged: &api.CustomerManagedEncryptionProfile{ - EncryptionType: api.CustomerManagedEncryptionTypeKMS, - Kms: &api.KmsEncryptionProfile{ - ActiveKey: api.KmsKey{ - Name: "test-key", - VaultName: "test-vault", - Version: "v1", - }, - // Visibility intentionally not set (empty string) - Visibility: "", + Content: api.HCPOpenShiftCluster{ + CosmosMetadata: arm.CosmosMetadata{ + ResourceID: resourceID, + }, + CustomerProperties: api.HCPOpenShiftClusterCustomerProperties{ + Etcd: api.EtcdProfile{ + DataEncryption: api.EtcdDataEncryptionProfile{ + KeyManagementMode: api.EtcdDataEncryptionKeyManagementModeTypeCustomerManaged, + CustomerManaged: &api.CustomerManagedEncryptionProfile{ + EncryptionType: api.CustomerManagedEncryptionTypeKMS, + Kms: &api.KmsEncryptionProfile{ + ActiveKey: api.KmsKey{ + Name: "test-key", + VaultName: "test-vault", + Version: "v1", }, + // Visibility intentionally not set (empty string) + Visibility: "", }, }, }, }, - ServiceProviderProperties: api.HCPOpenShiftClusterServiceProviderProperties{ - ClusterServiceID: ptr.To(api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster"))), - ProvisioningState: arm.ProvisioningStateSucceeded, - }, + }, + ServiceProviderProperties: api.HCPOpenShiftClusterServiceProviderProperties{ + ClusterServiceID: ptr.To(api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster"))), + ProvisioningState: arm.ProvisioningStateSucceeded, }, }, } - internalCluster, err := CosmosToInternalCluster(preExistingDoc) + internalCluster, err := CosmosGenericToInternal(preExistingDoc) if err != nil { t.Fatalf("CosmosToInternalCluster failed: %v", err) } @@ -319,7 +315,7 @@ func TestKMSVisibilityDefaultsToPublic(t *testing.T) { } } -// TestPreExistingDataNodePool verifies that CosmosToInternalNodePool applies +// TestPreExistingDataNodePool verifies that CosmosGenericToInternal applies // canonical defaults when reading a Cosmos document that predates the // introduction of DiskStorageAccountType. func TestPreExistingDataNodePool(t *testing.T) { @@ -328,35 +324,33 @@ func TestPreExistingDataNodePool(t *testing.T) { )) // Simulate a pre-existing Cosmos document missing DiskStorageAccountType. - preExistingDoc := &NodePool{ + preExistingDoc := &GenericDocument[api.HCPOpenShiftClusterNodePool]{ TypedDocument: TypedDocument{ BaseDocument: BaseDocument{ID: "test-doc-id"}, ResourceID: resourceID, }, - NodePoolProperties: NodePoolProperties{ - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: resourceID, - InternalID: api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster/node_pools/test-np")), - ProvisioningState: arm.ProvisioningStateSucceeded, + Content: api.HCPOpenShiftClusterNodePool{ + // DiskStorageAccountType is intentionally zero-valued + CosmosMetadata: arm.CosmosMetadata{ + ResourceID: resourceID, }, - InternalState: NodePoolInternalState{ - InternalAPI: api.HCPOpenShiftClusterNodePool{ - // DiskStorageAccountType is intentionally zero-valued - Properties: api.HCPOpenShiftClusterNodePoolProperties{ - Platform: api.NodePoolPlatformProfile{ - OSDisk: api.OSDiskProfile{ - // DiskStorageAccountType: "" — simulates pre-existing document - }, - }, + Properties: api.HCPOpenShiftClusterNodePoolProperties{ + ProvisioningState: arm.ProvisioningStateSucceeded, + Platform: api.NodePoolPlatformProfile{ + OSDisk: api.OSDiskProfile{ + // DiskStorageAccountType: "" — simulates pre-existing document }, }, }, + ServiceProviderProperties: api.HCPOpenShiftClusterNodePoolServiceProviderProperties{ + ClusterServiceID: ptr.To(api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster/node_pools/test-np"))), + }, }, } - internalNodePool, err := CosmosToInternalNodePool(preExistingDoc) + internalNodePool, err := CosmosGenericToInternal(preExistingDoc) if err != nil { - t.Fatalf("CosmosToInternalNodePool failed: %v", err) + t.Fatalf("CosmosGenericToInternal failed: %v", err) } if internalNodePool.Properties.Platform.OSDisk.DiskStorageAccountType != api.DiskStorageAccountTypePremium_LRS { @@ -484,7 +478,7 @@ func TestEnsureDefaultsConsistencyExternalAuth(t *testing.T) { }) } -// TestPreExistingDataExternalAuth verifies that CosmosToInternalExternalAuth +// TestPreExistingDataExternalAuth verifies that CosmosGenericToInternal // applies canonical defaults when reading a Cosmos document that predates the // introduction of the PrefixPolicy field. func TestPreExistingDataExternalAuth(t *testing.T) { @@ -492,29 +486,30 @@ func TestPreExistingDataExternalAuth(t *testing.T) { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster/externalAuths/default", )) - preExistingDoc := &ExternalAuth{ + internalID := api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster/external_auth_config/external_auths/default")) + preExistingDoc := &GenericDocument[api.HCPOpenShiftClusterExternalAuth]{ TypedDocument: TypedDocument{ BaseDocument: BaseDocument{ID: "test-doc-id"}, ResourceID: resourceID, }, - ExternalAuthProperties: ExternalAuthProperties{ - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: resourceID, - InternalID: api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/test-cluster/external_auth_config/external_auths/default")), + Content: api.HCPOpenShiftClusterExternalAuth{ + // PrefixPolicy is intentionally zero-valued to simulate + // a pre-existing document that predates the field. + CosmosMetadata: arm.CosmosMetadata{ + ResourceID: resourceID, + }, + Properties: api.HCPOpenShiftClusterExternalAuthProperties{ ProvisioningState: arm.ProvisioningStateSucceeded, }, - InternalState: ExternalAuthInternalState{ - InternalAPI: api.HCPOpenShiftClusterExternalAuth{ - // PrefixPolicy is intentionally zero-valued to simulate - // a pre-existing document that predates the field. - }, + ServiceProviderProperties: api.HCPOpenShiftClusterExternalAuthServiceProviderProperties{ + ClusterServiceID: &internalID, }, }, } - internalExternalAuth, err := CosmosToInternalExternalAuth(preExistingDoc) + internalExternalAuth, err := CosmosGenericToInternal(preExistingDoc) if err != nil { - t.Fatalf("CosmosToInternalExternalAuth failed: %v", err) + t.Fatalf("CosmosGenericToInternal failed: %v", err) } if internalExternalAuth.Properties.Claim.Mappings.Username.PrefixPolicy != api.UsernameClaimPrefixPolicyNone { diff --git a/internal/database/convert_externalauth.go b/internal/database/convert_externalauth.go deleted file mode 100644 index cc9f027578f..00000000000 --- a/internal/database/convert_externalauth.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "fmt" - "strings" - - "k8s.io/utils/ptr" - - "github.com/Azure/ARO-HCP/internal/api" -) - -func InternalToCosmosExternalAuth(internalObj *api.HCPOpenShiftClusterExternalAuth) (*ExternalAuth, error) { - if internalObj == nil { - return nil, nil - } - - // CosmosMetadata.ResourceID is the canonical identifier for cosmos-side - // concerns (partitioning, document UID, resource-type indexing). Use it - // instead of the ProxyResource.ID, which is an ARM-surface concern. - cosmosResourceID := internalObj.GetCosmosData().ResourceID - if cosmosResourceID == nil { - return nil, fmt.Errorf("internalObj is missing CosmosMetadata.ResourceID") - } - cosmosObj := &ExternalAuth{ - TypedDocument: TypedDocument{ - BaseDocument: BaseDocument{ - ID: internalObj.GetCosmosData().GetCosmosUID(), - }, - PartitionKey: strings.ToLower(cosmosResourceID.SubscriptionID), - ResourceID: cosmosResourceID, - ResourceType: cosmosResourceID.ResourceType.String(), - }, - ExternalAuthProperties: ExternalAuthProperties{ - HCPOpenShiftClusterExternalAuth: *internalObj, - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: cosmosResourceID, - InternalID: ptr.Deref(internalObj.ServiceProviderProperties.ClusterServiceID, api.InternalID{}), - ActiveOperationID: internalObj.ServiceProviderProperties.ActiveOperationID, - ProvisioningState: internalObj.Properties.ProvisioningState, - Identity: nil, - SystemData: internalObj.SystemData, - Tags: nil, - }, - - InternalState: ExternalAuthInternalState{ - InternalAPI: *internalObj, - }, - }, - } - - cosmosObj.InternalState.InternalAPI.CosmosMetadata = api.CosmosMetadata{} - - return cosmosObj, nil -} - -func CosmosToInternalExternalAuth(cosmosObj *ExternalAuth) (*api.HCPOpenShiftClusterExternalAuth, error) { - if cosmosObj == nil { - return nil, nil - } - - internalObj := cosmosObj.DeepCopy() - internalObj.ExistingCosmosUID = cosmosObj.ID - internalObj.SetEtag(cosmosObj.CosmosETag) - if internalObj.GetResourceID() == nil { - if cosmosObj.ResourceID != nil { - internalObj.SetResourceID(cosmosObj.ResourceID) - } else { - return nil, fmt.Errorf("internalObj is missing a resourceID: %T: %q", cosmosObj, cosmosObj.ID) - } - } - - internalObj.EnsureDefaults() - - return internalObj, nil -} diff --git a/internal/database/convert_externalauth_test.go b/internal/database/convert_externalauth_test.go deleted file mode 100644 index 0810a719c52..00000000000 --- a/internal/database/convert_externalauth_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "math/rand" - "strings" - "testing" - - "github.com/stretchr/testify/require" - - "sigs.k8s.io/randfill" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - azcorearm "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - - "github.com/Azure/ARO-HCP/internal/api" - "github.com/Azure/ARO-HCP/internal/api/arm" -) - -func TestRoundTripExternalAuthInternalCosmosInternal(t *testing.T) { - seed := rand.Int63() - t.Logf("seed: %d", seed) - - fuzzer := fuzzerFor([]interface{}{ - func(j *azcorearm.ResourceID, c randfill.Continue) { - *j = *api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg")) - }, - func(j *arm.Resource, c randfill.Continue) { - c.FillNoCustom(j) - j.ID = api.Must(azcorearm.ParseResourceID("/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/change-channel")) - j.Name = "change-channel" - j.Type = "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - }, - func(j *api.HCPOpenShiftClusterExternalAuthServiceProviderProperties, c randfill.Continue) { - c.FillNoCustom(j) - if j == nil { - return - } - clusterID := "r" + strings.ReplaceAll(c.String(10), "/", "-") - externalAuthID := strings.ReplaceAll(c.String(10), "/", "-") - foo := api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/" + clusterID + "/external_auth_config/external_auths/" + externalAuthID)) - j.ClusterServiceID = &foo - }, - func(j *api.CosmosMetadata, c randfill.Continue) { - c.FillNoCustom(j) - j.ResourceID = api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg")) - j.ExistingCosmosUID = "" - j.CosmosETag = "" - }, - func(j *api.HCPOpenShiftClusterExternalAuth, c randfill.Continue) { - c.FillNoCustom(j) - if j == nil { - return - } - // Canonical defaults are applied on Cosmos read, so ensure - // defaulted fields are never zero during round-trip testing. - if len(j.Properties.Claim.Mappings.Username.PrefixPolicy) == 0 { - j.Properties.Claim.Mappings.Username.PrefixPolicy = api.UsernameClaimPrefixPolicyNone - } - }, - func(j *arm.ManagedServiceIdentity, c randfill.Continue) { - c.FillNoCustom(j) - - // we only round trip keys, so only fill in keys - if j != nil && j.UserAssignedIdentities != nil { - for k := range j.UserAssignedIdentities { - j.UserAssignedIdentities[k] = nil - } - } - }, - }, rand.NewSource(seed)) - - // Try a few times, since runTest uses random values. - for i := 0; i < 20; i++ { - original := &api.HCPOpenShiftClusterExternalAuth{} - fuzzer.Fill(original) - roundTripInternalToCosmosToInternal[api.HCPOpenShiftClusterExternalAuth, ExternalAuth](t, original) - } -} - -func TestCosmosToInternalExternalAuthPreservesETag(t *testing.T) { - expectedETag := azcore.ETag("test-etag-value-12345") - resourceID := api.Must(azcorearm.ParseResourceID("/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/rg/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/my-cluster")) - - cosmosObj := &ExternalAuth{ - TypedDocument: TypedDocument{ - BaseDocument: BaseDocument{ - CosmosETag: expectedETag, - }, - }, - ExternalAuthProperties: ExternalAuthProperties{ - HCPOpenShiftClusterExternalAuth: api.HCPOpenShiftClusterExternalAuth{ - CosmosMetadata: arm.CosmosMetadata{ - ResourceID: resourceID, - }, - }, - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: resourceID, - }, - }, - } - - internalObj, err := CosmosToInternalExternalAuth(cosmosObj) - require.NoError(t, err) - require.Equal(t, expectedETag, internalObj.GetCosmosData().CosmosETag) -} diff --git a/internal/database/convert_generic.go b/internal/database/convert_generic.go index d3b061ef063..f989bc3f1af 100644 --- a/internal/database/convert_generic.go +++ b/internal/database/convert_generic.go @@ -68,6 +68,18 @@ func CosmosGenericToInternal[InternalAPIType any](cosmosObj *GenericDocument[Int cosmosData := ret.(arm.CosmosPersistable).GetCosmosData() cosmosData.ExistingCosmosUID = cosmosObj.ID ret.SetEtag(cosmosObj.CosmosETag) + // Legacy documents predating the InstanceVersion field land here with + // the zero value. Treat that as "version 1" so a subsequent Get → modify + // → Replace path round-trips without tripping PrepareForReplace, which + // only allows InstanceVersion==0 to flag fresh-built docs the caller + // forgot to deep-copy from the existing record. + if cosmosData.InstanceVersion == 0 { + cosmosData.InstanceVersion = 1 + } + + if defaulter, ok := ret.(Defaulter); ok { + defaulter.EnsureDefaults() + } // this isn't pretty, but on balance it's a better choice so that we can share all the rest. switch castObj := any(ret).(type) { @@ -93,3 +105,7 @@ func CosmosGenericToInternal[InternalAPIType any](cosmosObj *GenericDocument[Int return &cosmosObj.Content, nil } + +type Defaulter interface { + EnsureDefaults() +} diff --git a/internal/database/convert_nodepool.go b/internal/database/convert_nodepool.go deleted file mode 100644 index c02dc62cefc..00000000000 --- a/internal/database/convert_nodepool.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "fmt" - "strings" - - "k8s.io/utils/ptr" - - "github.com/Azure/ARO-HCP/internal/api" -) - -func InternalToCosmosNodePool(internalObj *api.HCPOpenShiftClusterNodePool) (*NodePool, error) { - if internalObj == nil { - return nil, nil - } - - // CosmosMetadata.ResourceID is the canonical identifier for cosmos-side - // concerns (partitioning, document UID, resource-type indexing). Use it - // instead of the TrackedResource.ID, which is an ARM-surface concern. - cosmosResourceID := internalObj.GetCosmosData().ResourceID - if cosmosResourceID == nil { - return nil, fmt.Errorf("internalObj is missing CosmosMetadata.ResourceID") - } - cosmosObj := &NodePool{ - TypedDocument: TypedDocument{ - BaseDocument: BaseDocument{ - ID: internalObj.GetCosmosData().GetCosmosUID(), - }, - PartitionKey: strings.ToLower(cosmosResourceID.SubscriptionID), - ResourceID: cosmosResourceID, - ResourceType: cosmosResourceID.ResourceType.String(), - }, - NodePoolProperties: NodePoolProperties{ - HCPOpenShiftClusterNodePool: *internalObj, - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: cosmosResourceID, - InternalID: ptr.Deref(internalObj.ServiceProviderProperties.ClusterServiceID, api.InternalID{}), - ActiveOperationID: internalObj.ServiceProviderProperties.ActiveOperationID, - ProvisioningState: internalObj.Properties.ProvisioningState, - Identity: internalObj.Identity.DeepCopy(), - SystemData: internalObj.SystemData, - Tags: copyTags(internalObj.Tags), - }, - InternalState: NodePoolInternalState{ - InternalAPI: *internalObj, - }, - }, - } - - cosmosObj.InternalState.InternalAPI.CosmosMetadata = api.CosmosMetadata{} - - return cosmosObj, nil -} - -func CosmosToInternalNodePool(cosmosObj *NodePool) (*api.HCPOpenShiftClusterNodePool, error) { - if cosmosObj == nil { - return nil, nil - } - - internalObj := cosmosObj.DeepCopy() - internalObj.ExistingCosmosUID = cosmosObj.ID - internalObj.SetEtag(cosmosObj.CosmosETag) - if internalObj.GetResourceID() == nil { - if cosmosObj.ResourceID != nil { - internalObj.SetResourceID(cosmosObj.ResourceID) - } else { - return nil, fmt.Errorf("internalObj is missing a resourceID: %T: %q", cosmosObj, cosmosObj.ID) - } - } - - internalObj.EnsureDefaults() - - return internalObj, nil -} diff --git a/internal/database/convert_nodepool_test.go b/internal/database/convert_nodepool_test.go index 35d4ed0fc33..a1859492deb 100644 --- a/internal/database/convert_nodepool_test.go +++ b/internal/database/convert_nodepool_test.go @@ -15,114 +15,11 @@ package database import ( - "math/rand" - "strings" "testing" - "github.com/stretchr/testify/require" - - "sigs.k8s.io/randfill" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - azcorearm "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/ARO-HCP/internal/api" - "github.com/Azure/ARO-HCP/internal/api/arm" ) -func TestRoundTripNodePoolInternalCosmosInternal(t *testing.T) { - seed := rand.Int63() - t.Logf("seed: %d", seed) - - fuzzer := fuzzerFor([]interface{}{ - func(j *azcorearm.ResourceID, c randfill.Continue) { - *j = *api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg")) - }, - func(j *arm.Resource, c randfill.Continue) { - c.FillNoCustom(j) - j.ID = api.Must(azcorearm.ParseResourceID("/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/change-channel")) - j.Name = "change-channel" - j.Type = "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - }, - func(j *api.HCPOpenShiftClusterNodePoolServiceProviderProperties, c randfill.Continue) { - c.FillNoCustom(j) - if j == nil { - return - } - // Match CosmosToInternalNodePool: empty InternalID becomes nil on read. Round-trip - // must always carry a non-empty node pool ClusterServiceID (OCM node pool href). - clusterID := "r" + strings.ReplaceAll(c.String(10), "/", "-") - nodePoolID := strings.ReplaceAll(c.String(10), "/", "-") - foo := api.Must(api.NewInternalID("/api/aro_hcp/v1alpha1/clusters/" + clusterID + "/node_pools/" + nodePoolID)) - j.ClusterServiceID = &foo - }, - func(j *api.CosmosMetadata, c randfill.Continue) { - c.FillNoCustom(j) - j.ResourceID = api.Must(azcorearm.ParseResourceID("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRg")) - j.ExistingCosmosUID = "" - j.CosmosETag = "" - }, - func(j *api.HCPOpenShiftClusterNodePool, c randfill.Continue) { - c.FillNoCustom(j) - if j == nil { - return - } - // Canonical defaults are applied on Cosmos read, so ensure - // defaulted fields are never zero during round-trip testing. - if len(j.Properties.Platform.OSDisk.DiskStorageAccountType) == 0 { - j.Properties.Platform.OSDisk.DiskStorageAccountType = api.DiskStorageAccountTypePremium_LRS - } - if len(j.Properties.Platform.OSDisk.DiskType) == 0 { - j.Properties.Platform.OSDisk.DiskType = api.OsDiskTypeManaged - } - }, - func(j *arm.ManagedServiceIdentity, c randfill.Continue) { - c.FillNoCustom(j) - - // we only round trip keys, so only fill in keys - if j != nil && j.UserAssignedIdentities != nil { - for k := range j.UserAssignedIdentities { - j.UserAssignedIdentities[k] = nil - } - } - }, - }, rand.NewSource(seed)) - - // Try a few times, since runTest uses random values. - for i := 0; i < 20; i++ { - original := &api.HCPOpenShiftClusterNodePool{} - fuzzer.Fill(original) - roundTripInternalToCosmosToInternal[api.HCPOpenShiftClusterNodePool, NodePool](t, original) - } -} - -func TestCosmosToInternalNodePoolPreservesETag(t *testing.T) { - expectedETag := azcore.ETag("test-etag-value-12345") - resourceID := api.Must(azcorearm.ParseResourceID("/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/rg/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/my-cluster/nodePools/my-np")) - - cosmosObj := &NodePool{ - TypedDocument: TypedDocument{ - BaseDocument: BaseDocument{ - CosmosETag: expectedETag, - }, - }, - NodePoolProperties: NodePoolProperties{ - HCPOpenShiftClusterNodePool: api.HCPOpenShiftClusterNodePool{ - CosmosMetadata: arm.CosmosMetadata{ - ResourceID: resourceID, - }, - }, - IntermediateResourceDoc: &ResourceDocument{ - ResourceID: resourceID, - }, - }, - } - - internalObj, err := CosmosToInternalNodePool(cosmosObj) - require.NoError(t, err) - require.Equal(t, expectedETag, internalObj.GetCosmosData().CosmosETag) -} - func TestNodePoolEnsureDefaults(t *testing.T) { tests := []struct { name string diff --git a/internal/database/crud_fleet_helpers.go b/internal/database/crud_fleet_helpers.go index 06d0873f295..5fae7e591d1 100644 --- a/internal/database/crud_fleet_helpers.go +++ b/internal/database/crud_fleet_helpers.go @@ -96,6 +96,9 @@ func createFleetItem[InternalAPIType, CosmosAPIType any]( if strings.ToLower(partitionKeyString) != partitionKeyString { return nil, fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } + if err := PrepareForCreate(newObj); err != nil { + return nil, err + } cosmosMetadata, data, err := serializeFleetItem[InternalAPIType, CosmosAPIType](partitionKeyString, newObj) if err != nil { return nil, err @@ -124,6 +127,9 @@ func replaceFleetItem[InternalAPIType, CosmosAPIType any]( if strings.ToLower(partitionKeyString) != partitionKeyString { return nil, fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } + if err := PrepareForReplace(newObj); err != nil { + return nil, err + } cosmosMetadata, data, err := serializeFleetItem[InternalAPIType, CosmosAPIType](partitionKeyString, newObj) if err != nil { return nil, err @@ -132,9 +138,7 @@ func replaceFleetItem[InternalAPIType, CosmosAPIType any]( if opts == nil { opts = &azcosmos.ItemOptions{} } - if len(cosmosMetadata.CosmosETag) > 0 { - opts.IfMatchEtag = &cosmosMetadata.CosmosETag - } + opts.IfMatchEtag = &cosmosMetadata.CosmosETag opts.EnableContentResponseOnWrite = true responseItem, err := containerClient.ReplaceItem( diff --git a/internal/database/crud_hcpcluster.go b/internal/database/crud_hcpcluster.go index b31f4868b1b..16071a5257f 100644 --- a/internal/database/crud_hcpcluster.go +++ b/internal/database/crud_hcpcluster.go @@ -128,7 +128,7 @@ func NewHCPClusterCRUD(containerClient *azcosmos.ContainerClient, subscriptionID parentResourceID := api.Must(azcorearm.ParseResourceID(strings.ToLower(path.Join(parts...)))) return &hcpClusterCRUD{ - nestedCosmosResourceCRUD: NewCosmosResourceCRUD[api.HCPOpenShiftCluster, HCPCluster](containerClient, parentResourceID, api.ClusterResourceType), + nestedCosmosResourceCRUD: NewCosmosResourceCRUD[api.HCPOpenShiftCluster, GenericDocument[api.HCPOpenShiftCluster]](containerClient, parentResourceID, api.ClusterResourceType), } } @@ -144,7 +144,7 @@ type ExternalAuthsCRUD interface { } type hcpClusterCRUD struct { - *nestedCosmosResourceCRUD[api.HCPOpenShiftCluster, HCPCluster] + *nestedCosmosResourceCRUD[api.HCPOpenShiftCluster, GenericDocument[api.HCPOpenShiftCluster]] } var _ HCPClusterCRUD = &hcpClusterCRUD{} @@ -159,7 +159,7 @@ func (h *hcpClusterCRUD) ExternalAuth(hcpClusterName string) ExternalAuthsCRUD { hcpClusterName))) return &externalAuthCRUD{ - nestedCosmosResourceCRUD: NewCosmosResourceCRUD[api.HCPOpenShiftClusterExternalAuth, ExternalAuth]( + nestedCosmosResourceCRUD: NewCosmosResourceCRUD[api.HCPOpenShiftClusterExternalAuth, GenericDocument[api.HCPOpenShiftClusterExternalAuth]]( h.containerClient, parentResourceID, api.ExternalAuthResourceType, @@ -177,7 +177,7 @@ func (h *hcpClusterCRUD) NodePools(hcpClusterName string) NodePoolsCRUD { hcpClusterName))) return &nodePoolsCRUD{ - nestedCosmosResourceCRUD: NewCosmosResourceCRUD[api.HCPOpenShiftClusterNodePool, NodePool]( + nestedCosmosResourceCRUD: NewCosmosResourceCRUD[api.HCPOpenShiftClusterNodePool, GenericDocument[api.HCPOpenShiftClusterNodePool]]( h.containerClient, parentResourceID, api.NodePoolResourceType), @@ -213,7 +213,7 @@ func (h *hcpClusterCRUD) ManagementClusterContents(hcpClusterName string) Manage } type externalAuthCRUD struct { - *nestedCosmosResourceCRUD[api.HCPOpenShiftClusterExternalAuth, ExternalAuth] + *nestedCosmosResourceCRUD[api.HCPOpenShiftClusterExternalAuth, GenericDocument[api.HCPOpenShiftClusterExternalAuth]] } func (h *externalAuthCRUD) Controllers(externalAuthName string) ResourceCRUD[api.Controller] { @@ -228,7 +228,7 @@ func (h *externalAuthCRUD) Controllers(externalAuthName string) ResourceCRUD[api } type nodePoolsCRUD struct { - *nestedCosmosResourceCRUD[api.HCPOpenShiftClusterNodePool, NodePool] + *nestedCosmosResourceCRUD[api.HCPOpenShiftClusterNodePool, GenericDocument[api.HCPOpenShiftClusterNodePool]] } func (h *nodePoolsCRUD) Controllers(nodePoolName string) ResourceCRUD[api.Controller] { diff --git a/internal/database/crud_helpers.go b/internal/database/crud_helpers.go index 374cde05d1d..c6c7f220098 100644 --- a/internal/database/crud_helpers.go +++ b/internal/database/crud_helpers.go @@ -163,9 +163,49 @@ func list[InternalAPIType, CosmosAPIType any](ctx context.Context, containerClie } } -// serializeItem will create a CosmosUID if it doesn't exist, otherwise uses what exists. This makes it compatible with -// create, replace, and create -func serializeItem[InternalAPIType, CosmosAPIType any](newObj *InternalAPIType) (*arm.CosmosMetadata, []byte, error) { +// PrepareForCreate sets InstanceVersion to 1 on the CosmosMetadata of newObj. +// All Create paths (in this package and in databasetesting) must call this +// before serializing the document so that a fresh insert starts the version +// counter at 1. The value is unconditionally overwritten so callers can't +// accidentally carry over a value from a prior Get. +func PrepareForCreate[InternalAPIType any](newObj *InternalAPIType) error { + cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) + if !ok { + return fmt.Errorf("type %T does not implement CosmosPersistable interface", newObj) + } + if cosmosPersistable.GetCosmosData().InstanceVersion != 0 { + return fmt.Errorf("create of %T requires InstanceVersion to be 0; refusing to overwrite existing value", newObj) + } + cosmosPersistable.GetCosmosData().InstanceVersion = 1 + return nil +} + +// PrepareForReplace enforces the two invariants of an update: every Replace +// must carry a CosmosETag (we refuse unconditional updates) and the on-disk +// InstanceVersion auto-increments. All Replace paths (in this package and in +// databasetesting) must call this before serializing the document. +func PrepareForReplace[InternalAPIType any](newObj *InternalAPIType) error { + cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) + if !ok { + return fmt.Errorf("type %T does not implement CosmosPersistable interface", newObj) + } + md := cosmosPersistable.GetCosmosData() + if len(md.CosmosETag) == 0 { + return fmt.Errorf("replace of %T requires a non-empty CosmosETag; refusing to perform an unconditional update", newObj) + } + if md.InstanceVersion == 0 { + return fmt.Errorf("replace of %T requires a non-zero InstanceVersion; refusing to perform update; DeepCopy the existing content to avoid overwrite", newObj) + } + md.InstanceVersion++ + return nil +} + +// SerializeItem produces the on-disk JSON representation of newObj. It validates +// the cosmos UID and partition key, converts the internal type to its cosmos form, +// and returns the marshaled bytes alongside the resolved CosmosMetadata. Mocks and +// production callers share this so a Create/Replace from either path produces +// byte-identical output. +func SerializeItem[InternalAPIType, CosmosAPIType any](newObj *InternalAPIType) (*arm.CosmosMetadata, []byte, error) { cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) if !ok { return nil, nil, fmt.Errorf("type %T does not implement CosmosPersistable interface", newObj) @@ -199,7 +239,10 @@ func addCreateToTransaction[InternalAPIType, CosmosAPIType any](ctx context.Cont if strings.ToLower(partitionKeyString) != partitionKeyString { return "", fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } - cosmosMetadata, data, err := serializeItem[InternalAPIType, CosmosAPIType](newObj) + if err := PrepareForCreate(newObj); err != nil { + return "", err + } + cosmosMetadata, data, err := SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return "", err } @@ -229,7 +272,10 @@ func addReplaceToTransaction[InternalAPIType, CosmosAPIType any](ctx context.Con if strings.ToLower(partitionKeyString) != partitionKeyString { return "", fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } - cosmosMetadata, data, err := serializeItem[InternalAPIType, CosmosAPIType](newObj) + if err := PrepareForReplace(newObj); err != nil { + return "", err + } + cosmosMetadata, data, err := SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return "", err } @@ -247,14 +293,11 @@ func addReplaceToTransaction[InternalAPIType, CosmosAPIType any](ctx context.Con if opts == nil { opts = &azcosmos.TransactionalBatchItemOptions{} } - if len(cosmosMetadata.CosmosETag) > 0 { - opts.IfMatchETag = &cosmosMetadata.CosmosETag - } + opts.IfMatchETag = &cosmosMetadata.CosmosETag transaction.AddStep( transactionDetails, func(b *azcosmos.TransactionalBatch) (string, error) { - // TODO decide if, when, and how we ever add etags. Currently we do unconditional replaces. b.ReplaceItem(cosmosMetadata.GetCosmosUID(), data, opts) return cosmosMetadata.GetCosmosUID(), nil }, @@ -267,7 +310,10 @@ func create[InternalAPIType, CosmosAPIType any](ctx context.Context, containerCl if strings.ToLower(partitionKeyString) != partitionKeyString { return nil, fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } - cosmosMetadata, data, err := serializeItem[InternalAPIType, CosmosAPIType](newObj) + if err := PrepareForCreate(newObj); err != nil { + return nil, err + } + cosmosMetadata, data, err := SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return nil, err } @@ -292,7 +338,10 @@ func replace[InternalAPIType, CosmosAPIType any](ctx context.Context, containerC if strings.ToLower(partitionKeyString) != partitionKeyString { return nil, fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } - cosmosMetadata, data, err := serializeItem[InternalAPIType, CosmosAPIType](newObj) + if err := PrepareForReplace(newObj); err != nil { + return nil, err + } + cosmosMetadata, data, err := SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return nil, err } @@ -303,9 +352,7 @@ func replace[InternalAPIType, CosmosAPIType any](ctx context.Context, containerC if opts == nil { opts = &azcosmos.ItemOptions{} } - if len(cosmosMetadata.CosmosETag) > 0 { - opts.IfMatchEtag = &cosmosMetadata.CosmosETag - } + opts.IfMatchEtag = &cosmosMetadata.CosmosETag opts.EnableContentResponseOnWrite = true responseItem, err := containerClient.ReplaceItem(ctx, azcosmos.NewPartitionKeyString(partitionKeyString), cosmosMetadata.GetCosmosUID(), data, opts) diff --git a/internal/database/crud_helpers_test.go b/internal/database/crud_helpers_test.go new file mode 100644 index 00000000000..f93fa485106 --- /dev/null +++ b/internal/database/crud_helpers_test.go @@ -0,0 +1,92 @@ +// Copyright 2026 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package database + +import ( + "strings" + "testing" + + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + + "github.com/Azure/ARO-HCP/internal/api/arm" +) + +func TestPrepareForCreate_SetsInstanceVersionToOne(t *testing.T) { + obj := &arm.Subscription{ + CosmosMetadata: arm.CosmosMetadata{InstanceVersion: 0}, + } + if err := PrepareForCreate(obj); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if obj.InstanceVersion != 1 { + t.Errorf("got InstanceVersion=%d, want 1", obj.InstanceVersion) + } +} + +func TestPrepareForCreate_RejectsNonZeroInstanceVersion(t *testing.T) { + for _, start := range []int64{1, 7, 999} { + obj := &arm.Subscription{ + CosmosMetadata: arm.CosmosMetadata{InstanceVersion: start}, + } + err := PrepareForCreate(obj) + if err == nil { + t.Errorf("starting InstanceVersion=%d: expected error, got nil", start) + continue + } + if !strings.Contains(err.Error(), "InstanceVersion to be 0") { + t.Errorf("starting InstanceVersion=%d: error should mention the InstanceVersion requirement; got: %v", start, err) + } + if obj.InstanceVersion != start { + t.Errorf("starting InstanceVersion=%d: object was mutated on the failure path: got %d", start, obj.InstanceVersion) + } + } +} + +func TestPrepareForReplace_IncrementsInstanceVersion(t *testing.T) { + obj := &arm.Subscription{ + CosmosMetadata: arm.CosmosMetadata{ + InstanceVersion: 7, + CosmosETag: azcore.ETag("etag-7"), + }, + } + if err := PrepareForReplace(obj); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if obj.InstanceVersion != 8 { + t.Errorf("got InstanceVersion=%d, want 8", obj.InstanceVersion) + } +} + +func TestPrepareForReplace_RequiresEtag(t *testing.T) { + obj := &arm.Subscription{ + CosmosMetadata: arm.CosmosMetadata{ + InstanceVersion: 7, + // CosmosETag intentionally empty + }, + } + err := PrepareForReplace(obj) + if err == nil { + t.Fatal("expected an error for missing etag, got nil") + } + if !strings.Contains(err.Error(), "non-empty CosmosETag") { + t.Errorf("error should mention the etag requirement; got: %v", err) + } + // InstanceVersion must not have been touched on the failure path — + // otherwise a caller that swallows the error would silently double-bump + // on the next retry. + if obj.InstanceVersion != 7 { + t.Errorf("InstanceVersion was mutated on the failure path: got %d, want 7", obj.InstanceVersion) + } +} diff --git a/internal/database/crud_kube_applier_helpers.go b/internal/database/crud_kube_applier_helpers.go index b9fac3d7de1..215d6e0583a 100644 --- a/internal/database/crud_kube_applier_helpers.go +++ b/internal/database/crud_kube_applier_helpers.go @@ -26,7 +26,7 @@ import ( "github.com/Azure/ARO-HCP/internal/api/kubeapplier" ) -// serializeKubeApplierItem mirrors serializeItem but validates the partition key +// serializeKubeApplierItem mirrors SerializeItem but validates the partition key // against the *Desire's spec.managementCluster instead of the resourceID's // subscriptionID. The two never match for kube-applier objects. func serializeKubeApplierItem[InternalAPIType, CosmosAPIType any]( @@ -87,6 +87,9 @@ func createKubeApplier[InternalAPIType, CosmosAPIType any]( if strings.ToLower(partitionKeyString) != partitionKeyString { return nil, fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } + if err := PrepareForCreate(newObj); err != nil { + return nil, err + } cosmosMetadata, data, err := serializeKubeApplierItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return nil, err @@ -125,6 +128,9 @@ func replaceKubeApplier[InternalAPIType, CosmosAPIType any]( if strings.ToLower(partitionKeyString) != partitionKeyString { return nil, fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } + if err := PrepareForReplace(newObj); err != nil { + return nil, err + } cosmosMetadata, data, err := serializeKubeApplierItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return nil, err @@ -143,9 +149,7 @@ func replaceKubeApplier[InternalAPIType, CosmosAPIType any]( if opts == nil { opts = &azcosmos.ItemOptions{} } - if len(cosmosMetadata.CosmosETag) > 0 { - opts.IfMatchEtag = &cosmosMetadata.CosmosETag - } + opts.IfMatchEtag = &cosmosMetadata.CosmosETag opts.EnableContentResponseOnWrite = true responseItem, err := containerClient.ReplaceItem( @@ -168,6 +172,9 @@ func addKubeApplierCreateToTransaction[InternalAPIType, CosmosAPIType any]( if strings.ToLower(partitionKeyString) != partitionKeyString { return "", fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } + if err := PrepareForCreate(newObj); err != nil { + return "", err + } cosmosMetadata, data, err := serializeKubeApplierItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return "", err @@ -210,6 +217,9 @@ func addKubeApplierReplaceToTransaction[InternalAPIType, CosmosAPIType any]( if strings.ToLower(partitionKeyString) != partitionKeyString { return "", fmt.Errorf("partitionKeyString must be lowercase, not: %q", partitionKeyString) } + if err := PrepareForReplace(newObj); err != nil { + return "", err + } cosmosMetadata, data, err := serializeKubeApplierItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { return "", err @@ -235,9 +245,7 @@ func addKubeApplierReplaceToTransaction[InternalAPIType, CosmosAPIType any]( if opts == nil { opts = &azcosmos.TransactionalBatchItemOptions{} } - if len(cosmosMetadata.CosmosETag) > 0 { - opts.IfMatchETag = &cosmosMetadata.CosmosETag - } + opts.IfMatchETag = &cosmosMetadata.CosmosETag transaction.AddStep( transactionDetails, diff --git a/internal/database/crud_nested_resource.go b/internal/database/crud_nested_resource.go index 8ad746c36d4..83bfca5c88c 100644 --- a/internal/database/crud_nested_resource.go +++ b/internal/database/crud_nested_resource.go @@ -57,7 +57,7 @@ type nestedCosmosResourceCRUD[InternalAPIType, CosmosAPIType any] struct { resourceType azcorearm.ResourceType } -var _ ResourceCRUD[api.HCPOpenShiftClusterNodePool] = &nestedCosmosResourceCRUD[api.HCPOpenShiftClusterNodePool, NodePool]{} +var _ ResourceCRUD[api.HCPOpenShiftClusterNodePool] = &nestedCosmosResourceCRUD[api.HCPOpenShiftClusterNodePool, GenericDocument[api.HCPOpenShiftClusterNodePool]]{} func NewCosmosResourceCRUD[InternalAPIType, CosmosAPIType any]( containerClient *azcosmos.ContainerClient, parentResourceID *azcorearm.ResourceID, resourceType azcorearm.ResourceType) *nestedCosmosResourceCRUD[InternalAPIType, CosmosAPIType] { diff --git a/internal/database/global_lister.go b/internal/database/global_lister.go index 330d77c0f81..3d655f701c6 100644 --- a/internal/database/global_lister.go +++ b/internal/database/global_lister.go @@ -72,21 +72,21 @@ func (g *cosmosResourcesGlobalListers) Subscriptions() GlobalLister[arm.Subscrip } func (g *cosmosResourcesGlobalListers) Clusters() GlobalLister[api.HCPOpenShiftCluster] { - return &cosmosGlobalLister[api.HCPOpenShiftCluster, HCPCluster]{ + return &cosmosGlobalLister[api.HCPOpenShiftCluster, GenericDocument[api.HCPOpenShiftCluster]]{ containerClient: g.resources, resourceType: api.ClusterResourceType, } } func (g *cosmosResourcesGlobalListers) NodePools() GlobalLister[api.HCPOpenShiftClusterNodePool] { - return &cosmosGlobalLister[api.HCPOpenShiftClusterNodePool, NodePool]{ + return &cosmosGlobalLister[api.HCPOpenShiftClusterNodePool, GenericDocument[api.HCPOpenShiftClusterNodePool]]{ containerClient: g.resources, resourceType: api.NodePoolResourceType, } } func (g *cosmosResourcesGlobalListers) ExternalAuths() GlobalLister[api.HCPOpenShiftClusterExternalAuth] { - return &cosmosGlobalLister[api.HCPOpenShiftClusterExternalAuth, ExternalAuth]{ + return &cosmosGlobalLister[api.HCPOpenShiftClusterExternalAuth, GenericDocument[api.HCPOpenShiftClusterExternalAuth]]{ containerClient: g.resources, resourceType: api.ExternalAuthResourceType, } diff --git a/internal/database/transaction.go b/internal/database/transaction.go index dbbd713e00d..775615799be 100644 --- a/internal/database/transaction.go +++ b/internal/database/transaction.go @@ -206,11 +206,11 @@ func (r *cosmosDBTransactionResult) GetItem(cosmosUID string) (any, error) { switch strings.ToLower(typedDoc.ResourceType) { case strings.ToLower(api.ClusterResourceType.String()): - return getCastResult[api.HCPOpenShiftCluster, HCPCluster](r, cosmosUID) + return getCastResult[api.HCPOpenShiftCluster, GenericDocument[api.HCPOpenShiftCluster]](r, cosmosUID) case strings.ToLower(api.NodePoolResourceType.String()): - return getCastResult[api.HCPOpenShiftClusterNodePool, NodePool](r, cosmosUID) + return getCastResult[api.HCPOpenShiftClusterNodePool, GenericDocument[api.HCPOpenShiftClusterNodePool]](r, cosmosUID) case strings.ToLower(api.ExternalAuthResourceType.String()): - return getCastResult[api.HCPOpenShiftClusterExternalAuth, ExternalAuth](r, cosmosUID) + return getCastResult[api.HCPOpenShiftClusterExternalAuth, GenericDocument[api.HCPOpenShiftClusterExternalAuth]](r, cosmosUID) default: return nil, fmt.Errorf("unknown resource type '%s'", typedDoc.ResourceType) } diff --git a/internal/database/types_externalauth.go b/internal/database/types_externalauth.go deleted file mode 100644 index e952c06f0b4..00000000000 --- a/internal/database/types_externalauth.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "github.com/Azure/ARO-HCP/internal/api" -) - -type ExternalAuth struct { - TypedDocument `json:",inline"` - - ExternalAuthProperties `json:"properties"` -} - -type ExternalAuthProperties struct { - // HCPOpenShiftClusterExternalAuth is the inline serialization that mirrors GenericDocument[api.HCPOpenShiftClusterExternalAuth] - // (the destination shape for externalauth documents). The reading path now uses these inline fields as the - // source of truth; the IntermediateResourceDoc/InternalState siblings are still written for compatibility - // with old readers, but will be removed once all readers have migrated. - api.HCPOpenShiftClusterExternalAuth `json:",inline"` - - // IntermediateResourceDoc exists so that we can stop inlining the resource document so that we can directly - // embed the InternalAPIType which has colliding serialization fields. - IntermediateResourceDoc *ResourceDocument `json:"intermediateResourceDoc"` - - // TODO we may need look-aside data that we want to store in the same place. Build the nesting to allow it - InternalState ExternalAuthInternalState `json:"internalState"` -} - -type ExternalAuthInternalState struct { - InternalAPI api.HCPOpenShiftClusterExternalAuth `json:"internalAPI"` -} - -func (o *ExternalAuth) GetTypedDocument() *TypedDocument { - return &o.TypedDocument -} diff --git a/internal/database/types_hcpcluster.go b/internal/database/types_hcpcluster.go deleted file mode 100644 index 5b569708865..00000000000 --- a/internal/database/types_hcpcluster.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "github.com/Azure/ARO-HCP/internal/api" -) - -type HCPCluster struct { - TypedDocument `json:",inline"` - - HCPClusterProperties `json:"properties"` -} - -type HCPClusterProperties struct { - // HCPOpenShiftCluster is the inline serialization that mirrors GenericDocument[api.HCPOpenShiftCluster] - // (the destination shape for cluster documents). The reading path now uses these inline fields as the - // source of truth; the IntermediateResourceDoc/InternalState siblings are still written for compatibility - // with old readers, but will be removed once all readers have migrated. - api.HCPOpenShiftCluster `json:",inline"` - - // IntermediateResourceDoc exists so that we can stop inlining the resource document so that we can directly - // embed the InternalAPIType which has colliding serialization fields. - IntermediateResourceDoc *ResourceDocument `json:"intermediateResourceDoc"` - - // TODO we may need look-aside data that we want to store in the same place. Build the nesting to allow it - InternalState ClusterInternalState `json:"internalState"` -} - -type ClusterInternalState struct { - InternalAPI api.HCPOpenShiftCluster `json:"internalAPI"` -} - -func (o *HCPCluster) GetTypedDocument() *TypedDocument { - return &o.TypedDocument -} diff --git a/internal/database/types_nodepool.go b/internal/database/types_nodepool.go deleted file mode 100644 index 4c24ac8e084..00000000000 --- a/internal/database/types_nodepool.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2025 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package database - -import ( - "github.com/Azure/ARO-HCP/internal/api" -) - -type NodePool struct { - TypedDocument `json:",inline"` - - NodePoolProperties `json:"properties"` -} - -type NodePoolProperties struct { - // HCPOpenShiftClusterNodePool is the inline serialization that mirrors GenericDocument[api.HCPOpenShiftClusterNodePool] - // (the destination shape for nodepool documents). The reading path now uses these inline fields as the - // source of truth; the IntermediateResourceDoc/InternalState siblings are still written for compatibility - // with old readers, but will be removed once all readers have migrated. - api.HCPOpenShiftClusterNodePool `json:",inline"` - - // IntermediateResourceDoc exists so that we can stop inlining the resource document so that we can directly - // embed the InternalAPIType which has colliding serialization fields. - IntermediateResourceDoc *ResourceDocument `json:"intermediateResourceDoc"` - - // TODO we may need look-aside data that we want to store in the same place. Build the nesting to allow it - InternalState NodePoolInternalState `json:"internalState"` -} - -type NodePoolInternalState struct { - InternalAPI api.HCPOpenShiftClusterNodePool `json:"internalAPI"` -} - -func (o *NodePool) GetTypedDocument() *TypedDocument { - return &o.TypedDocument -} diff --git a/internal/databasetesting/mock_dbclient_test.go b/internal/databasetesting/mock_dbclient_test.go index 31e840c871d..4a8776cdfd5 100644 --- a/internal/databasetesting/mock_dbclient_test.go +++ b/internal/databasetesting/mock_dbclient_test.go @@ -345,9 +345,10 @@ func TestMockResourcesDBClient_CRUD_Subscription(t *testing.T) { t.Errorf("Expected state %s, got %s", arm.SubscriptionStateRegistered, retrieved.State) } - // Replace - subscription.State = arm.SubscriptionStateSuspended - replaced, err := subscriptionCRUD.Replace(ctx, subscription, nil) + // Replace using the object returned from Create so the etag is carried + // over; Replace refuses unconditional updates. + created.State = arm.SubscriptionStateSuspended + replaced, err := subscriptionCRUD.Replace(ctx, created, nil) if err != nil { t.Fatalf("Failed to replace subscription: %v", err) } diff --git a/internal/databasetesting/mock_resources_crud.go b/internal/databasetesting/mock_resources_crud.go index 4712d5bb71e..245c1de9a28 100644 --- a/internal/databasetesting/mock_resources_crud.go +++ b/internal/databasetesting/mock_resources_crud.go @@ -231,24 +231,14 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) List(ctx context.Cont } func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) Create(ctx context.Context, newObj *InternalAPIType, options *azcosmos.ItemOptions) (*InternalAPIType, error) { - cosmosObj, err := database.InternalToCosmos[InternalAPIType, CosmosAPIType](newObj) - if err != nil { - return nil, fmt.Errorf("failed to convert to cosmos type: %w", err) + if err := database.PrepareForCreate(newObj); err != nil { + return nil, err } - - data, err := json.Marshal(cosmosObj) + cosmosMetadata, data, err := database.SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { - return nil, fmt.Errorf("failed to marshal cosmos object: %w", err) - } - - // Get cosmos ID from the object - cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) - if !ok { - return nil, fmt.Errorf("type %T does not implement CosmosPersistable", newObj) + return nil, err } - - cosmosData := cosmosPersistable.GetCosmosData() - cosmosID := cosmosData.GetCosmosUID() + cosmosID := cosmosMetadata.GetCosmosUID() // Check for existing if _, exists := m.client.GetDocument(cosmosID); exists { @@ -267,31 +257,15 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) Create(ctx context.Co } func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) Replace(ctx context.Context, newObj *InternalAPIType, options *azcosmos.ItemOptions) (*InternalAPIType, error) { - cosmosObj, err := database.InternalToCosmos[InternalAPIType, CosmosAPIType](newObj) - if err != nil { - return nil, fmt.Errorf("failed to convert to cosmos type: %w", err) + if err := database.PrepareForReplace(newObj); err != nil { + return nil, err } - - data, err := json.Marshal(cosmosObj) + cosmosMetadata, data, err := database.SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { - return nil, fmt.Errorf("failed to marshal cosmos object: %w", err) - } - - // Get cosmos ID and resource info from the converted cosmos object - typedDocAccessor, ok := any(cosmosObj).(database.TypedDocumentAccessor) - if !ok { - return nil, fmt.Errorf("type %T does not implement TypedDocumentAccessor", cosmosObj) - } - typedDoc := typedDocAccessor.GetTypedDocument() - newCosmosID := typedDoc.ID - resourceName := typedDoc.ResourceID.Name - - // Get etag from the original object for conditional replace - cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) - if !ok { - return nil, fmt.Errorf("type %T does not implement CosmosPersistable", newObj) + return nil, err } - expectedETag := cosmosPersistable.GetCosmosData().CosmosETag + resourceName := cosmosMetadata.ResourceID.Name + expectedETag := cosmosMetadata.CosmosETag oldObj, err := m.Get(ctx, resourceName) if err != nil { @@ -300,11 +274,8 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) Replace(ctx context.C storedETag := any(oldObj).(arm.CosmosPersistable).GetCosmosData().CosmosETag existingCosmosID := any(oldObj).(arm.CosmosPersistable).GetCosmosData().GetCosmosUID() - // Check etag if one is provided - if len(expectedETag) > 0 { - if storedETag != expectedETag { - return nil, NewPreconditionFailedError() - } + if storedETag != expectedETag { + return nil, NewPreconditionFailedError() } // Inject a new etag and store @@ -316,8 +287,6 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) Replace(ctx context.C if err != nil { return nil, fmt.Errorf("failed to inject ID: %w", err) } - // Use the existing cosmosID to maintain consistency - _ = newCosmosID // newCosmosID should match existingCosmosID m.client.StoreDocument(existingCosmosID, dataWithETag) // Read back the stored object @@ -339,23 +308,14 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) Delete(ctx context.Co } func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) AddCreateToTransaction(ctx context.Context, transaction database.DBTransaction, newObj *InternalAPIType, opts *azcosmos.TransactionalBatchItemOptions) (string, error) { - cosmosObj, err := database.InternalToCosmos[InternalAPIType, CosmosAPIType](newObj) - if err != nil { - return "", fmt.Errorf("failed to convert to cosmos type: %w", err) + if err := database.PrepareForCreate(newObj); err != nil { + return "", err } - - data, err := json.Marshal(cosmosObj) + cosmosMetadata, data, err := database.SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { - return "", fmt.Errorf("failed to marshal cosmos object: %w", err) + return "", err } - - cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) - if !ok { - return "", fmt.Errorf("type %T does not implement CosmosPersistable", newObj) - } - - cosmosData := cosmosPersistable.GetCosmosData() - cosmosID := cosmosData.GetCosmosUID() + cosmosID := cosmosMetadata.GetCosmosUID() mockTx, ok := transaction.(*mockTransaction) if !ok { @@ -385,28 +345,15 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) AddCreateToTransactio } func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) AddReplaceToTransaction(ctx context.Context, transaction database.DBTransaction, newObj *InternalAPIType, opts *azcosmos.TransactionalBatchItemOptions) (string, error) { - cosmosObj, err := database.InternalToCosmos[InternalAPIType, CosmosAPIType](newObj) - if err != nil { - return "", fmt.Errorf("failed to convert to cosmos type: %w", err) + if err := database.PrepareForReplace(newObj); err != nil { + return "", err } - - data, err := json.Marshal(cosmosObj) + cosmosMetadata, data, err := database.SerializeItem[InternalAPIType, CosmosAPIType](newObj) if err != nil { - return "", fmt.Errorf("failed to marshal cosmos object: %w", err) + return "", err } - - // Get cosmos ID from the converted cosmos object - typedDocAccessor, ok := any(cosmosObj).(database.TypedDocumentAccessor) - if !ok { - return "", fmt.Errorf("type %T does not implement TypedDocumentAccessor", cosmosObj) - } - cosmosID := typedDocAccessor.GetTypedDocument().ID - - cosmosPersistable, ok := any(newObj).(arm.CosmosPersistable) - if !ok { - return "", fmt.Errorf("type %T does not implement CosmosPersistable", newObj) - } - expectedETag := cosmosPersistable.GetCosmosData().CosmosETag + cosmosID := cosmosMetadata.GetCosmosUID() + expectedETag := cosmosMetadata.CosmosETag mockTx, ok := transaction.(*mockTransaction) if !ok { @@ -422,16 +369,13 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) AddReplaceToTransacti mockTx.steps = append(mockTx.steps, mockTransactionStep{ details: transactionDetails, execute: func() (string, json.RawMessage, error) { - // Check etag if one is provided - if len(expectedETag) > 0 { - existingData, exists := m.client.GetDocument(cosmosID) - if !exists { - return "", nil, database.NewNotFoundError() - } - storedETag := getStoredETag(existingData) - if storedETag != expectedETag { - return "", nil, NewPreconditionFailedError() - } + existingData, exists := m.client.GetDocument(cosmosID) + if !exists { + return "", nil, database.NewNotFoundError() + } + storedETag := getStoredETag(existingData) + if storedETag != expectedETag { + return "", nil, NewPreconditionFailedError() } // Inject a new etag and store dataWithETag, _, err := injectETag(data) @@ -448,12 +392,12 @@ func (m *mockResourceCRUD[InternalAPIType, CosmosAPIType]) AddReplaceToTransacti // mockHCPClusterCRUD implements database.HCPClusterCRUD. type mockHCPClusterCRUD struct { - *mockResourceCRUD[api.HCPOpenShiftCluster, database.HCPCluster] + *mockResourceCRUD[api.HCPOpenShiftCluster, database.GenericDocument[api.HCPOpenShiftCluster]] } func newMockHCPClusterCRUD(client *MockResourcesDBClient, parentResourceID *azcorearm.ResourceID) *mockHCPClusterCRUD { return &mockHCPClusterCRUD{ - mockResourceCRUD: newMockResourceCRUD[api.HCPOpenShiftCluster, database.HCPCluster](client, parentResourceID, api.ClusterResourceType), + mockResourceCRUD: newMockResourceCRUD[api.HCPOpenShiftCluster, database.GenericDocument[api.HCPOpenShiftCluster]](client, parentResourceID, api.ClusterResourceType), } } @@ -467,7 +411,7 @@ func (m *mockHCPClusterCRUD) ExternalAuth(hcpClusterName string) database.Extern hcpClusterName))) return &mockExternalAuthCRUD{ - mockResourceCRUD: newMockResourceCRUD[api.HCPOpenShiftClusterExternalAuth, database.ExternalAuth]( + mockResourceCRUD: newMockResourceCRUD[api.HCPOpenShiftClusterExternalAuth, database.GenericDocument[api.HCPOpenShiftClusterExternalAuth]]( m.client, parentResourceID, api.ExternalAuthResourceType, @@ -485,7 +429,7 @@ func (m *mockHCPClusterCRUD) NodePools(hcpClusterName string) database.NodePools hcpClusterName))) return &mockNodePoolsCRUD{ - mockResourceCRUD: newMockResourceCRUD[api.HCPOpenShiftClusterNodePool, database.NodePool]( + mockResourceCRUD: newMockResourceCRUD[api.HCPOpenShiftClusterNodePool, database.GenericDocument[api.HCPOpenShiftClusterNodePool]]( m.client, parentResourceID, api.NodePoolResourceType), @@ -520,7 +464,7 @@ var _ database.HCPClusterCRUD = &mockHCPClusterCRUD{} // mockNodePoolsCRUD implements database.NodePoolsCRUD. type mockNodePoolsCRUD struct { - *mockResourceCRUD[api.HCPOpenShiftClusterNodePool, database.NodePool] + *mockResourceCRUD[api.HCPOpenShiftClusterNodePool, database.GenericDocument[api.HCPOpenShiftClusterNodePool]] } func (m *mockNodePoolsCRUD) Controllers(nodePoolName string) database.ResourceCRUD[api.Controller] { @@ -549,7 +493,7 @@ var _ database.NodePoolsCRUD = &mockNodePoolsCRUD{} // mockExternalAuthCRUD implements database.ExternalAuthsCRUD. type mockExternalAuthCRUD struct { - *mockResourceCRUD[api.HCPOpenShiftClusterExternalAuth, database.ExternalAuth] + *mockResourceCRUD[api.HCPOpenShiftClusterExternalAuth, database.GenericDocument[api.HCPOpenShiftClusterExternalAuth]] } func (m *mockExternalAuthCRUD) Controllers(externalAuthName string) database.ResourceCRUD[api.Controller] { diff --git a/internal/databasetesting/mock_resources_db_client.go b/internal/databasetesting/mock_resources_db_client.go index c517c59270e..10c0dbbf5a6 100644 --- a/internal/databasetesting/mock_resources_db_client.go +++ b/internal/databasetesting/mock_resources_db_client.go @@ -365,23 +365,23 @@ func (r *mockTransactionResult) GetItem(cosmosUID string) (any, error) { switch strings.ToLower(typedDoc.ResourceType) { case strings.ToLower(api.ClusterResourceType.String()): - var cosmosObj database.HCPCluster + var cosmosObj database.GenericDocument[api.HCPOpenShiftCluster] if err := json.Unmarshal(data, &cosmosObj); err != nil { return nil, err } - return database.CosmosToInternalCluster(&cosmosObj) + return database.CosmosGenericToInternal(&cosmosObj) case strings.ToLower(api.NodePoolResourceType.String()): - var cosmosObj database.NodePool + var cosmosObj database.GenericDocument[api.HCPOpenShiftClusterNodePool] if err := json.Unmarshal(data, &cosmosObj); err != nil { return nil, err } - return database.CosmosToInternalNodePool(&cosmosObj) + return database.CosmosGenericToInternal(&cosmosObj) case strings.ToLower(api.ExternalAuthResourceType.String()): - var cosmosObj database.ExternalAuth + var cosmosObj database.GenericDocument[api.HCPOpenShiftClusterExternalAuth] if err := json.Unmarshal(data, &cosmosObj); err != nil { return nil, err } - return database.CosmosToInternalExternalAuth(&cosmosObj) + return database.CosmosGenericToInternal(&cosmosObj) default: return nil, fmt.Errorf("unknown resource type '%s'", typedDoc.ResourceType) } diff --git a/internal/databasetesting/mock_resources_global_lister.go b/internal/databasetesting/mock_resources_global_lister.go index 7cffbf988a7..b7bedca5afc 100644 --- a/internal/databasetesting/mock_resources_global_lister.go +++ b/internal/databasetesting/mock_resources_global_lister.go @@ -38,21 +38,21 @@ func (g *mockResourcesGlobalListers) Subscriptions() database.GlobalLister[arm.S } func (g *mockResourcesGlobalListers) Clusters() database.GlobalLister[api.HCPOpenShiftCluster] { - return &mockTypedGlobalLister[api.HCPOpenShiftCluster, database.HCPCluster]{ + return &mockTypedGlobalLister[api.HCPOpenShiftCluster, database.GenericDocument[api.HCPOpenShiftCluster]]{ client: g.client, resourceType: api.ClusterResourceType, } } func (g *mockResourcesGlobalListers) NodePools() database.GlobalLister[api.HCPOpenShiftClusterNodePool] { - return &mockTypedGlobalLister[api.HCPOpenShiftClusterNodePool, database.NodePool]{ + return &mockTypedGlobalLister[api.HCPOpenShiftClusterNodePool, database.GenericDocument[api.HCPOpenShiftClusterNodePool]]{ client: g.client, resourceType: api.NodePoolResourceType, } } func (g *mockResourcesGlobalListers) ExternalAuths() database.GlobalLister[api.HCPOpenShiftClusterExternalAuth] { - return &mockTypedGlobalLister[api.HCPOpenShiftClusterExternalAuth, database.ExternalAuth]{ + return &mockTypedGlobalLister[api.HCPOpenShiftClusterExternalAuth, database.GenericDocument[api.HCPOpenShiftClusterExternalAuth]]{ client: g.client, resourceType: api.ExternalAuthResourceType, } diff --git a/test-integration/admin/artifacts/AdminCRUD/HCP/breakglass/00-load-initial-cosmos-state/01-cluster.json b/test-integration/admin/artifacts/AdminCRUD/HCP/breakglass/00-load-initial-cosmos-state/01-cluster.json index df797d0cd94..07250c4330c 100644 --- a/test-integration/admin/artifacts/AdminCRUD/HCP/breakglass/00-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/admin/artifacts/AdminCRUD/HCP/breakglass/00-load-initial-cosmos-state/01-cluster.json @@ -1,44 +1,16 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "systemData": {}, - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "eastus", - "name": "some-hcp-cluster", - "serviceProviderProperties": { - "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded" - }, - "tags": { - "foo": "bar" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "eastus", "name": "some-hcp-cluster", "serviceProviderProperties": { diff --git a/test-integration/admin/artifacts/AdminCRUD/HCP/cosmosdump/00-load-initial-cosmos-state/01-cluster.json b/test-integration/admin/artifacts/AdminCRUD/HCP/cosmosdump/00-load-initial-cosmos-state/01-cluster.json index 50790056402..ca24abda24b 100644 --- a/test-integration/admin/artifacts/AdminCRUD/HCP/cosmosdump/00-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/admin/artifacts/AdminCRUD/HCP/cosmosdump/00-load-initial-cosmos-state/01-cluster.json @@ -1,55 +1,16 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "eastus", - "name": "some-hcp-cluster", - "serviceProviderProperties": { - "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "eastus", "name": "some-hcp-cluster", "serviceProviderProperties": { diff --git a/test-integration/admin/artifacts/AdminCRUD/HCP/hello-world/00-load-initial-cosmos-state/01-cluster.json b/test-integration/admin/artifacts/AdminCRUD/HCP/hello-world/00-load-initial-cosmos-state/01-cluster.json index 50790056402..ca24abda24b 100644 --- a/test-integration/admin/artifacts/AdminCRUD/HCP/hello-world/00-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/admin/artifacts/AdminCRUD/HCP/hello-world/00-load-initial-cosmos-state/01-cluster.json @@ -1,55 +1,16 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "eastus", - "name": "some-hcp-cluster", - "serviceProviderProperties": { - "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "eastus", "name": "some-hcp-cluster", "serviceProviderProperties": { diff --git a/test-integration/admin/artifacts/AdminCRUD/HCP/lowercase-middleware/00-load-initial-cosmos-state/01-cluster.json b/test-integration/admin/artifacts/AdminCRUD/HCP/lowercase-middleware/00-load-initial-cosmos-state/01-cluster.json index 50790056402..ca24abda24b 100644 --- a/test-integration/admin/artifacts/AdminCRUD/HCP/lowercase-middleware/00-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/admin/artifacts/AdminCRUD/HCP/lowercase-middleware/00-load-initial-cosmos-state/01-cluster.json @@ -1,55 +1,16 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "eastus", - "name": "some-hcp-cluster", - "serviceProviderProperties": { - "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/fixed-value", - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "eastus", "name": "some-hcp-cluster", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/00-load-initial-state/cluster.json b/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/00-load-initial-state/cluster.json index d2abf8d5758..0fa16af268a 100644 --- a/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "1efd180d-f929-5506-9e76-15ef4c14ca7b", "partitionKey": "4fa75980-6637-4157-9726-84d878a62e83", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "lavishUnhappiness", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "lavishUnhappiness", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/99-cosmosCompare-end-state/do-nothing-success.json b/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/99-cosmosCompare-end-state/do-nothing-success.json index 8a9f3ae38dd..7cdf5ca4c05 100644 --- a/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/99-cosmosCompare-end-state/do-nothing-success.json +++ b/test-integration/backend/controllers/do_nothing/artifacts/sync_cluster/99-cosmosCompare-end-state/do-nothing-success.json @@ -8,6 +8,7 @@ "partitionKey": "4fa75980-6637-4157-9726-84d878a62e83", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrilleffectiveness/providers/microsoft.redhatopenshift/hcpopenshiftclusters/lavishunhappiness/hcpOpenShiftControllers/DoNothingExample" }, "externalId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrilleffectiveness/providers/microsoft.redhatopenshift/hcpopenshiftclusters/lavishunhappiness", diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/00-load-initial-state/cluster.json index b93039a54e6..83dd1250dc5 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/99-cosmosCompare-end-state/cluster.json index b93039a54e6..1ad1ad87e53 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/present_cluster/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster-safe.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster-safe.json index d2abf8d5758..0fa16af268a 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster-safe.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster-safe.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "1efd180d-f929-5506-9e76-15ef4c14ca7b", "partitionKey": "4fa75980-6637-4157-9726-84d878a62e83", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "lavishUnhappiness", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "lavishUnhappiness", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster.json index b93039a54e6..83dd1250dc5 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/controller-nodepool-fake.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/controller-nodepool-fake.json index 6ff082771fc..e03a948561d 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/controller-nodepool-fake.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/controller-nodepool-fake.json @@ -8,6 +8,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodepools/basic/hcpOpenShiftControllers/DoNothingExample" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodepools/basic", diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/externalauth-default.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/externalauth-default.json index afced65a6d4..a770a369e4f 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/externalauth-default.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "internalId": "/api/clusters_mgmt/v1/clusters/swzpxg6nxn/external_auth_config/external_auths/5fghjjqxvd", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/nodepool-basic.json index d709dc99f22..1531c0e6740 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/00-load-initial-state/nodepool-basic.json @@ -8,67 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/w9xhwccbjp/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/99-cosmosCompare-end-state/cluster-safe.json b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/99-cosmosCompare-end-state/cluster-safe.json index d2abf8d5758..f4dfe2c4401 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/99-cosmosCompare-end-state/cluster-safe.json +++ b/test-integration/backend/controllers/mismatches/artifacts/cluster/remove_orphaned_cluster_descendents/99-cosmosCompare-end-state/cluster-safe.json @@ -3,6 +3,7 @@ "partitionKey": "4fa75980-6637-4157-9726-84d878a62e83", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness" }, "customerProperties": { @@ -59,97 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/4fa75980-6637-4157-9726-84d878a62e83/resourceGroups/shrillEffectiveness/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/lavishUnhappiness", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "lavishUnhappiness", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "lavishUnhappiness", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/cluster.json index cf23e04131c..54d035bdd17 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -29,67 +31,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/controller-cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/controller-cluster.json index 8775dfb2fab..ff0a3f4cebc 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/controller-cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/controller-cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "836d8a24-2a0b-5200-bc85-e66f26b4914d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/hcpOpenShiftControllers/testcontroller" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/nodepool-basic.json index b19e7f9efe2..74a3fe40ad7 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/nodepool-basic.json @@ -1,49 +1,9 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "b3b837bb-154f-5f52-8562-96a8c9d2bb05", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/w9xhwccbjp/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "platform": { - "vmSize": "large" - }, - "provisioningState": "Accepted", - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/subscription.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/subscription.json index 1131d76e38a..0a5e883e0ad 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/subscription.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/00-load-initial-state/subscription.json @@ -1,4 +1,5 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "718f75e1-6967-5ce1-ab3c-4f991504b7eb", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/cluster.json index cf23e04131c..2cf5259fc6c 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -29,67 +30,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/controller-cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/controller-cluster.json index 8775dfb2fab..c7fe7cf5151 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/controller-cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/controller-cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/hcpOpenShiftControllers/testcontroller" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/nodepool-basic.json index b19e7f9efe2..24b84e50357 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/all_parents_exist/99-cosmosCompare-end-state/nodepool-basic.json @@ -3,47 +3,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/w9xhwccbjp/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "platform": { - "vmSize": "large" - }, - "provisioningState": "Accepted", - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/controller-orphaned.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/controller-orphaned.json index a6e177f9671..cc86b7d2a14 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/controller-orphaned.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/controller-orphaned.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68116f0a-a3f3-55c9-9f1d-9163b85d6838", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/missingcluster/hcpOpenShiftControllers/orphanedcontroller" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/missingcluster", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/subscription.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/subscription.json index 1131d76e38a..0a5e883e0ad 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/subscription.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_cluster_deleted/00-load-initial-state/subscription.json @@ -1,4 +1,5 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "718f75e1-6967-5ce1-ab3c-4f991504b7eb", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/cluster.json index cf23e04131c..54d035bdd17 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -29,67 +31,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-cluster.json index 43ed3b9354b..33742528264 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "464bdca5-4108-5ef3-ab4a-15c13eddcf8e", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/hcpOpenShiftControllers/clustercontroller" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-orphaned-nodepool.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-orphaned-nodepool.json index 25d43fe38e1..f7ea2e31360 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-orphaned-nodepool.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/controller-orphaned-nodepool.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "fc7b947a-1c1b-5315-a33f-fc75c35058c9", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/missingnodepool/hcpOpenShiftControllers/orphanedcontroller" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/missingnodepool", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/subscription.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/subscription.json index 1131d76e38a..0a5e883e0ad 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/subscription.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/00-load-initial-state/subscription.json @@ -1,4 +1,5 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "718f75e1-6967-5ce1-ab3c-4f991504b7eb", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/cluster.json index cf23e04131c..2cf5259fc6c 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -29,67 +30,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/controller-cluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/controller-cluster.json index 43ed3b9354b..d2c4c5db069 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/controller-cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/controller_under_missing_nodepool_deleted/99-cosmosCompare-end-state/controller-cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/hcpOpenShiftControllers/clustercontroller" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/controller.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/controller.json index 4f706eb1466..a264fb5c3e0 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/controller.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/controller.json @@ -8,6 +8,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/microsoft.redhatopenshift/hcpopenshiftclusters/monstrousPrecinct/hcpOpenShiftControllers/CreateBillingDoc" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/microsoft.redhatopenshift/hcpopenshiftclusters/monstrousPrecinct", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/serviceprovidercluster.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/serviceprovidercluster.json index a373eb8c528..53ddb068c1a 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/serviceprovidercluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/serviceprovidercluster.json @@ -8,6 +8,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct/serviceProviderClusters/default" }, "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct/serviceProviderClusters/default", diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/subscription.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/subscription.json index 0ffc8a160a6..d7e8135cd6e 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/subscription.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/00-load-initial-state/subscription.json @@ -9,6 +9,7 @@ "properties": { "cosmosMetadata": { "etag": "\"f100af4d-0000-1100-0000-69f87b380000\"", + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2" }, "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/99-cosmosCompare-end-state/subscription.json b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/99-cosmosCompare-end-state/subscription.json index 0ffc8a160a6..d7e8135cd6e 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/99-cosmosCompare-end-state/subscription.json +++ b/test-integration/backend/controllers/mismatches/artifacts/delete_orphaned_cosmos/pipe_style_ids_deleted/99-cosmosCompare-end-state/subscription.json @@ -9,6 +9,7 @@ "properties": { "cosmosMetadata": { "etag": "\"f100af4d-0000-1100-0000-69f87b380000\"", + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2" }, "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/cluster.json index b93039a54e6..83dd1250dc5 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/externalauth-default.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/externalauth-default.json index 8ee62566da9..9f13dc4134b 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/externalauth-default.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/00-load-initial-state/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0/external_auth_config/external_auths/5fghjjqxvd", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/cluster.json index b93039a54e6..1ad1ad87e53 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/externalauth-default.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/externalauth-default.json index 8ee62566da9..9f13dc4134b 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/externalauth-default.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/present_externalauth/99-cosmosCompare-end-state/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0/external_auth_config/external_auths/5fghjjqxvd", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/cluster.json index b93039a54e6..83dd1250dc5 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/controller-nodepool-fake.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/controller-nodepool-fake.json index 6ff082771fc..e03a948561d 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/controller-nodepool-fake.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/controller-nodepool-fake.json @@ -8,6 +8,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodepools/basic/hcpOpenShiftControllers/DoNothingExample" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodepools/basic", diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/externalauth-default.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/externalauth-default.json index 8ee62566da9..9f13dc4134b 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/externalauth-default.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0/external_auth_config/external_auths/5fghjjqxvd", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/nodepool-basic.json index 8da3ff14c3f..f5b3acb446b 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/00-load-initial-state/nodepool-basic.json @@ -8,67 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/cluster.json index b93039a54e6..1ad1ad87e53 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/nodepool-basic.json index 8da3ff14c3f..f5b3acb446b 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/externalauth/remove_orphaned_externalauth_descendents/99-cosmosCompare-end-state/nodepool-basic.json @@ -8,67 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/cluster.json index b93039a54e6..83dd1250dc5 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/nodepool-basic.json index 8da3ff14c3f..f5b3acb446b 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/00-load-initial-state/nodepool-basic.json @@ -8,67 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/cluster.json index b93039a54e6..1ad1ad87e53 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/nodepool-basic.json index d709dc99f22..1531c0e6740 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/present_nodepool/99-cosmosCompare-end-state/nodepool-basic.json @@ -8,67 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/w9xhwccbjp/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/cluster.json index b93039a54e6..83dd1250dc5 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/cluster.json @@ -1,8 +1,10 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "f7583c84-ae03-56f3-b91d-55bbb849164d", "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +61,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/controller-nodepool-fake.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/controller-nodepool-fake.json index 6ff082771fc..e03a948561d 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/controller-nodepool-fake.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/controller-nodepool-fake.json @@ -8,6 +8,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodepools/basic/hcpOpenShiftControllers/DoNothingExample" }, "externalId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodepools/basic", diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/externalauth-default.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/externalauth-default.json index afced65a6d4..a770a369e4f 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/externalauth-default.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "internalId": "/api/clusters_mgmt/v1/clusters/swzpxg6nxn/external_auth_config/external_auths/5fghjjqxvd", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/nodepool-basic.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/nodepool-basic.json index d709dc99f22..1531c0e6740 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/nodepool-basic.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/00-load-initial-state/nodepool-basic.json @@ -8,67 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "intermediateResourceDoc": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "internalId": "/api/clusters_mgmt/v1/clusters/w9xhwccbjp/node_pools/k9xp9ghzh2", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/nodePools/basic", - "location": "fake-location", - "name": "basic", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "a7b69c90-242b-4a85-8187-0b3bd4979155", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic", "properties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/cluster.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/cluster.json index b93039a54e6..1ad1ad87e53 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/cluster.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/cluster.json @@ -3,6 +3,7 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct" }, "customerProperties": { @@ -59,97 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "uprightPairing", - "networkSecurityGroupId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": { - "serviceManagedIdentity": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/service-managed-identity" - } - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/different-resource-group/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantPostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousPrecinct", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "monstrousPrecinct", - "serviceProviderProperties": { - "activeOperationId": "6aeeebf8-f771-4d4e-9097-45b972cb96e4", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/1243e9e9-d150-4ef1-9735-2bbc3cabc7d0", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "monstrousPrecinct", "serviceProviderProperties": { diff --git a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/externalauth-default.json b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/externalauth-default.json index afced65a6d4..a770a369e4f 100644 --- a/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/externalauth-default.json +++ b/test-integration/backend/controllers/mismatches/artifacts/nodepool/remove_orphaned_nodepool_descendents/99-cosmosCompare-end-state/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "a433a095-1277-44f1-8453-8d61a4d848c2", "properties": { "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "internalId": "/api/clusters_mgmt/v1/clusters/swzpxg6nxn/external_auth_config/external_auths/5fghjjqxvd", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/a433a095-1277-44f1-8453-8d61a4d848c2/resourceGroups/unimportantpostponement/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/monstrousprecinct/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "ea807c13-7e15-43d4-b760-69ef7e31d273", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/first.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/first.json index 6513b63544f..33d921aa40e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/first.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/first.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool/hcpOpenShiftControllers/first-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/second.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/second.json index 9b206287cd6..ba7b81faf23 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/second.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-first-nodepool/second.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/first.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/first.json index 6ef0abe2bca..5a39e0ce002 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/first.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/first.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/second-node-pool/hcpOpenShiftControllers/first-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/second-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/second.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/second.json index 674f96b004e..8caafd93375 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/second.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/02-list-second-nodepool/second.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/second-node-pool/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/second-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/03-replace-update-01/instance.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/03-replace-update-01/instance.json index b098419be09..e17784e1a81 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/03-replace-update-01/instance.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/03-replace-update-01/instance.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool/hcpOpenShiftControllers/first-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/first.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/first.json index b098419be09..f370d0e2d15 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/first.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/first.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 2, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool/hcpOpenShiftControllers/first-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/second.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/second.json index 9b206287cd6..ba7b81faf23 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/second.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/04-list-first-nodepool/second.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/06-list-first-nodepool/second.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/06-list-first-nodepool/second.json index 9b206287cd6..ba7b81faf23 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/06-list-first-nodepool/second.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic-nodepool/06-list-first-nodepool/second.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic/nodePools/first-node-pool", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/01-load-initial/test-controller.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/01-load-initial/test-controller.json index 5927c5b1674..c5717468db5 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/01-load-initial/test-controller.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/01-load-initial/test-controller.json @@ -8,6 +8,7 @@ "partitionKey": "subscriptionid", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/test-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/02-get-initial/test-controller.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/02-get-initial/test-controller.json index 28e1feec723..ffc6a431cd0 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/02-get-initial/test-controller.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/02-get-initial/test-controller.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/test-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/03-list-another/test-controller.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/03-list-another/test-controller.json index 28e1feec723..ffc6a431cd0 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/03-list-another/test-controller.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/03-list-another/test-controller.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/test-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/05-get-new-instance/second-controller.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/05-get-new-instance/second-controller.json index 16df08f82bd..484b6d18e1c 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/05-get-new-instance/second-controller.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/05-get-new-instance/second-controller.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/second-controller.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/second-controller.json index 16df08f82bd..484b6d18e1c 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/second-controller.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/second-controller.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/test-controller.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/test-controller.json index 28e1feec723..ffc6a431cd0 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/test-controller.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/06-list-both-instances/test-controller.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/test-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/99-cosmosCompare-end-state/do-nothing-success.json b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/99-cosmosCompare-end-state/do-nothing-success.json index 6d9f14a1012..a1b1e937412 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/99-cosmosCompare-end-state/do-nothing-success.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ControllerCRUD/basic/99-cosmosCompare-end-state/do-nothing-success.json @@ -8,6 +8,7 @@ "partitionKey": "subscriptionid", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/hcpOpenShiftControllers/second-controller" }, "externalId": "/subscriptions/subscriptionID/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/03-get-new-instance/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/03-get-new-instance/default.json index b8d4e466ea8..1bb093fd780 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/03-get-new-instance/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/03-get-new-instance/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/04-replace-instance/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/04-replace-instance/default.json index 3724e581c76..c644445709c 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/04-replace-instance/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/04-replace-instance/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/newLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/06-list-instance/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/06-list-instance/default.json index 3724e581c76..f2dcb5abc93 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/06-list-instance/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/basic/06-list-instance/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/newLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/02-replace-with-wrong-etag/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/02-replace-with-wrong-etag/default.json index e71ac316046..c8d03c80fa5 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/02-replace-with-wrong-etag/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/02-replace-with-wrong-etag/default.json @@ -1,6 +1,7 @@ { "cosmosMetadata": { "etag": "wrong-etag-value-that-will-not-match", + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/etagTestCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/updatedLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/03-get-after-failed-replace/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/03-get-after-failed-replace/default.json index 51ca6ddc2b6..bbb76917b63 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/03-get-after-failed-replace/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/03-get-after-failed-replace/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/etagTestCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/initialLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/04-replaceWithETag-success/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/04-replaceWithETag-success/default.json index a13458fd4c2..b9a919daf2e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/04-replaceWithETag-success/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/04-replaceWithETag-success/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/etagTestCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/successfullyUpdatedLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/05-get-after-successful-replace/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/05-get-after-successful-replace/default.json index a13458fd4c2..3b99af37e61 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/05-get-after-successful-replace/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderClusterCRUD/etag-conditional-replace/05-get-after-successful-replace/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/etagTestCluster/serviceProviderClusters/default" }, "loadBalancerResourceID": "/subscriptions/your-subscription-id/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/successfullyUpdatedLoadBalancer", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/03-get-new-instance/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/03-get-new-instance/default.json index fb618fbf12c..9854f654153 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/03-get-new-instance/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/03-get-new-instance/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/nodePools/parentNodePool/serviceProviderNodePools/default" }, "resourceId": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/nodePools/parentNodePool/serviceProviderNodePools/default" diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/04-replace-instance/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/04-replace-instance/default.json index fb618fbf12c..9854f654153 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/04-replace-instance/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/04-replace-instance/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/nodePools/parentNodePool/serviceProviderNodePools/default" }, "resourceId": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/nodePools/parentNodePool/serviceProviderNodePools/default" diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/06-list-instance/default.json b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/06-list-instance/default.json index fb618fbf12c..037b6121659 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/06-list-instance/default.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/ServiceProviderNodePoolCRUD/basic/06-list-instance/default.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/nodePools/parentNodePool/serviceProviderNodePools/default" }, "resourceId": "/subscriptions/ca3b7be4-6ac8-4784-b2b5-0e398a60269a/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/parentCluster/nodePools/parentNodePool/serviceProviderNodePools/default" diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/basic-external-auth-auth.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/basic-external-auth-auth.json index 22b252c00a8..b065f76b829 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/basic-external-auth-auth.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/basic-external-auth-auth.json @@ -8,57 +8,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-basic-external-auth/external_auth_config/external_auths/2wbhxn4qwk", - "internalState": { - "internalAPI": { - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "" - }, - "serviceProviderProperties": { - "clusterServiceID": "" - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic-external-auth/externalAuths/basic-external-auth", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/create-with-tags-cluster.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/create-with-tags-cluster.json index e004965a3e6..5b0bb9c16f4 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/create-with-tags-cluster.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/create-with-tags-cluster.json @@ -9,6 +9,7 @@ "properties": { "activeOperationId": "7c6b7caa-572f-41b6-9f18-1bb11adfba31", "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,80 +65,6 @@ "type": "UserAssigned" }, "internalId": "/api/clusters_mgmt/v1/clusters/dv8blqb5g9", - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "platform": {} - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "provisioningState": "Accepted", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/immutability-np.json index 1ef2bc5bcc5..591500eab56 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/01-load-initial/immutability-np.json @@ -8,29 +8,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/02-untypedListRecursive-immutability/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/02-untypedListRecursive-immutability/immutability-np.json index ca6e6a07a2e..2b192996d64 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/02-untypedListRecursive-immutability/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/02-untypedListRecursive-immutability/immutability-np.json @@ -3,29 +3,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/basic-external-auth-auth.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/basic-external-auth-auth.json index 732f52ffc2e..02f5d830e9f 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/basic-external-auth-auth.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/basic-external-auth-auth.json @@ -8,57 +8,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-basic-external-auth/external_auth_config/external_auths/2wbhxn4qwk", - "internalState": { - "internalAPI": { - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "" - }, - "serviceProviderProperties": { - "clusterServiceID": "" - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic-external-auth/externalAuths/basic-external-auth", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/create-with-tags-cluster.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/create-with-tags-cluster.json index d68e63268d8..0cc0f0c1c0e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/create-with-tags-cluster.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/create-with-tags-cluster.json @@ -9,6 +9,7 @@ "properties": { "activeOperationId": "7c6b7caa-572f-41b6-9f18-1bb11adfba31", "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,80 +65,6 @@ "type": "UserAssigned" }, "internalId": "/api/clusters_mgmt/v1/clusters/dv8blqb5g9", - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "platform": {} - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "provisioningState": "Accepted", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/immutability-np.json index ca6e6a07a2e..2b192996d64 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/04-untypedListRecursive-resourcegroup/immutability-np.json @@ -3,29 +3,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/basic-external-auth-auth.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/basic-external-auth-auth.json index 732f52ffc2e..02f5d830e9f 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/basic-external-auth-auth.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/basic-external-auth-auth.json @@ -8,57 +8,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-basic-external-auth/external_auth_config/external_auths/2wbhxn4qwk", - "internalState": { - "internalAPI": { - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "" - }, - "serviceProviderProperties": { - "clusterServiceID": "" - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic-external-auth/externalAuths/basic-external-auth", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/create-with-tags-cluster.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/create-with-tags-cluster.json index d68e63268d8..0cc0f0c1c0e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/create-with-tags-cluster.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/create-with-tags-cluster.json @@ -9,6 +9,7 @@ "properties": { "activeOperationId": "7c6b7caa-572f-41b6-9f18-1bb11adfba31", "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,80 +65,6 @@ "type": "UserAssigned" }, "internalId": "/api/clusters_mgmt/v1/clusters/dv8blqb5g9", - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "platform": {} - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "provisioningState": "Accepted", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/immutability-np.json index ca6e6a07a2e..2b192996d64 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/05-untypedListRecursive-subscription/immutability-np.json @@ -3,29 +3,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/basic-external-auth-auth.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/basic-external-auth-auth.json index 732f52ffc2e..02f5d830e9f 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/basic-external-auth-auth.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/basic-external-auth-auth.json @@ -8,57 +8,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-basic-external-auth/external_auth_config/external_auths/2wbhxn4qwk", - "internalState": { - "internalAPI": { - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "" - }, - "serviceProviderProperties": { - "clusterServiceID": "" - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/basic-external-auth/externalAuths/basic-external-auth", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/create-with-tags-cluster.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/create-with-tags-cluster.json index d68e63268d8..0cc0f0c1c0e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/create-with-tags-cluster.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/create-with-tags-cluster.json @@ -9,6 +9,7 @@ "properties": { "activeOperationId": "7c6b7caa-572f-41b6-9f18-1bb11adfba31", "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,80 +65,6 @@ "type": "UserAssigned" }, "internalId": "/api/clusters_mgmt/v1/clusters/dv8blqb5g9", - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "platform": {} - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "provisioningState": "Accepted", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/immutability-np.json index ca6e6a07a2e..2b192996d64 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/07-untypedListRecursive-resourcegroup-via-child/immutability-np.json @@ -3,29 +3,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/08-untypedListRecursive-immutability-cluster/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/08-untypedListRecursive-immutability-cluster/immutability-np.json index ca6e6a07a2e..2b192996d64 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/08-untypedListRecursive-immutability-cluster/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/08-untypedListRecursive-immutability-cluster/immutability-np.json @@ -3,29 +3,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/09-untypedList-immutability-cluster/immutability-np.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/09-untypedList-immutability-cluster/immutability-np.json index ca6e6a07a2e..2b192996d64 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/09-untypedList-immutability-cluster/immutability-np.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/09-untypedList-immutability-cluster/immutability-np.json @@ -3,29 +3,6 @@ "partitionKey": "f52dfea2-47ee-4396-8006-4a27d47d59c5", "properties": { "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-immutability/node_pools/4nd28q7n8q", - "internalState": { - "internalAPI": { - "location": "fake-location", - "properties": { - "autoRepair": true, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - } - } - }, "provisioningState": "Succeeded", "resourceId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/immutability/nodePools/immutability-np", "systemData": { diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/10-untypedList-resourcegroup/create-with-tags-cluster.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/10-untypedList-resourcegroup/create-with-tags-cluster.json index d68e63268d8..0cc0f0c1c0e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/10-untypedList-resourcegroup/create-with-tags-cluster.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/10-untypedList-resourcegroup/create-with-tags-cluster.json @@ -9,6 +9,7 @@ "properties": { "activeOperationId": "7c6b7caa-572f-41b6-9f18-1bb11adfba31", "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,80 +65,6 @@ "type": "UserAssigned" }, "internalId": "/api/clusters_mgmt/v1/clusters/dv8blqb5g9", - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "platform": {} - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "provisioningState": "Accepted", diff --git a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/12-untypedList-resourcegroup/create-with-tags-cluster.json b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/12-untypedList-resourcegroup/create-with-tags-cluster.json index d68e63268d8..0cc0f0c1c0e 100644 --- a/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/12-untypedList-resourcegroup/create-with-tags-cluster.json +++ b/test-integration/frontend/artifacts/DatabaseCRUD/UntypedCRUD/basic/12-untypedList-resourcegroup/create-with-tags-cluster.json @@ -9,6 +9,7 @@ "properties": { "activeOperationId": "7c6b7caa-572f-41b6-9f18-1bb11adfba31", "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,80 +65,6 @@ "type": "UserAssigned" }, "internalId": "/api/clusters_mgmt/v1/clusters/dv8blqb5g9", - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/f52dfea2-47ee-4396-8006-4a27d47d59c5/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "platform": {} - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "provisioningState": "Accepted", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json index 0a5457d64a0..02802a5edfa 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json @@ -1,16 +1,13 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "intermediateResourceDoc": { - "internalId": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Provisioning", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" - }, "serviceProviderProperties": { "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fixed-value", "provisioningState": "Provisioning" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/01-load-initial-cosmos-state/01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/01-load-initial-cosmos-state/01-cluster.json index 619c0119993..4a170a59cc9 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/01-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/01-load-initial-cosmos-state/01-cluster.json @@ -1,16 +1,13 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "intermediateResourceDoc": { - "internalId": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" - }, "serviceProviderProperties": { "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fixed-value", "provisioningState": "Succeeded" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/03-listActiveOperations-request-credentials/operation-request-credential.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/03-listActiveOperations-request-credentials/operation-request-credential.json index 408bc5d31f6..b6c8379d317 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/03-listActiveOperations-request-credentials/operation-request-credential.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/request/03-listActiveOperations-request-credentials/operation-request-credential.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/00000000-0000-0000-0000-000000000000" }, "externalId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-missing/01-load-initial-cosmos-state/01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-missing/01-load-initial-cosmos-state/01-cluster.json index d840efb96b7..4a170a59cc9 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-missing/01-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-missing/01-load-initial-cosmos-state/01-cluster.json @@ -1,19 +1,13 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "intermediateResourceDoc": { - "internalId": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "tags": { - "foo": "bar" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fixed-value", "provisioningState": "Succeeded" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-pending/01-load-initial-cosmos-state/01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-pending/01-load-initial-cosmos-state/01-cluster.json index d840efb96b7..4a170a59cc9 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-pending/01-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-forbidden-afec-pending/01-load-initial-cosmos-state/01-cluster.json @@ -1,19 +1,13 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "intermediateResourceDoc": { - "internalId": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "tags": { - "foo": "bar" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fixed-value", "provisioningState": "Succeeded" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json index 04f84414c93..64ee9b05a2d 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke-provisioning-conflict/01-load-initial-cosmos-state/01-cluster.json @@ -1,55 +1,16 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Provisioning", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "eastus", - "name": "some-hcp-cluster", - "serviceProviderProperties": { - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Provisioning" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "foo": "bar" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "eastus", "name": "some-hcp-cluster", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/01-load-initial-cosmos-state/01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/01-load-initial-cosmos-state/01-cluster.json index d840efb96b7..4a170a59cc9 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/01-load-initial-cosmos-state/01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/01-load-initial-cosmos-state/01-cluster.json @@ -1,19 +1,13 @@ { + "_etag": "\"00000000-0000-0000-0000-000000000001\"", "id": "68bc6026-a8a9-5706-92c5-25d3313bcabb", "partitionKey": "0465bc32-c654-41b8-8d87-9815d7abe8f6", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster" }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "intermediateResourceDoc": { - "internalId": "/api/clusters_mgmt/v1/clusters/fixed-value", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", - "tags": { - "foo": "bar" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fixed-value", "provisioningState": "Succeeded" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/03-listActiveOperations-revoke-credentials/operation-revoke-credentials.json b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/03-listActiveOperations-revoke-credentials/operation-revoke-credentials.json index 92fe615db32..5568f21d53e 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/03-listActiveOperations-revoke-credentials/operation-revoke-credentials.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/AdminCredentials/revoke/03-listActiveOperations-revoke-credentials/operation-revoke-credentials.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/00000000-0000-0000-0000-000000000000" }, "externalId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/some-hcp-cluster", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/cluster-create-with-tags.json index 0f016eec4d3..9054e163391 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,104 +65,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "bb83a448-9eb0-431c-9fd3-9cec8699ea5f", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/fhlllh5lkl", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable", - "id": "4.20" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "bb83a448-9eb0-431c-9fd3-9cec8699ea5f", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fhlllh5lkl", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json index 7169bcd7f52..55a29c1e676 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/7a4ed07a-47a1-4efb-966a-93a6316522a0" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/subscription.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/subscription.json index 9c642482427..cfa156513ef 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/subscription.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/02-cosmosCompare-confirm-content/subscription.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7" }, "properties": null, diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/05-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/05-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json index 2c0d935cbe9..b06fbe76410 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/05-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/05-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/07314510-beb6-4379-902a-ab6452603265" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/09-cosmosCompare-confirm-update/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/09-cosmosCompare-confirm-update/cluster-create-with-tags.json index 3f9d1bc46ba..dfc23847d76 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/09-cosmosCompare-confirm-update/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/create-current/09-cosmosCompare-confirm-update/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 3, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,106 +65,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "bb83a448-9eb0-431c-9fd3-9cec8699ea5f", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/fhlllh5lkl", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple", - "two": "banana" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 47, - "maxPodGracePeriodSeconds": 73, - "podPriorityThreshold": -6 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable", - "id": "4.20" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "bb83a448-9eb0-431c-9fd3-9cec8699ea5f", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/fhlllh5lkl", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple", - "two": "banana" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/cluster-test-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/cluster-test-cluster.json index 42bf2bc191a..0fea170fa0c 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/cluster-test-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/cluster-test-cluster.json @@ -3,6 +3,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster" }, "customerProperties": { @@ -59,94 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "provisioningState": "Deleting", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable", - "id": "4.20" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "test-cluster", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Deleting" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "test-cluster", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/subscription.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/subscription.json index 179c2daa061..c478c666332 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/subscription.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-cluster-operation/03-cosmosCompare-final-state/subscription.json @@ -3,6 +3,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7" }, "properties": null, diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/cluster-test-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/cluster-test-cluster.json index 42bf2bc191a..63b137924cf 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/cluster-test-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/cluster-test-cluster.json @@ -3,6 +3,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 3, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster" }, "customerProperties": { @@ -59,94 +60,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "provisioningState": "Deleting", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable", - "id": "4.20" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "test-cluster", - "serviceProviderProperties": { - "api": {}, - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Deleting" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "test-cluster", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/nodepool-test-nodepool.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/nodepool-test-nodepool.json index 5d93d55951d..25117f38c7f 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/nodepool-test-nodepool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/nodepool-test-nodepool.json @@ -3,70 +3,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster/nodePools/test-nodepool" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster/nodePools/test-nodepool", - "intermediateResourceDoc": { - "provisioningState": "Deleting", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster/nodePools/test-nodepool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/test-cluster/nodePools/test-nodepool", - "location": "fake-location", - "name": "test-nodepool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-key": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet", - "vmSize": "large" - }, - "provisioningState": "Deleting", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable", - "id": "4.20.8" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "test-nodepool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/subscription.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/subscription.json index 179c2daa061..c478c666332 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/subscription.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/delete-with-pending-nodepool-operation/05-cosmosCompare-final-state/subscription.json @@ -3,6 +3,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7" }, "properties": null, diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/create-with-tags.json index 7b793736b78..b59c08f8771 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,102 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "90b2322c-2c26-47ca-b6f9-d9b1a8385cbc", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "90b2322c-2c26-47ca-b6f9-d9b1a8385cbc", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/hcpoperationstatuses_Create_90b2322c-2c26-47ca-b6f9-d9b1a8385cbc.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/hcpoperationstatuses_Create_90b2322c-2c26-47ca-b6f9-d9b1a8385cbc.json index 1ee7c613c9d..36f180cfd1f 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/hcpoperationstatuses_Create_90b2322c-2c26-47ca-b6f9-d9b1a8385cbc.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/01-load-old-data/hcpoperationstatuses_Create_90b2322c-2c26-47ca-b6f9-d9b1a8385cbc.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/90b2322c-2c26-47ca-b6f9-d9b1a8385cbc" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/04-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/04-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json index 2c0d935cbe9..b06fbe76410 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/04-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/04-listActiveOperations-cluster-create/operation-cluster-create-with-tags-create.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/07314510-beb6-4379-902a-ab6452603265" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json index b06265dc897..35e81fa91e9 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Cluster/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 3, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -63,105 +64,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "c01d4815-566a-4f10-ad8c-de1667682c5b", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple", - "two": "banana" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 47, - "maxPodGracePeriodSeconds": 73, - "podPriorityThreshold": -6 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "c01d4815-566a-4f10-ad8c-de1667682c5b", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Accepted" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple", - "two": "banana" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json index 76a0029fbad..840491d3118 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json @@ -7,19 +7,6 @@ }, "customerDesiredState": null, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-creating", - "intermediateResourceDoc": { - "identity": { - "principalId": "the-principal", - "tenantId": "the-tenant", - "type": "" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-creating", - "provisioningState": "Provisioning", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-creating", - "tags": { - "foo": "bar" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-creating", "provisioningState": "Provisioning" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json index 02ac22e874d..259b98de607 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json @@ -7,19 +7,6 @@ }, "customerDesiredState": null, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-deleting", - "intermediateResourceDoc": { - "identity": { - "principalId": "the-principal", - "tenantId": "the-tenant", - "type": "" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-deleting", - "provisioningState": "Deleting", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-deleting", - "tags": { - "foo": "bar" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-deleting", "provisioningState": "Deleting" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/cluster-create-with-tags.json index 202c883baa2..877d13837be 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,102 +65,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/tqqtpctbpj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable", - "id": "4.20" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/tqqtpctbpj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/externalauth-default.json index dece86301f3..15d95d57dd6 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/externalauth-default.json @@ -8,82 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "60df392c-42ba-4384-95b4-5e4601df2f3e", - "internalId": "/api/clusters_mgmt/v1/clusters/tqqtpctbpj/external_auth_config/external_auths/88m6lb2bbv", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "60df392c-42ba-4384-95b4-5e4601df2f3e", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/operation-externalauth-create-default.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/operation-externalauth-create-default.json index 57def1e7d59..d99b2d83eef 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/operation-externalauth-create-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/operation-externalauth-create-default.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/ea807c13-7e15-43d4-b760-69ef7e31d273" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/subscription.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/subscription.json index 9c642482427..cfa156513ef 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/subscription.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/create-current/06-cosmosCompare-ending-content/subscription.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7" }, "properties": null, diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/cluster-create-with-tags.json index c141ded29f5..0db8435d1e6 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,100 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/externalauth-default.json index 4ae11fedb73..4e289b5b93c 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "internalId": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf/external_auth_config/external_auths/zt59xrx22b", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-cluster-create-with-tags-create.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-cluster-create-with-tags-create.json index 529bf89bd84..22ad16ddc58 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-cluster-create-with-tags-create.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-cluster-create-with-tags-create.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/9696fbeb-0e78-4a32-a3fd-a6e987c2a015" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-externalauth-create-default.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-externalauth-create-default.json index 73cb6dbb83a..b135b7f44fe 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-externalauth-create-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/01-load-old-data/operation-externalauth-create-default.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/5dce3cac-e09b-4ef5-803c-cb8f17b3a552" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json index 37030891ccf..4a15d597cdb 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,100 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/externalauth-default.json index eb944ebbc24..11a4abf2a85 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/ExternalAuth/read-old-data/09-cosmosCompare-confirm-update/externalauth-default.json @@ -8,82 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 3, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "d99a71e0-9237-4ae2-8617-e76035e2bcd4", - "internalId": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf/external_auth_config/external_auths/zt59xrx22b", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups2", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "d99a71e0-9237-4ae2-8617-e76035e2bcd4", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/cluster-create-with-tags.json index ece0e5aa806..fff96a5cd11 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,102 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/externalauth-default.json index 4ae11fedb73..4e289b5b93c 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "internalId": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf/external_auth_config/external_auths/zt59xrx22b", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-basic-node-pool.json index 41db1ee73cd..3cd1631e8e6 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-basic-node-pool.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/59mkgdzg9s", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-node-pool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-node-pool-02.json index 33c747b77ac..c235217a5ab 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-node-pool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/01-load-old-data/nodepool-node-pool-02.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/v4lx7rv2r4", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/cluster-create-with-tags.json index 92a305be4dd..d71a81c4852 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -63,103 +64,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/externalauth-default.json index f960101bf36..70db535cf52 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/externalauth-default.json @@ -8,82 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "internalId": "/api/clusters_mgmt/v1/clusters/m6bpjxtlqf/external_auth_config/external_auths/zt59xrx22b", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-basic-node-pool.json index 3507c9454cb..cae79a3cb1a 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-basic-node-pool.json @@ -8,71 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/59mkgdzg9s", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-node-pool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-node-pool-02.json index 0b49b209ce7..28a5a2098c4 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-node-pool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/nodepool-node-pool-02.json @@ -8,71 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/v4lx7rv2r4", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/subscription.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/subscription.json index 94631f97ab8..1dcaab30df2 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/subscription.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/migrate-old-data/99-cosmosCompare-confirm-migration/subscription.json @@ -5,6 +5,7 @@ "properties": { "cosmosMetadata": { "etag": "\"00000000-0000-0000-7121-fcdc980501dc\"", + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7" }, "properties": null, diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/cluster-create-with-tags.json index 67cb2f1778a..95fcb7a24a7 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,101 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/externalauth-default.json index fb851ea0692..a0938db32d3 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/externalauth-default.json @@ -8,79 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/external_auth_config/external_auths/zt59xrx22b", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "5dce3cac-e09b-4ef5-803c-cb8f17b3a552", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-basic-node-pool.json index 41db1ee73cd..3cd1631e8e6 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-basic-node-pool.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/59mkgdzg9s", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-node-pool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-node-pool-02.json index 33c747b77ac..c235217a5ab 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-node-pool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/nodepool-node-pool-02.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/v4lx7rv2r4", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-basicnodepool.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-basicnodepool.json index 90d60d42c2f..4a5c0b87001 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-basicnodepool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-basicnodepool.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-nodepool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-nodepool-02.json index d042da7c3c6..b5bf9e3c619 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-nodepool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-create-nodepool-02.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/4067756a-fcc1-4732-a211-d785d888203c" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-externalauth-create-default.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-externalauth-create-default.json index 73cb6dbb83a..b135b7f44fe 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-externalauth-create-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/01-load-old-data/operation-externalauth-create-default.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/5dce3cac-e09b-4ef5-803c-cb8f17b3a552" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/cluster-create-with-tags.json index 67cb2f1778a..95fcb7a24a7 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,101 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/externalauth-default.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/externalauth-default.json index e92736865ec..003616dc58d 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/externalauth-default.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/externalauth-default.json @@ -4,82 +4,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 3, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "intermediateResourceDoc": { - "activeOperationId": "117a9956-c10f-493d-a435-fcc43ab90896", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/external_auth_config/external_auths/zt59xrx22b", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/externalAuths/default", - "name": "default", - "properties": { - "claim": { - "mappings": { - "groups": { - "claim": "groups2", - "prefix": "" - }, - "username": { - "claim": "sub", - "prefix": "prefix-", - "prefixPolicy": "Prefix" - } - }, - "validationRules": [] - }, - "clients": [ - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "console" - }, - "extraScopes": [], - "type": "Confidential" - }, - { - "clientId": "87654321-4321-4321-4321-abcdefghijkl", - "component": { - "authClientNamespace": "openshift-console", - "name": "cli" - }, - "extraScopes": [], - "type": "Public" - } - ], - "issuer": { - "audiences": [ - "87654321-4321-4321-4321-abcdefghijkl" - ], - "ca": "", - "url": "https://login.microsoftonline.com/12345678-1234-1234-1234-123456789abc/v2.0" - }, - "provisioningState": "Accepted" - }, - "serviceProviderProperties": { - "activeOperationId": "117a9956-c10f-493d-a435-fcc43ab90896", - "clusterServiceID": "" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/externalAuths" - } - }, "name": "default", "properties": { "claim": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-basic-node-pool.json index 41db1ee73cd..3cd1631e8e6 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-basic-node-pool.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/59mkgdzg9s", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-node-pool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-node-pool-02.json index 5ac62d24f4b..96295522373 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-node-pool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/Migration/read-new-data/18-cosmosCompare-confirm/nodepool-node-pool-02.json @@ -4,69 +4,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/v4lx7rv2r4", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Succeeded", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json index dc6321536e1..9854f518f7a 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-creating/02-loadCosmos-cluster/cosmos-01-cluster.json @@ -11,29 +11,6 @@ } }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-creating", - "intermediateResourceDoc": { - "identity": { - "principalId": "the-principal", - "tenantId": "the-tenant", - "type": "" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-creating", - "provisioningState": "Provisioning", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-creating", - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-creating" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-creating", "provisioningState": "Provisioning" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json index 7d0db4d2e0a..13eb3db5451 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/cluster-deleting/02-loadCosmos-cluster/cosmos-01-cluster.json @@ -11,29 +11,6 @@ } }, "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-deleting", - "intermediateResourceDoc": { - "identity": { - "principalId": "the-principal", - "tenantId": "the-tenant", - "type": "" - }, - "internalId": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-deleting", - "provisioningState": "Deleting", - "resourceId": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-deleting", - "tags": { - "foo": "bar" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/0465bc32-c654-41b8-8d87-9815d7abe8f6/resourceGroups/some-resource-group/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/cluster-deleting" - } - }, "serviceProviderProperties": { "clusterServiceID": "/api/aro_hcp/v1alpha1/clusters/cs-cluster-deleting", "provisioningState": "Deleting" diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-basic-nodepool.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-basic-nodepool.json index a05b850c85f..84ca338d35d 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-basic-nodepool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-basic-nodepool.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/7c3de93c-ff5d-4865-a177-291549ba8020" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-nodepool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-nodepool-02.json index ffd00da74ef..3311ecde7b4 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-nodepool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/05-listActiveOperations-cluster-create/operation-nodepool-create-nodepool-02.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/c1216e33-a694-4a65-a504-d821c30dc67c" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/cluster-create-with-tags.json index 6105660da1e..038b2a24a5e 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 2, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -64,102 +65,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/dl7f9px2f2", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - }, - "visibility": "Public" - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable", - "id": "4.20" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/dl7f9px2f2", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-basic-node-pool.json index 57d2b002237..a22f7097c4f 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-basic-node-pool.json @@ -8,73 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "bf643e76-55fe-48a0-a752-f5c5a2db72ad", - "internalId": "/api/clusters_mgmt/v1/clusters/dl7f9px2f2/node_pools/82npf9hxmk", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet", - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable", - "id": "4.20.8" - } - }, - "serviceProviderProperties": { - "activeOperationId": "bf643e76-55fe-48a0-a752-f5c5a2db72ad", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-node-pool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-node-pool-02.json index ba0ba9d894a..41899cc434e 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-node-pool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/nodepool-node-pool-02.json @@ -8,73 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "activeOperationId": "25e4713b-44b5-4799-9e60-894a132c6674", - "internalId": "/api/clusters_mgmt/v1/clusters/dl7f9px2f2/node_pools/5zdc9grtvf", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet", - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable", - "id": "4.20.8" - } - }, - "serviceProviderProperties": { - "activeOperationId": "25e4713b-44b5-4799-9e60-894a132c6674", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json index 2ecfc1962a1..95b5c9f4f91 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/operation-cluster-create-with-tags-create.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/7a4ed07a-47a1-4efb-966a-93a6316522a0" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/subscription.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/subscription.json index 9c642482427..cfa156513ef 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/subscription.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/create-current/06-cosmosCompare-confirm-content/subscription.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7" }, "properties": null, diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/cluster-create-with-tags.json index ece0e5aa806..fff96a5cd11 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,102 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-basic-node-pool.json index 41db1ee73cd..3cd1631e8e6 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-basic-node-pool.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/59mkgdzg9s", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-node-pool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-node-pool-02.json index 33c747b77ac..c235217a5ab 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-node-pool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/nodepool-node-pool-02.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/v4lx7rv2r4", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-basicnodepool.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-basicnodepool.json index 90d60d42c2f..4a5c0b87001 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-basicnodepool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-basicnodepool.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-nodepool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-nodepool-02.json index d042da7c3c6..b5bf9e3c619 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-nodepool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/01-load-old-data/operation-create-nodepool-02.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/4067756a-fcc1-4732-a211-d785d888203c" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-basicnodepool.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-basicnodepool.json index d0e3e4b1fab..885aa36b65f 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-basicnodepool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-basicnodepool.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/cdfb496e-6e70-4022-9f8d-b0dacf6d2ff5" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-nodepool02.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-nodepool02.json index 4df6e937da0..a8d043e912a 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-nodepool02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/04-listActiveOperations-node-create/operation-nodepool-create-nodepool02.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/4067756a-fcc1-4732-a211-d785d888203c" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json index 03db3af16a6..0998eace1bd 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/cluster-create-with-tags.json @@ -8,6 +8,7 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags" }, "customerProperties": { @@ -62,102 +63,6 @@ "identity": { "type": "UserAssigned" }, - "intermediateResourceDoc": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "identity": { - "type": "UserAssigned" - }, - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "provisioningState": "Succeeded", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - } - }, - "internalState": { - "internalAPI": { - "customerProperties": { - "api": { - "visibility": "Public" - }, - "autoscaling": { - "maxNodeProvisionTimeSeconds": 900, - "maxPodGracePeriodSeconds": 600, - "podPriorityThreshold": -10 - }, - "clusterImageRegistry": { - "state": "Disabled" - }, - "dns": {}, - "etcd": { - "dataEncryption": { - "customerManaged": { - "encryptionType": "KMS", - "kms": { - "activeKey": { - "name": "encryptionKeyName", - "vaultName": "keyVaultName", - "version": "2024-12-01-preview" - } - } - }, - "keyManagementMode": "CustomerManaged" - } - }, - "network": { - "hostPrefix": 23, - "machineCidr": "10.0.0.0/16", - "networkType": "OVNKubernetes", - "podCidr": "10.128.0.0/14", - "serviceCidr": "172.30.0.0/16" - }, - "platform": { - "managedResourceGroup": "managed-resource-group-name", - "networkSecurityGroupId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/networkSecurityGroups/nsg", - "operatorsAuthentication": { - "userAssignedIdentities": {} - }, - "outboundType": "LoadBalancer", - "subnetId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/bar/providers/Microsoft.Network/virtualNetworks/vnet/subnets/subnet" - }, - "version": { - "channelGroup": "stable" - } - }, - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags", - "identity": { - "type": "UserAssigned" - }, - "location": "fake-location", - "name": "create-with-tags", - "serviceProviderProperties": { - "activeOperationId": "7a4ed07a-47a1-4efb-966a-93a6316522a0", - "api": {}, - "clusterServiceID": "/api/clusters_mgmt/v1/clusters/9p2sk955gj", - "console": {}, - "dns": {}, - "managedIdentitiesDataPlaneIdentityURL": "https://dummyhost.identity.azure.net/otherinformation?aqueryarg=somevalue", - "platform": {}, - "provisioningState": "Succeeded" - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "tags": { - "one": "apple" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters" - } - }, "location": "fake-location", "name": "create-with-tags", "serviceProviderProperties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-02.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-02.json index 1bd4f70cecd..4f3fd0a96e2 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-02.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-02.json @@ -8,67 +8,6 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "intermediateResourceDoc": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/v4lx7rv2r4", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/node-pool-02", - "location": "fake-location", - "name": "node-pool-02", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "valid" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "4067756a-fcc1-4732-a211-d785d888203c", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "node-pool-02", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-basic-node-pool.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-basic-node-pool.json index 0fb73b2a88d..bbc526a3808 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-basic-node-pool.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/read-old-data/09-cosmosCompare-confirm-update/nodepool-basic-node-pool.json @@ -8,71 +8,10 @@ "partitionKey": "6b690bec-0c16-4ecb-8f67-781caf40bba7", "properties": { "cosmosMetadata": { + "instanceVersion": 3, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool" }, "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "intermediateResourceDoc": { - "activeOperationId": "9e244879-591b-4693-823a-4412b4200f4d", - "internalId": "/api/clusters_mgmt/v1/clusters/9p2sk955gj/node_pools/59mkgdzg9s", - "provisioningState": "Accepted", - "resourceId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - } - }, - "internalState": { - "internalAPI": { - "id": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/create-with-tags/nodePools/basic-node-pool", - "location": "fake-location", - "name": "basic-node-pool", - "properties": { - "autoRepair": true, - "autoScaling": { - "max": 5, - "min": 1 - }, - "labels": { - "label-ky": "label-value" - }, - "nodeDrainTimeoutMinutes": 2, - "platform": { - "enableEncryptionAtHost": false, - "osDisk": { - "diskStorageAccountType": "Premium_LRS", - "diskType": "Managed", - "sizeGiB": 64 - }, - "vmSize": "large" - }, - "provisioningState": "Accepted", - "taints": [ - { - "effect": "NoExecute", - "key": "foo.com/key", - "value": "other" - } - ], - "version": { - "channelGroup": "stable" - } - }, - "serviceProviderProperties": { - "activeOperationId": "9e244879-591b-4693-823a-4412b4200f4d", - "clusterServiceID": "", - "usesNewNodePoolDeletionApproach": false - }, - "systemData": { - "createdBy": "Unknown-ARO-HCP-frontend", - "createdByType": "Application", - "lastModifiedBy": "Unknown-ARO-HCP-frontend", - "lastModifiedByType": "Application" - }, - "type": "Microsoft.RedHatOpenShift/hcpOpenShiftClusters/nodePools" - } - }, "location": "fake-location", "name": "basic-node-pool", "properties": { diff --git a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/version-update/08-listActiveOperations-version-update/operation.json b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/version-update/08-listActiveOperations-version-update/operation.json index 32a4c672fb1..95bd291d350 100644 --- a/test-integration/frontend/artifacts/FrontendCRUD/NodePool/version-update/08-listActiveOperations-version-update/operation.json +++ b/test-integration/frontend/artifacts/FrontendCRUD/NodePool/version-update/08-listActiveOperations-version-update/operation.json @@ -1,5 +1,6 @@ { "cosmosMetadata": { + "instanceVersion": 1, "resourceID": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/providers/Microsoft.RedHatOpenShift/hcpOperationStatuses/00000000-0000-0000-0000-000000000000" }, "externalId": "/subscriptions/6b690bec-0c16-4ecb-8f67-781caf40bba7/resourceGroups/resourceGroupName/providers/Microsoft.RedHatOpenShift/hcpOpenShiftClusters/version-update/nodePools/update-np", diff --git a/test-integration/frontend/informer_test.go b/test-integration/frontend/informer_test.go index dee2b0902a8..ab6729d4b09 100644 --- a/test-integration/frontend/informer_test.go +++ b/test-integration/frontend/informer_test.go @@ -281,14 +281,14 @@ func subscriptionInformerIntegrationTestCase() informerIntegrationTestCase { expectedInitialAdds: 2, mutateDB: func(t *testing.T, ctx context.Context, resourcesDBClient database.ResourcesDBClient) { t.Helper() - sub1Updated := &arm.Subscription{ - CosmosMetadata: arm.CosmosMetadata{ - ResourceID: mustParseResourceID(t, "/subscriptions/sub-1"), - }, - ResourceID: mustParseResourceID(t, "/subscriptions/sub-1"), - State: arm.SubscriptionStateWarned, - } - _, err := resourcesDBClient.Subscriptions().Replace(ctx, sub1Updated, nil) + // Deep-copy the live document so the Replace carries the existing + // etag and instance version forward; PrepareForReplace rejects + // fresh-built docs. + existing, err := resourcesDBClient.Subscriptions().Get(ctx, "sub-1") + require.NoError(t, err) + sub1Updated := existing.DeepCopy() + sub1Updated.State = arm.SubscriptionStateWarned + _, err = resourcesDBClient.Subscriptions().Replace(ctx, sub1Updated, nil) require.NoError(t, err) sub3 := &arm.Subscription{ @@ -394,7 +394,14 @@ func clusterInformerIntegrationTestCase() informerIntegrationTestCase { mutateDB: func(t *testing.T, ctx context.Context, resourcesDBClient database.ResourcesDBClient) { t.Helper() clusterCRUD := resourcesDBClient.HCPClusters(subscriptionID, resourceGroupName) - _, err := clusterCRUD.Replace(ctx, newCluster(t, "cluster-1", arm.ProvisioningStateDeleting), nil) + // Deep-copy the live document so the Replace carries the existing + // etag and instance version forward; PrepareForReplace rejects + // fresh-built docs. + existing, err := clusterCRUD.Get(ctx, "cluster-1") + require.NoError(t, err) + updated := existing.DeepCopy() + updated.ServiceProviderProperties.ProvisioningState = arm.ProvisioningStateDeleting + _, err = clusterCRUD.Replace(ctx, updated, nil) require.NoError(t, err) _, err = clusterCRUD.Create(ctx, newCluster(t, "cluster-3", arm.ProvisioningStateAccepted), nil) @@ -523,7 +530,14 @@ func nodePoolInformerIntegrationTestCase() informerIntegrationTestCase { t.Helper() npCRUD := resourcesDBClient.HCPClusters(subscriptionID, resourceGroupName).NodePools(clusterName) - _, err := npCRUD.Replace(ctx, newNodePool(t, "np-1", 10), nil) + // Deep-copy the live document so the Replace carries the existing + // etag and instance version forward; PrepareForReplace rejects + // fresh-built docs. + existing, err := npCRUD.Get(ctx, "np-1") + require.NoError(t, err) + updated := existing.DeepCopy() + updated.Properties.Replicas = 10 + _, err = npCRUD.Replace(ctx, updated, nil) require.NoError(t, err) _, err = npCRUD.Create(ctx, newNodePool(t, "np-3", 2), nil) @@ -619,7 +633,14 @@ func activeOperationInformerIntegrationTestCase() informerIntegrationTestCase { opCRUD := resourcesDBClient.Operations(subscriptionID) // Transition op-1 to terminal state — should appear as deletion. - _, err := opCRUD.Replace(ctx, newOperation(t, "op-1", arm.ProvisioningStateSucceeded), nil) + // Deep-copy the live document so the Replace carries the existing + // etag and instance version forward; PrepareForReplace rejects + // fresh-built docs. + existing, err := opCRUD.Get(ctx, "op-1") + require.NoError(t, err) + updated := existing.DeepCopy() + updated.Status = arm.ProvisioningStateSucceeded + _, err = opCRUD.Replace(ctx, updated, nil) require.NoError(t, err) // Add new active operation. diff --git a/test-integration/utils/databasemutationhelpers/step_replace.go b/test-integration/utils/databasemutationhelpers/step_replace.go index c940454de78..7234869d862 100644 --- a/test-integration/utils/databasemutationhelpers/step_replace.go +++ b/test-integration/utils/databasemutationhelpers/step_replace.go @@ -72,7 +72,30 @@ func (l *replaceStep[InternalAPIType]) StepID() StepID { func (l *replaceStep[InternalAPIType]) RunTest(ctx context.Context, t *testing.T, stepInput StepInput) { resourceCRUDClient := NewCosmosCRUD[InternalAPIType](t, stepInput.ResourcesDBClient, l.key.ResourceID.Parent, l.key.ResourceID.ResourceType) + // Fetch the live document once so we can carry forward fields that the + // storage layer requires every Replace caller to start from the existing + // record: CosmosETag (for the conditional write) and InstanceVersion (so + // PrepareForReplace can auto-increment it). Tests that exercise the + // negative path supply their own etag/instanceVersion in the fixture and + // we leave those values untouched. + currentResource, err := resourceCRUDClient.Get(ctx, l.key.ResourceID.Name) + if err != nil && !strings.Contains(err.Error(), "ERROR CODE: 404") { + require.NoError(t, err, "failed to read existing resource before replace") + } + currentMD := cosmosDataFor(currentResource) + for _, resource := range l.resources { + if currentMD != nil { + if md := cosmosDataFor(resource); md != nil { + if len(md.CosmosETag) == 0 { + md.CosmosETag = currentMD.CosmosETag + } + if md.InstanceVersion == 0 { + md.InstanceVersion = currentMD.InstanceVersion + } + } + } + _, err := resourceCRUDClient.Replace(ctx, resource, nil) if len(l.expectedError) > 0 { require.ErrorContains(t, err, l.expectedError, "expected error during replace") diff --git a/test-integration/utils/databasemutationhelpers/step_replace_with_etag.go b/test-integration/utils/databasemutationhelpers/step_replace_with_etag.go index c2700b43276..6f1276ffef3 100644 --- a/test-integration/utils/databasemutationhelpers/step_replace_with_etag.go +++ b/test-integration/utils/databasemutationhelpers/step_replace_with_etag.go @@ -23,8 +23,6 @@ import ( "github.com/stretchr/testify/require" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/ARO-HCP/internal/api/arm" ) @@ -69,36 +67,37 @@ func (l *replaceWithETagStep[InternalAPIType]) StepID() StepID { func (l *replaceWithETagStep[InternalAPIType]) RunTest(ctx context.Context, t *testing.T, stepInput StepInput) { resourceCRUDClient := NewCosmosCRUD[InternalAPIType](t, stepInput.ResourcesDBClient, l.key.ResourceID.Parent, l.key.ResourceID.ResourceType) - // First, read the current resource to get its etag + // First, read the current resource to get its CosmosMetadata (etag plus + // instance version). The Replace path requires both: a matching etag for + // the conditional write, and a non-zero instance version so PrepareForReplace + // can auto-increment it. currentResource, err := resourceCRUDClient.Get(ctx, l.key.ResourceID.Name) - require.NoError(t, err, "failed to get current resource for etag") - - // Get the current etag from the resource - currentETag := getETagFromResource(currentResource) - require.NotEmpty(t, currentETag, "current resource should have an etag") + require.NoError(t, err, "failed to get current resource") + currentMD := cosmosDataFor(currentResource) + require.NotNil(t, currentMD, "current resource should expose CosmosMetadata") + require.NotEmpty(t, currentMD.CosmosETag, "current resource should have an etag") + require.NotZero(t, currentMD.InstanceVersion, "current resource should have a non-zero InstanceVersion") for _, resource := range l.resources { - // Copy the current etag to the resource we're about to replace - setETagOnResource(resource, currentETag) + // Carry the live etag and instance version onto the resource we're + // about to replace so the storage-layer prechecks pass. + if md := cosmosDataFor(resource); md != nil { + md.CosmosETag = currentMD.CosmosETag + md.InstanceVersion = currentMD.InstanceVersion + } _, err := resourceCRUDClient.Replace(ctx, resource, nil) require.NoError(t, err, "replace with current etag should succeed") } } -// getETagFromResource extracts the etag from a resource if it has embedded CosmosMetadata -func getETagFromResource(resource any) azcore.ETag { - switch v := resource.(type) { - case arm.CosmosMetadataAccessor: - return v.GetEtag() - } - return "" -} - -// setETagOnResource sets the etag on a resource if it has embedded CosmosMetadata -func setETagOnResource(resource any, etag azcore.ETag) { - switch v := resource.(type) { - case arm.CosmosMetadataAccessor: - v.SetEtag(etag) +// cosmosDataFor returns the embedded *arm.CosmosMetadata from a resource that +// implements arm.CosmosPersistable. Returns nil if the value doesn't satisfy +// the interface (no resource in the suite is expected to fall in that case; +// the nil return preserves the previous getETagFromResource behavior). +func cosmosDataFor(resource any) *arm.CosmosMetadata { + if p, ok := resource.(arm.CosmosPersistable); ok { + return p.GetCosmosData() } + return nil }