mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
feat(emr): ListReleaseLabels, DescribeReleaseLabel and ListSupportedInstanceTypes (#5748)
* feat(emr): ListReleaseLabels, DescribeReleaseLabel and ListSupportedInstanceTypes None was served, so Terraform's aws_emr_release_labels and aws_emr_supported_instance_types data sources failed against Floci. A curated catalogue of EMR releases (emr-7.5.0, Floci's default, and emr-7.4.0, emr-6.15.0, emr-6.14.0 and emr-5.36.2) carries each release's applications and versions from the EMR Release Guide and its recent Amazon Linux releases, with common instance types and their EC2 sizes. The three actions filter and page it as the API documents, and answer InvalidRequestException for an unknown release, a bad token or an out-of-range MaxResults. A configured default release outside the catalogue is still listed. Closes #5734 * fix(emr): report EMR architecture values and match application versions without regard to case ListSupportedInstanceTypes returned the EC2 spellings x86_64 and arm64; the EMR model gives X86_64 and AARCH64 for Architecture. The ListReleaseLabels application filter matched the name without regard to case but not the version, so phoenix@4.14.3-hbase-1.4 missed emr-5.36.2. * refactor(emr): page the release catalogue with the shared Pagination ListReleaseLabels and ListSupportedInstanceTypes now page through core.common.Pagination, with the filters in the token namespace so a token replayed with other filters, or altered, is refused. DescribeReleaseLabel answers every application, as AWS reserves its MaxResults and NextToken. The EMR integration tests share one request helper.
This commit is contained in:
1 parent
e3e06a1122
commit
7dc514b52f
13 files changed
+696
-137
No files matched your search
@@ -46,10 +46,31 @@ Floci emulates the Amazon EMR (Elastic MapReduce) management API. Clusters (job
|
||||
| `RemoveAutoTerminationPolicy` | Removes a cluster's auto termination policy |
|
||||
| `PutAutoScalingPolicy` | Attaches an automatic scaling policy to a core or task instance group |
|
||||
| `RemoveAutoScalingPolicy` | Removes an instance group's automatic scaling policy |
|
||||
| `ListReleaseLabels` | List release labels, newest first, by prefix or application; see [Release catalogue](#release-catalogue) |
|
||||
| `DescribeReleaseLabel` | A release's applications and Amazon Linux releases (the latest release without a label) |
|
||||
| `ListSupportedInstanceTypes` | The instance types a release supports, with vCPU, memory, storage and architecture |
|
||||
| `GetBlockPublicAccessConfiguration` | Returns the account's block public access configuration for the Region |
|
||||
| `PutBlockPublicAccessConfiguration` | Sets the account's block public access configuration for the Region |
|
||||
<!-- floci:actions:end -->
|
||||
|
||||
## Release catalogue
|
||||
|
||||
`ListReleaseLabels`, `DescribeReleaseLabel` and `ListSupportedInstanceTypes` read a curated catalogue,
|
||||
not AWS's full list: `emr-7.5.0` (Floci's default), `emr-7.4.0`, `emr-6.15.0`, `emr-6.14.0` and
|
||||
`emr-5.36.2`. Each release's applications and versions come from its page in the Amazon EMR Release
|
||||
Guide, with names lowercased and AWS's `-amzn-N` build suffix dropped, as the API reports them, and
|
||||
its two most recent Amazon Linux releases. A `floci.services.emr.default-release-label` outside the
|
||||
catalogue is still listed, with no applications.
|
||||
|
||||
`ListReleaseLabels` filters by `Prefix` (such as `emr-6`) and `Application` (`spark` or
|
||||
`spark@3.4.1`, matched without regard to case) and pages with `MaxResults` (1 to 100) /
|
||||
`NextToken`; a token only works with the filters it was issued for. `DescribeReleaseLabel` answers
|
||||
every application at once, since AWS reserves its `MaxResults` and `NextToken` for future use.
|
||||
`ListSupportedInstanceTypes` reports common families (c5, m5, m5d, m6g, r5, r6g) with
|
||||
their EC2 sizes. An unknown release label, a bad token or an out-of-range `MaxResults` is
|
||||
`InvalidRequestException`. `RunJobFlow` does not check its release label or instance types against
|
||||
the catalogue.
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
|
||||
@@ -78,7 +78,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
|
||||
| [Redshift](redshift.md) | `POST /` with `Action=` param + PostgreSQL container | Query + PostgreSQL wire (+ CFN) | 43 |
|
||||
| [Redshift Data API](redshift-data.md) | `POST /` + `X-Amz-Target: RedshiftData.*` | JSON 1.1 | 11 |
|
||||
| [Redshift Serverless](redshift-serverless.md) | `POST /` + `X-Amz-Target: RedshiftServerless.*` | JSON 1.1 | 55 |
|
||||
| [EMR](emr.md) | `POST /` + `X-Amz-Target: ElasticMapReduce.*` | JSON 1.1 | 37 |
|
||||
| [EMR](emr.md) | `POST /` + `X-Amz-Target: ElasticMapReduce.*` | JSON 1.1 | 40 |
|
||||
| [EMR Serverless](emr-serverless.md) | `/applications/*`, `/tags/*` | REST JSON | 10 |
|
||||
| [Data Firehose](firehose.md) | `POST /` + `X-Amz-Target: Firehose_20150804.*` | JSON 1.1 | 12 |
|
||||
| [ECS](ecs.md) | `POST /` + `X-Amz-Target: AmazonEC2ContainerServiceV20141113.*` | JSON 1.1 | 58 |
|
||||
|
||||
Reference in new issue
Block a user