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 track field to AdditionalEnvFile configuration:
When track: true (default): Komodo manages the file
When track: false: File is only passed to docker compose via --env-file, no UI management
Notes
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
✅ Backward compatibility: Old string format configs load correctly
✅ New format: Track option works as expected in UI
✅ Untracked files: Not included in all_file_paths() or all_file_dependencies()
✅ Docker compose: All files (tracked + untracked) passed via --env-file
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/moghtech/komodo/pull/955
**Author:** [@ChanningHe](https://github.com/ChanningHe)
**Created:** 11/3/2025
**Status:** ✅ Merged
**Merged:** 11/11/2025
**Merged by:** [@mbecker20](https://github.com/mbecker20)
**Base:** `2.0.0` ← **Head:** `additional-env-files-track-option`
---
### 📝 Commits (1)
- [`e44828a`](https://github.com/moghtech/komodo/commit/e44828aba7c3fe8b64e5ccc7f9d729ce21918663) Add track option for Additional Env Files
### 📊 Changes
**6 files changed** (+6950 additions, -6915 deletions)
<details>
<summary>View changed files</summary>
📝 `bin/periphery/src/api/compose/helpers.rs` (+9 -12)
📝 `bin/periphery/src/api/compose/mod.rs` (+1 -1)
📝 `client/core/rs/src/entities/stack.rs` (+97 -13)
📝 `client/core/ts/src/types.ts` (+17 -1)
📝 `frontend/public/client/types.d.ts` (+6744 -6875)
📝 `frontend/src/components/resources/stack/config.tsx` (+82 -13)
</details>
### 📄 Description
## 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 `track` field to `AdditionalEnvFile` configuration:
- When `track: true` (default): Komodo manages the file
- When `track: false`: File is only passed to docker compose via `--env-file`, no UI management
## Notes
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
- ✅ Backward compatibility: Old string format configs load correctly
- ✅ New format: Track option works as expected in UI
- ✅ Untracked files: Not included in `all_file_paths()` or `all_file_dependencies()`
- ✅ Docker compose: All files (tracked + untracked) passed via `--env-file`
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/moghtech/komodo/pull/955
Author: @ChanningHe
Created: 11/3/2025
Status: ✅ Merged
Merged: 11/11/2025
Merged by: @mbecker20
Base:
2.0.0← Head:additional-env-files-track-option📝 Commits (1)
e44828aAdd track option for Additional Env Files📊 Changes
6 files changed (+6950 additions, -6915 deletions)
View changed files
📝
bin/periphery/src/api/compose/helpers.rs(+9 -12)📝
bin/periphery/src/api/compose/mod.rs(+1 -1)📝
client/core/rs/src/entities/stack.rs(+97 -13)📝
client/core/ts/src/types.ts(+17 -1)📝
frontend/public/client/types.d.ts(+6744 -6875)📝
frontend/src/components/resources/stack/config.tsx(+82 -13)📄 Description
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🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.