-
Notifications
You must be signed in to change notification settings - Fork 424
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
chore: Interpolate slice of strings
in the manifest
#4993
Conversation
🍕 Here are the new binary sizes!
|
Codecov Report
@@ Coverage Diff @@
## mainline #4993 +/- ##
============================================
+ Coverage 70.15% 70.36% +0.20%
============================================
Files 289 290 +1
Lines 41797 42446 +649
Branches 285 285
============================================
+ Hits 29324 29868 +544
- Misses 11060 11157 +97
- Partials 1413 1421 +8
|
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.
We might need to think about more scenarios: right now it works for both string and list. However, it won't work for something like
image:
build: api/Dockerfile
port: 8080
healthcheck: ${HEALTHCHECK}
where
HEALTHCHECK={command: ["CMD-SHELL", "curl -f http://localhost:8080/_healthcheck || exit 1"]}
Maybe instead of doing the unmarshaling and operate in the yaml node level, we could just do string substitution?
This is good option as well. we can just replace all the occurences of the |
Yeah I guess that's true...Open to other thoughts too. |
maybe i'm misunderstanding something....why don't we just interoplate at the copilot-cli/internal/pkg/workspace/workspace.go Lines 350 to 360 in b408b6d
So essentially the flow would be |
After a offline discussion agreed on that we support only # "svc" manifest
${my_manifest} |
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.
Looks good to me overall. Can we update the doc for this as well? Just a callout this seems to only work for "slice of string" instead of general "slice of anything", which seems good to me.
slice
in the manifestslice of strings
in the manifest
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.
slick! Looks good to me.
closes #4928
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.