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
The issue is about implementing
BatchDeleteTablefor AWS Glue in a Floci (LocalStack-like) service. Let me explore the repository structure first to understand how it's organized and find the relevant files.Let me start by exploring the repository structure.
Assistant
Let me look for the GlueService.java file and the glue-related files.
Assistant
Let me look at the key files to understand the current state of the code.
Assistant
Let me use the open command via the terminal.
Assistant
Let me see the rest of the file, especially the table-related methods.
Assistant
Let me continue viewing the rest of the file.
Assistant
Let me continue scrolling to the end of the file.
Assistant
Let me continue to see the end of the file.
Assistant
Now let me look at the GlueJsonHandler.java to understand how requests are dispatched.
Assistant
It seems the
opencommand needs to be run through the terminal.Assistant
Now let me look at the test file to understand the test pattern:
Assistant
Now I have a clear understanding of the issue. I need to:
- Add a
BatchDeleteTableErrorrecord toGlueService.java - Add a
batchDeleteTablesmethod toGlueService.java - Add a
BatchDeleteTablecase toGlueJsonHandler.java
Let me implement these changes. First, let me add the
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod toGlueService.java:- Add a
Assistant
The heredoc approach has issues with special characters. Let me use a different approach - I'll create a script to make the edits.
Assistant
Let me check what tools are available and try a different approach.
Assistant
Good, perl is available. Let me use perl for the edit.
Assistant
Let me verify the edit was applied correctly.
Assistant
Good, the
GlueService.javanow has thebatchDeleteTablesmethod. Now I need to add theBatchDeleteTablecase toGlueJsonHandler.java. Let me first see the exact line where the existingDeleteTablecase is:Assistant
Let me see the area around the DeleteTable case in GlueJsonHandler.java:
Assistant
Now I need to add the
BatchDeleteTablecase after theDeleteTablecase. Let me use perl:Assistant
Let me write a perl script to a temp file first.
Assistant
Let me use a different approach - write the code block to a separate file, then use sed to insert it.
Assistant
Now let me use sed to insert the content before the "DeleteTable" line.
Assistant
Let me verify the edit was applied correctly:
Assistant
Now let me check the imports in GlueJsonHandler.java to make sure we have all required imports:
Assistant
All imports are already present. Let me verify the GlueService.java has the imports it needs:
Assistant
Good, all required imports are present. Let me try to compile the project to check for errors:
Assistant
Compilation succeeded. Let me run the existing tests to make sure they still pass:
Assistant
Let me run the tests again and check for the final result:
Assistant
All 24 tests pass. Let me verify the final state of both files:
Assistant
Let me verify the complete
batchDeleteTablesmethod one more time:Assistant
And the
GlueJsonHandlercase:Assistant
Let me also do a quick sanity check with
git diffto see all changes:Assistant
Let me also check if there are tests for GlueJsonHandler:
Assistant
Let me run all tests in the project to make sure nothing else is broken:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.