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:
{ "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.aws: [ERROR]: An error occurred (InvalidAction) when calling the BatchDeleteTable operation: Action BatchDeleteTable is not supportedReproduction
endpoint=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_tableEnvironment
- Floci version / image tag:
floci/floci:1.5.22 - Java SDK version (if applicable): AWS CLI
- How you're running Floci (Docker / native /
mvn quarkus:dev): Docker
Interface
Type: Function Name: batchDeleteTables Path: src/main/java/io/github/hectorvent/floci/services/glue/GlueService.java Input: String databaseName, List tableNames Output: List<GlueService.BatchDeleteTableError> Description: Deletes multiple tables by name within a database, skipping and reporting errors for any tables that are not found. Use this to process the
BatchDeleteTableAWS Glue API action. - Floci version / image tag:
Assistant
I'll start by exploring the repository structure to understand how it's organized and find the relevant files for implementing the
BatchDeleteTablefunctionality.Assistant
Assistant
Let me read the GlueService.java file to understand the current implementation.
Assistant
Now let me look at how the Glue API actions are mapped. I need to find where the action routing happens.
Assistant
No files currently mention BatchDeleteTable. Let me look for how other actions are handled.
Assistant
Let me look at the GlueJsonHandler.java to understand how actions are mapped.
Assistant
Now I understand the structure. I need to:
- Add a
batchDeleteTablesmethod toGlueService.java - Add a handler for "BatchDeleteTable" action in
GlueJsonHandler.java
Let me first check the existing tests to understand the test patterns:
- Add a
Assistant
Now let me check the AWS API documentation format for BatchDeleteTable to understand what the response should look like. Let me also look at how similar batch operations work in the codebase:
Assistant
Now I understand the pattern. Let me implement the
BatchDeleteTablefunctionality. I need to:- Add a
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod toGlueService.java - Add the handler case for "BatchDeleteTable" in
GlueJsonHandler.java
Let me start by adding the method to GlueService.java:
- Add a
Assistant
Now I need to insert this code into GlueService.java. Let me find the right place to add it (after the deleteTable method):
Assistant
Now let me insert the batchDeleteTables method after the deleteTable method (after line 171):
Assistant
Now I'll insert the batchDeleteTables method after the deleteTable method:
Assistant
Let me use the correct command syntax:
Assistant
I need to insert the batchDeleteTables method after line 171 (after the closing brace of the deleteTable method). I'll use the edit command to add the new method and records.
Assistant
I see the issue - the closing brace
}for thedeleteTablemethod is missing. Let me fix this:Assistant
Good, the method is now inserted correctly. Now I need to add the record classes at the end of the file, just before the closing brace. Let me check the end of the file:
Assistant
Now I need to add the record classes before the closing brace at line 456. I'll also need to add the
UserDefinedFunctionPagerecord, but I see it already exists. Let me check:Assistant
Good, I can add the new record classes near the existing UserDefinedFunctionPage record. Let me add them:
Assistant
Good! Now I need to add the handler in GlueJsonHandler.java. Let me add it after the "DeleteTable" case:
Assistant
I need to add the BatchDeleteTable case to the GlueJsonHandler.java. I'll insert it after the DeleteTable case (after line 93). Let me use the edit command.
Assistant
I see there's a duplicate closing brace. Let me fix this:
Assistant
Looking good! The code structure appears correct. Now let me verify the changes compile correctly by running the tests:
Assistant
Great! The compilation was successful. Now let me run the existing tests to make sure I didn't break anything:
Assistant
The tests passed. Now let me create a test script to verify my implementation works correctly:
Assistant
I need to fix the missing imports:
Assistant
Let me run the test to verify the batch delete functionality works correctly.
Assistant
All tests passed. Now let me clean up the test file I created and run the existing glue tests to make sure I didn't break anything:
Assistant
I need to run the existing glue tests to make sure I didn't break anything.
Assistant
All existing tests passed. Let me also run any integration tests related to Glue to make sure everything works correctly.
Assistant
All the tests passed. Now let me review the changes I made and verify they match the expected behavior from the issue description. Let me check the diff to see what I've changed.
Assistant
Let me verify the implementation is complete by checking the changes match the expected behavior from the issue:
-
Expected behavior: When the request contains one existing table and one missing table, AWS deletes the existing table and returns an
Errorsentry for the missing table withEntityNotFoundException. -
Actual implementation: My implementation:
- Processes each table in the list
- Deletes existing tables from the store
- Also deletes associated partitions (matching the existing
deleteTablebehavior) - Returns errors for missing tables with
EntityNotFoundException - Returns the response with an "Errors" field containing the list of errors
The implementation looks correct. Let me also verify the response format matches the AWS API by checking how similar responses are structured in the codebase.
-
Assistant
I see there was a timeout. Let me continue where I left off - I was checking the response format. Let me verify that my JSON serialization matches the AWS API format:
Assistant
Looking at the codebase, I see that the models use
@JsonPropertyannotations to ensure PascalCase field names for the AWS API. My records need similar annotations to match the expected AWS response format.Let me check the expected AWS response format from the issue and update my implementation:
Assistant
I see that the models use
@JsonPropertyannotations to ensure proper serialization with PascalCase field names. I need to update my record classes to include these annotations as well. Let me update the GlueService.java file:Assistant
Looking at the expected AWS response format from the issue, I need to add
@JsonPropertyannotations to ensure the field names are serialized in PascalCase. Let me update the records:Assistant
Good, the import was added. Now I need to update the record classes to use
@JsonPropertyannotations for proper PascalCase serialization:Assistant
Let me compile and test the changes to make sure everything still works correctly.
Assistant
The compilation was successful. Now let me run the existing tests to make sure I didn't break anything.
Assistant
The tests passed. Let me now create a test script to verify the JSON serialization is correct with the @JsonProperty annotations.
Assistant
Let me run the test to verify the JSON serialization is correct.
Assistant
The JSON serialization is working correctly and matches the expected AWS API response format. Let me clean up the test file and verify the final state of the changes.
Assistant
Let me verify the final state of the changes by reviewing the diff and running the existing tests one more time to make sure everything works correctly.
Assistant
The current state of the implementation is:
- I've added the
batchDeleteTablesmethod toGlueService.java - I've added the handler case for "BatchDeleteTable" in
GlueJsonHandler.java - I've added the necessary record classes with
@JsonPropertyannotations for proper JSON serialization - All existing tests pass
- The JSON output matches the expected AWS API format
The changes are complete and ready to submit. Let me do a final verification by running all glue tests to make sure nothing is broken.
- I've added the
Assistant
Let me check the test results more explicitly to ensure all tests passed.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.