-
Notifications
You must be signed in to change notification settings - Fork 63
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
Environment Variables import .env files #2501
Conversation
Implements changes outlined in #2372
For reference: The There is a follow up issue to raise around better sanitisation of env vars in the backend. For example, it is possible via the API to add blank name vars, duplicate vars, invalid named vars. |
Codecov Report
@@ Coverage Diff @@
## main #2501 +/- ##
==========================================
- Coverage 39.94% 39.88% -0.07%
==========================================
Files 489 489
Lines 17133 17198 +65
Branches 3976 3991 +15
==========================================
+ Hits 6844 6859 +15
- Misses 10289 10339 +50
Flags with carried forward coverage won't be shown. Click here to find out more.
|
* Parse .env file data into an object | ||
* NOTES: | ||
* * Variable expansion is not supported | ||
* * Comments are not supported |
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.
Comments are not supported
Is that strictly true? I think the regex on line 308 means it will ignore lines that start with a comment character.
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.
In fairness, it should say comments are not imported / maintained like a regular .env file would be (they are discarded)
Verified I could upload a text file in env format (on Mac). |
Description
As per #2372 (comment):
ff-table
parseDotEnv()
eslint
exception forfrontend/src/pages/admin/Template/sections/Environment.vue
Additional:
Following discussion with @joepavitt
hasErrors
property from frontend/src/pages/instance/Settings/Environment.vueNew tests (frontend unit tests to cover new utility function
dotenv
Demo
env-var-demo.mp4
Related Issue(s)
#2372
Checklist
flowforge.yml
?flowforge/helm
to update ConfigMap Templateflowforge/CloudProject
to update values for Staging/ProductionLabels
backport
labelarea:migration
label