Add track option for Additional Env Files#955
Merged
mbecker20 merged 1 commit intoNov 11, 2025
Conversation
Member
|
Good idea, is it possible for you to rebase the changes onto 2.0.0 branch? |
mbecker20
reviewed
Nov 3, 2025
| /// Check if this file should be tracked by Komodo | ||
| pub fn tracked(&self) -> bool { | ||
| self.track | ||
| } |
mbecker20
reviewed
Nov 3, 2025
| /// Get the file path | ||
| pub fn path(&self) -> &str { | ||
| &self.path | ||
| } |
mbecker20
reviewed
Nov 3, 2025
| .map(|f| f.path()) | ||
| } | ||
|
|
||
| pub fn all_file_paths(&self) -> Vec<String> { |
Member
There was a problem hiding this comment.
rename to all_tracked_file_paths
mbecker20
reviewed
Nov 3, 2025
| write!(res, " --env-file {file}").with_context(|| { | ||
| format!("Failed to write --env-file arg for {file}") | ||
| })?; | ||
| write!(res, " --env-file {}", file.path())?; |
Contributor
Author
There was a problem hiding this comment.
I mistakenly removed the error context while refactoring the function signature. I've restored the .with_context() calls.
Thanks for catching this!
9b86506 to
07a69ce
Compare
07a69ce to
e44828a
Compare
Contributor
Author
|
Rebased onto 2.0.0 (base branch updated). |
mbecker20
approved these changes
Nov 11, 2025
Member
mbecker20
left a comment
There was a problem hiding this comment.
LGTM thanks for the contribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using Additional Env Files with Stack resources, Komodo always attempts to read and validate these files. This causes issues when files don't exist in the repository until deployment time (e.g., files decrypted by SOPS to
/dev/shm/during Pre Deploy).The UI would throw errors trying to read non-existent files, and potentially interfere with git operations.
Solution
Added an optional
trackfield toAdditionalEnvFileconfiguration:track: true(default): Komodo manages the filetrack: false: File is only passed to docker compose via--env-file, no UI managementNotes
I'm not very familiar with Rust, and this codebase has significant complexity. If there are any issues, potential breakages, or better approaches to solve this problem, please let me know - feedback and suggestions are very welcome!
Testing
all_file_paths()orall_file_dependencies()--env-file