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 understanding the repository structure and the issue. The issue is about
BatchDeleteTablebeing unsupported in a Floci (LocalStack-like) AWS Glue mock service. I need to implementbatchDeleteTablesmethod inGlueService.java.Let me explore the repository structure first.
Assistant
Let me look at the GlueService.java file first.
Assistant
Let me open the file and examine it.
Assistant
The open command seems to have different syntax. Let me check the
opencommand syntax again:codeopen [OPTIONS] [FILE] [LINE_NUMBER]So it should be
open src/main/java/io/github/hectorvent/floci/services/glue/GlueService.java.Assistant
Let me try the command in the bash terminal instead:
Assistant
Now I understand the codebase. Let me find how API actions are mapped and where the "InvalidAction" error comes from.
Assistant
Let me do one search at a time.
Assistant
Let me look at the GlueJsonHandler.java file.
Assistant
Now I have a clear understanding. I need to:
- Add a
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod toGlueService.java - Add
BatchDeleteTablecase inGlueJsonHandler.java
Let me also check for tests related to this:
- Add a
Assistant
Let me check the existing GlueServiceTest to understand testing patterns.
Assistant
Let me check the storage backend to understand the
Assistant
Let me check the InMemoryStorage and StorageBackend to understand the delete behavior.
Assistant
Let me do one at a
Assistant
Now I have all the information I need. Let me implement the changes. First, let me add the
BatchDeleteTableErrorrecord andbatchDeleteTablesmethod toGlueService.java.Assistant
The edit went wrong - it removed the
tableStore.put(key, table)line and left a broken structure. Let me restore the file and tryAssistant
Good, file restored. Let me be more careful. Let me first view the exact lines:
Assistant
Now I know the exact line numbers. Let me add the
BatchDeleteTableErrorrecord afterUserDefinedFunctionPage(line 339), and add thebatchDeleteTablesmethod beforedeleteTable(line 164).First, let me add the record
Assistant
Let me navigate to line 339 first and then replace
Assistant
Now let me replace the record line to add the new record
Assistant
Now let me add the
batchDeleteTablesmethod beforedeleteTable. Let me navigate to lineAssistant
Now let me add the
batchDeleteTablesmethod. I'll replace the blank line betweengetTableVersionsanddeleteTableAssistant
Now let me add the
BatchDeleteTablecase to theGlueJsonHandler.java. Let me look at the switch statement.Assistant
Let me look at the handler around the DeleteTable
Assistant
Now let me add the
BatchDeleteTablecase to the handler. I need to switch to the right file.Assistant
Now let me add the
BatchDeleteTablecase afterDeleteTable(after line 93). I'll do aAssistant
Both files are updated. Let me verify the changes compile correctly and run the existing tests.
Assistant
Let me set HOME and
Assistant
Compilation succeeded. Let me run the GlueService tests to ensure nothing is broken:
Assistant
All 24 existing tests pass. Let me also run the other Glue-related tests to ensure nothing is broken
Assistant
All tests pass. Let me also check if there are integration tests for Glue:
Assistant
All tests pass. Let me verify the final state of the changes with a quick git
Assistant
The changes are clean and correct. Let me go through the
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.