MonkeyCanCode opened a new issue, #582: URL: https://github.com/apache/polaris/issues/582
### Describe the bug When trying to update the AWS roleArn for an existed catalog, it will throw 400 error. ### To Reproduce Create a new dummy catalog: ``` curl -X POST -H "Authorization: Bearer principal:root;realm:default-realm" "http://localhost:8181/api/management/v1/catalogs" -H "Content-Type: application/json" -d '{ "catalog": { "name": "polaris", "type": "INTERNAL", "readOnly": false, "properties": { "default-base-location": "s3://tmp/polaris/" }, "storageConfigInfo": { "roleArn": "arn:aws:iam::123456789012:role/role-name-with-path", "storageType": "S3", "allowedLocations": [ "s3://tmp/polaris/" ] } } }' ``` Ensure catalog is created: ``` curl -X GET -H "Authorization: Bearer principal:root;realm:default-realm" "http://localhost:8181/api/management/v1/catalogs" ``` Here is the sample output: ``` { "catalogs": [ { "type": "INTERNAL", "name": "polaris", "properties": { "default-base-location": "s3://tmp/polaris/" }, "createTimestamp": 1734571966158, "lastUpdateTimestamp": 1734571966158, "entityVersion": 1, "storageConfigInfo": { "storageType": "S3", "roleArn": "arn:aws:iam::123456789012:role/role-name-with-path", "externalId": null, "userArn": null, "region": null, "allowedLocations": [ "s3://tmp/polaris/" ] } } ] } ``` Then tried to update `roleArn` for this catalog: ``` curl -X PUT -H "Authorization: Bearer principal:root;realm:default-realm" "http://localhost:8181/api/management/v1/catalogs/polaris" -H "Content-Type: application/json" -d '{ "currentEntityVersion": 1, "properties": { "default-base-location": "s3://tmp/polaris/" }, "storageConfigInfo": { "roleArn": "arn:aws:iam::123456789013:role/role-name-with-path", "storageType": "S3", "allowedLocations": [ "s3://tmp/polaris/" ] } }' ``` ### Actual Behavior Getting following error message with status code 400: ``` { "error": { "message": "Cannot modify Role ARN in storage config from AwsStorageConfigurationInfo{storageType=S3, storageType=S3, roleARN=arn:aws:iam::123456789012:role/role-name-with-path, userARN=null, externalId=null, allowedLocation=[s3://tmp/polaris/], region=null} to AwsStorageConfigurationInfo{storageType=S3, storageType=S3, roleARN=arn:aws:iam::123456789013:role/role-name-with-path, userARN=null, externalId=null, allowedLocation=[s3://tmp/polaris/], region=null}", "type": "BadRequestException", "code": 400 } } ``` ### Expected Behavior Getting 200 instead. ### Additional context _No response_ ### System information _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
