Repository navigation
[PRODCRE-1483] obs stack fixed location - #2331
Merged
Merged
Conversation
product-security-plaid-production
Bot
requested a review
from gustavogama-cll
December 17, 2025 14:15
|
👋 Tofel, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modifies the observability stack to extract files to a fixed directory in the user's home directory (~/.local/share/ctf) instead of the current working directory, and removes the cleanup of these files on teardown.
Key Changes:
- Observability files are now extracted to
~/.local/share/ctfinstead of the current working directory - Teardown functions no longer delete the extracted observability files
- All observability functions now use the fixed directory path for docker compose operations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
gustavogama-cll
previously approved these changes
Dec 17, 2025
skudasov
approved these changes
Dec 17, 2025
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.
With this change we'd always extract observability files to a fixed location:
~/./local/share/ctfinstead of to the current directory. Why? So that we can executeobs/bscommands in different contexts.Currently, if you run
ctf obs uin one folder, then teardown viactf obs drun in another directly won't work, because Docker compose file will be missing. With the change commands become independent of execution context. Plus they limit the possibility of committing extracted files by mistake, if theupcommand was run in repo, that doesn't have these files in.gitignore.Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes centralize and organize observability resources into a user's home directory, improving file management and accessibility. This standardization simplifies navigating, updating, and maintaining observability components by having a consistent directory structure across different environments.
What
CTFCacheDirrepresenting the directory path.local/share/ctffor storing observability files.getObservabilityDirto construct and return the observability directory path based on the user's home directory.extractAllFilesfunction to extract files into the observability directory instead of the current directory.BlockScoutUp,BlockScoutDown,ObservabilityUpOnlyLoki,ObservabilityUp, andObservabilityUpFullfunctions to use the observability directory for operations.ObservabilityDownfunction to remove resources from the new observability directory structure.