Repository navigation
Description
Summary
Add a QuickSightPlugin stub covering the four operations used by the quick-suite-open-data dataset-loader and s3-load Lambda tools. These Lambdas register S3 paths as QuickSight data sources and datasets; the stub needs to accept those calls, store state, and return plausible ARNs so integration tests can verify the full load path without a real AWS account.
Operations required
| Operation | HTTP | Used by |
|---|---|---|
CreateDataSource |
POST /accounts/{accountId}/datasources |
dataset-loader, s3-load |
DescribeDataSource |
GET /accounts/{accountId}/datasources/{dataSourceId} |
dataset-loader (status poll) |
CreateDataSet |
POST /accounts/{accountId}/datasets |
dataset-loader |
DescribeIngestion |
GET /accounts/{accountId}/datasets/{dataSetId}/ingestions/{ingestionId} |
dataset-loader (ingestion poll) |
Expected behaviour
CreateDataSource — store the data source under state key quicksight:datasource:{accountId}/{dataSourceId}, return 201 with:
{
"DataSourceId": "<id>",
"Arn": "arn:aws:quicksight:<region>:<accountId>:datasource/<id>",
"CreationStatus": "CREATION_SUCCESSFUL",
"RequestId": "<uuid>"
}DescribeDataSource — return the stored data source with Status: "CREATION_SUCCESSFUL". Return 404 ResourceNotFoundException if not found.
CreateDataSet — store under quicksight:dataset:{accountId}/{dataSetId}, return 201 with Arn and IngestionId (a UUID that callers use to poll ingestion status).
DescribeIngestion — return:
{
"Ingestion": {
"Arn": "...",
"IngestionId": "<id>",
"IngestionStatus": "COMPLETED",
"RowInfo": {"RowsIngested": 1000, "RowsDropped": 0},
"CreatedTime": <unix>
},
"RequestId": "<uuid>",
"Status": 200
}File layout
Following the existing plugin conventions:
quicksight_plugin.go # Plugin implementation
quicksight_plugin_test.go # Unit tests
quicksight_types.go # Request/response structs (optional — inline if small)
Register in RegisterDefaultPlugins in plugins.go:
qsPlugin := &QuickSightPlugin{}
if err := qsPlugin.Initialize(ctx, PluginConfig{State: state, Logger: logger, Options: map[string]any{"time_controller": tc}}); err != nil {
return fmt.Errorf("initialize quicksight plugin: %w", err)
}
registry.Register(qsPlugin)Name() should return "quicksight".
Routing notes
QuickSight uses REST (not query-string or X-Amz-Target). Operations will be extracted from the URL path by ParseAWSRequest. The plugin's HandleRequest should dispatch on req.Operation and parse req.Path segments for resource IDs (account ID, data source/dataset ID, ingestion ID).
Test cases needed
- CreateDataSource → returns ARN, status CREATION_SUCCESSFUL
- DescribeDataSource (existing) → 200 with stored resource
- DescribeDataSource (missing) → 404 ResourceNotFoundException
- CreateDataSet → returns ARN + IngestionId
- DescribeIngestion (existing) → COMPLETED status
- DescribeIngestion (missing dataset) → 404
Context
Needed by quick-suite-open-data integration tests. The two Lambdas (dataset-loader/handler.py, s3-load/handler.py) both call this sequence: CreateDataSource → CreateDataSet → poll DescribeIngestion. With this stub, those tests can run against Substrate instead of mocking at the boto3 level.
Activity
Release v0.45.1: QuickSight + Bedrock Runtime plugins (#247, #248)
Release v0.45.9: /_substrate/reset endpoint + close stale issues (#259)