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

Cannot invoke "java.lang.Double.doubleValue() error #587

Closed
ismail-pitchstone opened this issue Dec 25, 2024 · 2 comments
Closed

Cannot invoke "java.lang.Double.doubleValue() error #587

ismail-pitchstone opened this issue Dec 25, 2024 · 2 comments

Comments

@ismail-pitchstone
Copy link

ismail-pitchstone commented Dec 25, 2024

We have a cloudformation template which has been created long time ago. It is stopped working after Dec 19,2024 with the following error:

Resource handler returned message: "Cannot invoke "java.lang.Double.doubleValue()" 
because the return value of "software.amazon.rds.dbcluster.ServerlessV2ScalingConfiguration.getMinCapacity()" is null
(RequestToken: a498314f-9176-941c-f89b-xyz, HandlerErrorCode: InternalFailure)" 

We dont use db.serverless, our instance class DBInstanceClass db.t4g.large

No idea why it hits getMinCapacity error. Is there any change in the RDS cloudformation provider recently?

 RDSCluster:
    Type: AWS::RDS::DBCluster
   ...
      ServerlessV2ScalingConfiguration:
        MinCapacity:
          Fn::If:
            - IsAuroraServerless
            - Ref: ServerlessMinCapacity
            - Ref: AWS::NoValue
        MaxCapacity:
          Fn::If:
            - IsAuroraServerless
            - Ref: ServerlessMaxCapacity
            - Ref: AWS::NoValue
            
IsAuroraServerless:
    Fn::Equals:
      - Ref: DBInstanceClass
      - db.serverless
 
DBInstanceClass:
    Description: Instance class for the database of this environment
    Type: String
    Default: db.t3.medium
    AllowedValues:
      - db.t3.medium
      - db.t3.large
      - db.t4g.large
      - db.r5.large
      - db.r5.xlarge
      - db.r5.2xlarge
      - db.r6g.large
      - db.r6g.xlarge
      - db.r6g.2xlarge
      - db.r7g.large
      - db.r7g.xlarge
      - db.r7g.2xlarge
      - db.serverless
     

@wbkang
Copy link
Contributor

wbkang commented Dec 29, 2024

Might be related to this change
https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-rds/blame/d2721eeae2b5e99d426abab3c19f41b63e4f9760/aws-rds-dbcluster/src/main/java/software/amazon/rds/dbcluster/ModelAdapter.java#L57

serverlessV2ScalingConfiguration.getMinCapacity() can be null but the code doesn't seem to check.

@wbkang
Copy link
Contributor

wbkang commented Jan 9, 2025

I think it's fixed by this e4d89e0 #590 please confirm and close @angusy29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants