-
Notifications
You must be signed in to change notification settings - Fork 8
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
make the ephemeral startup configurable for users #37
base: main
Are you sure you want to change the base?
Conversation
The ephemeral instance for the application preview has been shut down |
5f60e10
to
d20755a
Compare
d20755a
to
ef89543
Compare
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.
Awesome that we're building this!
Added a first set of comments.
@@ -23,7 +23,10 @@ inputs: | |||
description: 'The lifetime of the ephemeral instance, how long the instance should be available for' | |||
required: false | |||
default: '30' | |||
|
|||
ephemeral-configuration: |
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.
would it make more sense to keep this as configuration
, similar to what we have in place over in the normal startup action? link: https://github.com/localstack/setup-localstack/blob/main/startup/action.yml
If not, then you'd also have to reflect this argument in the README.
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.
Furthermore this would have to be added in the main action: https://github.com/localstack/setup-localstack/blob/main/action.yml#L138
configuration="${{ inputs.ephemeral-configuration }}" | ||
echo "Creating preview environment with configuration: $configuration" | ||
# Convert configuration to JSON format | ||
IFS=',' read -r -a configArray <<< "$configuration" | ||
envVarsJson=$(jq -n '{}') | ||
for config in "${configArray[@]}"; do | ||
IFS='=' read -r -a kv <<< "$config" | ||
key=${kv[0]// /} | ||
value=${kv[1]// /} | ||
envVarsJson=$(echo $envVarsJson | jq --arg key "$key" --arg value "$value" '. + {($key): $value}') | ||
done | ||
echo "Configuration JSON: $envVarsJson" | ||
|
||
envVarsJson=$(echo $envVarsJson | jq --arg autoLoadPod "$autoLoadPod" --arg extensionAutoInstall "$extensionAutoInstall" '. + {AUTO_LOAD_POD: $autoLoadPod, EXTENSION_AUTO_INSTALL: $extensionAutoInstall}') |
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.
this is oddly convoluted, is there a way we could improve readability and maintenance?
No description provided.