Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug]: ServerlessCache Update Fails When Modifying Multiple Fields #1591

Open
1 task done
vargaadam opened this issue Dec 9, 2024 · 0 comments
Open
1 task done
Labels
bug Something isn't working needs:triage

Comments

@vargaadam
Copy link

vargaadam commented Dec 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Affected Resource(s)

elasticache.aws.upbound.io/v1beta1 - ServerlessCache

Resource MRs required to reproduce the bug

apiVersion: elasticache.aws.upbound.io/v1beta1
kind: ServerlessCache
metadata:
  name: example-serverless-cache
spec:
  deletionPolicy: Delete
  forProvider:
    cacheUsageLimits:
      - dataStorage:
          - maximum: 10
            unit: GB
        ecpuPerSecond:
          - maximum: 5000
    dailySnapshotTime: '1:00'
    description: ' '
    engine: redis
    majorEngineVersion: '7'
    region: region
    securityGroupIdRefs:
      - name: example-cache-elasticache-sg
    securityGroupIds:
      - example-security-group-id
    snapshotRetentionLimit: 5
    subnetIdRefs:
      - name: example-private-a
      - name: example-private-b
    subnetIdSelector:
      matchLabels:
        example.com/environment: environment
        example.com/project: project
    subnetIds:
      - subnet-1
      - subnet-2
    tags:
      crossplane-kind: serverlesscache.elasticache.aws.upbound.io
      crossplane-providerconfig: aws-provider
    userGroupId: user-group-id
  initProvider: {}
  managementPolicies:
    - '*'
  providerConfigRef:
    name: provider-config-ref

Steps to Reproduce

  1. Apply the above ServerlessCache manifest to your environment.
  2. Modify two parameters simultaneously in the ServerlessCache resource. For example, update cacheUsageLimits and dailySnapshotTime.
  3. Apply the updated manifest.

What happened?

When attempting to apply a manifest with changes to multiple parameters, the operation fails with an error.

The ServerlessCache resource controller should:

  1. Detect that multiple fields have been updated in the manifest.
  2. Sequentially execute multiple API requests to update one field at a time, respecting the limitation of the ModifyServerlessCache API.
  3. Return a success status after all updates have been successfully applied.

Relevant Error Output Snippet

update failed: async update failed: resource update call returned error diags: updating ElastiCache Serverless Cache (redacted): operation error ElastiCache: ModifyServerlessCache, https response error StatusCode: 400, RequestID: redacted, InvalidParameterCombination: Serverless Cache modifications only support modifying one field per request.

Crossplane Version

v1.17.0

Provider Version

v1.17.0

Kubernetes Version

v1.31.2-eks-7f9249a

Kubernetes Distribution

EKS

Additional Info

No response

@vargaadam vargaadam added bug Something isn't working needs:triage labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:triage
Projects
None yet
Development

No branches or pull requests

1 participant