Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(graphql): correct searchable instance types #9973

Merged
merged 4 commits into from
Mar 30, 2022

Conversation

sundersc
Copy link
Contributor

@sundersc sundersc commented Mar 12, 2022

Fixes #9956

@sundersc sundersc requested a review from a team as a code owner March 12, 2022 06:44
@sundersc sundersc marked this pull request as draft March 15, 2022 20:24
@wvidana
Copy link

wvidana commented Mar 25, 2022

Why not just remove the allowedValues altogether? Just let CFN define those. That way no one has to maintain the list and people that need to run an older version of the CLI are not stuck with an old list.

@sundersc
Copy link
Contributor Author

If we remove the allowed values list and someone misspell an instance type, the error would appear at much later time on push resulting in poor DX. We are thinking about using SDK to retrieve the allowed instance types.
https://docs.aws.amazon.com/opensearch-service/latest/developerguide/configuration-api.html#configuration-api-actions-listinstancetypedetails

@sundersc sundersc added this to Needs review in Bug bash via automation Mar 25, 2022
@sundersc sundersc moved this from Needs review to In progress in Bug bash Mar 25, 2022
@sundersc sundersc removed this from In progress in Bug bash Mar 25, 2022
@sundersc sundersc marked this pull request as ready for review March 25, 2022 23:53
@codecov-commenter
Copy link

codecov-commenter commented Mar 26, 2022

Codecov Report

Merging #9973 (43a6398) into master (2f2229c) will decrease coverage by 0.00%.
The diff coverage is 61.53%.

@@            Coverage Diff             @@
##           master    aws-amplify/amplify-cli#9973      +/-   ##
==========================================
- Coverage   54.09%   54.08%   -0.01%     
==========================================
  Files         837      837              
  Lines       46374    46376       +2     
  Branches     9890     9891       +1     
==========================================
  Hits        25084    25084              
- Misses      19295    19296       +1     
- Partials     1995     1996       +1     
Impacted Files Coverage Δ
...chable-transformer/src/cdk/create-cfnParameters.ts 100.00% <ø> (ø)
...rc/graphql-transformer/transform-graphql-schema.ts 15.41% <28.57%> (-0.12%) ⬇️
...graphql-elasticsearch-transformer/src/resources.ts 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@alharris-at alharris-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One q, otherwise LGTM

@@ -157,85 +157,45 @@ export function createParametersStack(stack: Stack): Map<string, CfnParameter> {
'c6g.4xlarge.elasticsearch',
'c6g.xlarge.elasticsearch',
'c6g.12xlarge.elasticsearch',
't3.small.search',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this list the same as the second one down below? can we collapse these down to a single list so we're not duplicating these PRs across two files in the future?

Copy link
Contributor Author

@sundersc sundersc Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list is maintained separately for v1 and v2 transformers. It was intentionally maintained in different places to keep v1 and v2 packages independent of each other. The V1 will eventually go away.

Copy link
Contributor

@marcvberg marcvberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@phani-srikar phani-srikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sundersc sundersc merged commit dfcfa52 into aws-amplify:master Mar 30, 2022
@ataibarkai
Copy link

@sundersc why were all the X.Y.search instance types removed, and only the X.Y.elasticsearch instance types kept?

I believe .elasticsearch instance types are deprecated/outdated, and .search instances are now the preferred ones. E.g. see this document describing the OpenSearch summary of changes that occurred on September 8th 2021:

Instance types in Amazon OpenSearch Service are now in the format <type>.<size>.search—for example, m6g.large.search rather than m6g.large.elasticsearch

That document goes on to say that

"Existing domains will start automatically referring to the new instance types within the API and in the Billing and Cost Management console"

BUT it seems that if this is going to happen, it hasn't yet. .elasticsearch instance types appear to result in outdated deployments which behave different from the latest ones, and which the AWS OpenSearch console prompts you to upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenSearchInstanceType allowed values are unclear
7 participants