-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: add elasticache serverless support #101
base: main
Are you sure you want to change the base?
Conversation
Hey @dollev36, thank you for another contribution! Currently, I'm very busy with the university, I will be able to review this PR in about two weeks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I played a bit with the implementation and have a couple of suggestions:
-
I noticed that your implementation works with both Redis and Memcached and this is very good! Could you please implement support for both cache engines in this PR? I think this will be beneficial for the public interface quality (CLI arguments and config) as well as for the code quality. I'd suggest the following properties for the public interface:
- CLI:
--elasticache-redis-serverless-cache
,--elasticache-memcached-serverless-cache
(in bothinit
andconnect
) - Config:
elasticacheRedisServerlessCache
,elasticacheMemcachedServerlessCache
. - Interactive output: (Currently, I see indentation problems in the output as well as slight inconsistencies with previously implemented cluster and node targets)
Elasticache targets: Redis serverless caches: my-redis-cache my-second-redis-cache Memcached serverless caches: my-memcached-cache - Primary endpoint my-memcached-cache - Reader endpoint my-second-memcached-cache - Primary endpoint my-second-memcached-cache - Primary endpoint Redis clusters: ...
- CLI:
-
Reader endpoint didn't work for Redis cache and I also can't see it in the AWS Web Console. I think there's no such concept for Redis serverless. The reader endpoint works for Memcached, though.
-
Please, update the corresponding docs pages: https://github.com/basti-app/basti/blob/main/docs/reference/cli.md, https://github.com/basti-app/basti/blob/main/docs/reference/configuration-file.md
} | ||
|
||
export async function getRedisServerlessCache( | ||
Id: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use lowercase for function arguments.
@@ -17,6 +18,10 @@ export interface ModifyElasticacheInput { | |||
securityGroupIds: string[]; | |||
cachePreviousSecurityGroups: SecurityGroupMembership[]; | |||
} | |||
export interface ModifyServerlessInput { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's continue using Elasticache-specific names here. What about ModifyElasticacheServerlessInput
?
export function parseServerlessCacheResponse( | ||
response: ServerlessCache | ||
): AwsElasticacheServerlessCache[] { | ||
return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use zod
validator here.
Proposed Changes
add elasticache serverless support
Related Issues/PRs
Checklist
npm run test
).