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 the codebase and locate relevant files. Let's first get an overview.
- Assistant
Let me look for the Glue service file mentioned in the issue.
- Assistant
Let me examine the key files to understand the current implementation.
- Assistant
Now let's look at the GlueService.java to understand the existing deleteTable method and other table-related methods.
- Assistant
Now let me look at the existing tests to understand the testing pattern:
- Assistant
Let me check the
AwsErrorResponseWithItemclass to see if there's a pattern for error responses: - Assistant
Let me check the AwsException class:
- Assistant
Now let me check how
DeleteTableis handled in the JSON handler - it doesn't check if the table exists before deleting. Let me also look at theDeleteSchemaVersionshandler since it has a similar pattern of returning errors: - Assistant
Let me look at the existing GlueService and understand how
deleteTablecurrently works, and check for how errors are returned in thehandleDeleteSchemaVersionspattern: - Assistant
Now I have a clear understanding of the codebase. Let me plan the implementation:
-
GlueService.java: Add a
batchDeleteTablesmethod that:- Takes
databaseNameandList<String> tableNames - Iterates over table names
- For each table, check if it exists
- If exists, delete it (using existing deleteTable logic)
- If not found, collect error info (TableName, ErrorCode, ErrorMessage)
- Return list of errors as a record
BatchDeleteTableError
- Takes
-
GlueJsonHandler.java: Add a
BatchDeleteTablecase that:- Reads
DatabaseNamefrom request - Reads
TablesToDeletearray from request as list of strings - Calls
glueService.batchDeleteTables(databaseName, tableNames) - Returns response with
Errorslist
- Reads
Let me first check the existing deleteTable method more carefully:
-
- Assistant
Let me check the existing deleteTable method and understand how it works - it doesn't check if the table exists before deleting:
- Assistant
Now I have a clear understanding of the codebase. Let me implement the changes needed:
- Add a
BatchDeleteTableErrorrecord toGlueService - Add a
batchDeleteTablesmethod toGlueService - Add the
BatchDeleteTablecase inGlueJsonHandler
Let me start with the
GlueService.javafile: - Add a
- Assistant
Now I have a complete understanding. Let me implement the changes. First, I'll add the
batchDeleteTablesmethod and theBatchDeleteTableErrorrecord toGlueService.java: - Assistant
Let me see the end of the file to know where to add the record and method:
- Assistant
Now I have a clear picture of the codebase. Let me implement the changes:
- Add
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod toGlueService.java - Add
BatchDeleteTablecase toGlueJsonHandler.java
- Add
- Assistant
Let me use the edit command instead:
- Assistant
Now let me add the
batchDeleteTablesmethod after thedeleteTablemethod: - Assistant
I see the edit replaced the wrong part. The closing brace of
deleteTablewas removed. Let me fix this: - Assistant
I see there's a duplicate now. Let me fix the file by removing the duplicate:
- Assistant
Good. Now let me add the
BatchDeleteTableErrorrecord at the end of the class: - Assistant
Now let me add the
BatchDeleteTableErrorrecord right afterUserDefinedFunctionPage: - Assistant
Now let me add the
BatchDeleteTablecase to theGlueJsonHandler.javaswitch statement. Let me add it after theDeleteTablecase: - Assistant
I need to add the
BatchDeleteTablecase afterDeleteTable. Let me add it between lines 93 and 94. - Assistant
Now let me verify the files compile correctly by running the build:
- Assistant
Compilation succeeded. Now let me run the existing Glue tests to ensure nothing is broken:
- Assistant
Good, tests passed. Let me also run all the Glue-related tests:
- Assistant
All tests pass. Let me now verify the final state of both files and create a quick test script to ensure the fix works as expected:
- Assistant
The service code looks correct. Let me verify the handler changes:
- Assistant
Now let me run the full test suite to make sure nothing is broken:
- Assistant
Let me just run the Glue-specific tests:
- Assistant
All 24 existing tests pass. Let me verify the
BatchDeleteTableErrorrecord is at the right place: - Assistant
Everything looks clean. Let me verify the full diff of our changes:
- Assistant
The changes look clean and correct. Let me run the tests one more time to confirm everything works:
- Assistant
The -q flag might be suppressing the output. Let me run without -q.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.