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

[Feature] Service-specific ACKAddOns #978

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dwright20
Copy link

@dwright20 dwright20 commented Apr 5, 2024

Issue #, if available: 974

Description of changes:

  • Added service-specific ACKAddOn classes that are individually annotated with @supportsALL or @supportsX86 per ACK Registry
  • Added unit tests for each created addon that tests attempting to create the addon using an x86 builder (EksBlueprint.builder()) & an ARM builder (GravitonBuilder())

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Added a service-specific ACKAddOn class per all AWS services in serviceMappings to allow ARM support of ACK services that support ARM
- Added unit tests for service-specific ACKAddOns S3 (supports all platforms) & MemoryDB (only serviceMappings service which does not support ARM)
- Added service-specific ACKAddOn classes as exports of ack/index.ts
…creation more robust

- Kinesis & KMS annotations were missed & are now added
- Improved tests so that it covers all service-specific addons
- Added test to confirm it will error if an addon with an unsupported architect and supported architecture are added to the same build
- Modified createNamespace logic to check if the addon namespace exists before attempting to create it
logic was added as test for adding multiple ACKAddOns was failing as both addons were trying to create the same namespace. It was most likely an intentional design choice for the user to override the default prop to create namespace, as the prop comment mentions it. Modified test so that only the first ACKAddOn added to the list spefies to create namespace and others do not
Copy link
Collaborator

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@dwright20 First of all thankyou so much for you PR. Especially liked the test scripts a lot. Fundmentally, I dont think we should use this design approach of one class per ACK chart, this will make the design difficult the expand for future addons. I think we should stick to existing design with following as design choices:

  1. Add supportsALL to original ACK addon and create another enum of list of services which do not support ARM, In the ACKAddon if the AWS Service is in the ENUM list of non-ARM supported like memoryDB and if Nodes are ARM, we should error out.
  2. Add supportsALL to original ACK addon along with adding a documentation to say ARM is not supported today for MemoryDB (This is more of temp solution).
    @shapirov103 Any other design choices?

extends Omit<AckAddOnProps, "serviceName"> { }

@supportsALL
export class ACMAckAddOn extends AckAddOn {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont think we should use this design approach of one class extension per ACK chart, this will make the design difficult the expand.

Copy link
Collaborator

@shapirov103 shapirov103 left a comment

Choose a reason for hiding this comment

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

@dwright20 seems like a bit of duplication going on, but on the other hand it creates a placeholder for each ACK.

Ideally, we would like to keep the approach generic so that little maintenance is needed.

I don't want to dismiss the design choice, however, let's use the principle of "as simple as possible but not simpler".

Let's say we change the existing approach slightly and add the target CPU architecture to the serviceMappings.ts, then implement this support in the AckAddOn. We will also add supportsAll to the AckAddOn by default and add code that will handle exclusions. This can be done by replicating some of the code that we have in the supportsX86 and such decorators.

If the above is implemented, what else is missing that requires explicit class per Ack controller implementation? Do you envision additional use cases?

@shapirov103
Copy link
Collaborator

@dwright20 please see my comment and let me know what you think. I mentioned an approach to simplify the design approach to make it easier for us to maintain. This has been open for a while.

Copy link

This PR has been automatically marked as stale because it has been open 60 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants