ISSUE DESCRIPTION [BUG] Glue BatchDeleteTable is unsupported Service AWS Glue AWS API…
- User
ISSUE DESCRIPTION
[BUG] Glue BatchDeleteTable is unsupported
Service
AWS API Action
Expected behavior
AWS behavior supports
BatchDeleteTable. When the request contains one existing table and one missing table, AWS deletes the existing table and returns anErrorsentry for the missing table.AWS behavior verified with AWS CLI:
json{ "Errors": [ { "TableName": "missing_table", "ErrorDetail": { "ErrorCode": "EntityNotFoundException", "ErrorMessage": "Table missing_table not found" } } ] }A subsequent
GetTablefor the existing table returnsEntityNotFoundException.Actual behavior
Floci
floci/floci:1.5.22rejectsBatchDeleteTableas an unsupported action.textaws: [ERROR]: An error occurred (InvalidAction) when calling the BatchDeleteTable operation: Action BatchDeleteTable is not supportedReproduction
bashendpoint=http://localhost:4566 export AWS_ACCESS_KEY_ID=<redacted-secret> AWS_SECRET_ACCESS_KEY=<redacted-secret> AWS_DEFAULT_REGION=us-east-1 db=test_floci_batch_delete aws --endpoint-url "$endpoint" glue create-database --database-input "Name=$db" aws --endpoint-url "$endpoint" glue create-table \ --database-name "$db" \ --table-input 'Name=existing_table,StorageDescriptor={Columns=[{Name=id,Type=int}]}' aws --endpoint-url "$endpoint" glue batch-delete-table \ --database-name "$db" \ --tables-to-delete existing_table missing_table Assistant
Let me start by exploring the repository structure to understand the codebase.
Assistant
Let me explore the Glue service structure.
Assistant
Now let me look at the GlueJsonHandler.java to understand how actions are handled.
Assistant
Now let me look at the GlueService tests to understand testing patterns.
Assistant
Let me check existing tests for DeleteSchemaVersions and the Table model.
Assistant
Let me look at the ECR's BatchDeleteImage implementation as it's similar.
Assistant
Let me also look at the EcrJsonHandler for the BatchDeleteImage handler.
Assistant
Let me look at how the Glue service controller is structured.
Assistant
Let me check the project's build and test setup.
Assistant
Let me look at integration tests if available.
Assistant
Let me check the GlueCatalogSchemaBindingIntegrationTest to see how integration tests are structured.
Assistant
Let me first try to compile the project to make sure the codebase builds.
Assistant
Let me look at the existing deleteTable tests.
Assistant
Now I have enough context. Let me first reproduce the issue by checking the code.
Assistant
Now let me implement the changes. First, I'll add the
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod in GlueService.Assistant
Now I have the file open. Let me find the
deleteTablemethod to addbatchDeleteTablesright after it.Assistant
Let me use search_file correctly.
Assistant
Now I'll add the
batchDeleteTablesmethod right afterdeleteTable.Assistant
Now I need to add the
BatchDeleteTableErrorrecord. Let me find the existingUserDefinedFunctionPagerecord.Assistant
Now I'll add the
BatchDeleteTableErrorrecord near theUserDefinedFunctionPagerecord.Assistant
Now let me update the
GlueJsonHandler.javato add theBatchDeleteTablecase. Let me first see the current location.Assistant
Now let me add the
BatchDeleteTablecase right afterDeleteTable.Assistant
Now I need to add a
readStringListhelper method. Let me find a good place.Assistant
Now I'll add the
readStringListhelper method.Assistant
Now let me verify the changes compile.
Assistant
The code compiles. Now let me run the existing GlueServiceTest to make sure nothing is broken.
Assistant
The maven is in offline mode and we need to download a dependency. Let me try without offline mode.
Assistant
All 24 existing tests pass. Now let me also run the existing GlueCatalogSchemaBindingIntegrationTest to make sure I didn't break any of the integration tests either.
Assistant
Now let me create a temporary script to reproduce the issue and verify the fix.
Assistant
We have aws CLI and curl. Let me also check python3.
Assistant
Let me check how integration tests are run to understand how the Quarkus server gets started.
Assistant
Let me check if a Quarkus dev server is already running or start one.
Assistant
No Quarkus server is running. Let me create a temporary integration test to verify the fix.
Assistant
I need to set up the encoder config. Let me look at how the existing test does it.
Assistant
Let me update the test to use the RestAssuredJsonUtils.
Assistant
Let me look at the actual response and check the AWS API spec. I need to use the proper wire format with
TableName,ErrorDetail.ErrorCode,ErrorDetail.ErrorMessage.Assistant
Let me update the handler to build the proper AWS response with the proper structure.
Assistant
Now let me add the
handleBatchDeleteTablemethod. Let me find where to add it.Assistant
Now let me add the
handleBatchDeleteTablemethod.Assistant
Now let me run the temporary test to see if it passes.
Assistant
The issue is the test path - the
ErrorCodeis nested underErrorDetail. Let me fix the test.Assistant
All 3 tests pass! Now let me also verify the edge case when the database doesn't exist.
Assistant
All 5 tests pass! Now let me also make sure all the existing Glue tests pass.
Assistant
All 195 Glue tests pass. Now let me clean up the temporary test file.
Assistant
Now let me run a broader test to make sure nothing else is broken.
Assistant
The full test suite is too large. Let me run just the relevant subset of tests for glue to make sure I didn't break anything.
Assistant
All 190 glue tests pass. Let me do a quick check of all the changes I made.
Assistant
Let me also start the Quarkus dev server in the background and test using the AWS CLI.
Assistant
Let me check the localstack-parity script to see if there's a Glue test I can run.
Assistant
Let me verify the final state of my changes.
Assistant
Let me check the compatibility tests for Glue.
Assistant
Let me start the Quarkus dev server in the background and verify with AWS CLI.
Assistant
The dev server didn't start because of a path issue. Let me try with the full path.
Assistant
The dev mode requires downloading additional dependencies. Let me try without
-o(offline mode).Assistant
The server is up. Now let me test with the AWS CLI using the exact reproduction from the issue.
Assistant
The fix works exactly as the issue describes! Let me also test a few edge cases.
Assistant
All edge cases work correctly. Let me also check that the original "InvalidAction" error is gone.
Assistant
The fix works perfectly. Let me now stop the dev server.
Assistant
Let me also run the existing GlueServiceTest one more time to make sure all the existing tests pass.
Assistant
All tests pass. Let me do a final review of all my changes.
Assistant
My changes are clean and only affect the two Glue service files. Let me also make sure that my changes don't include the temporary test file.
Assistant
The temporary test file is removed. Let me also confirm by searching for any reference to BatchDeleteTable:
Assistant
All my changes are complete and clean. Let me do a final review of the changes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.