-
Notifications
You must be signed in to change notification settings - Fork 240
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
Problem: testground testcase output artifact not collectiable in k8s workflow #1535
Conversation
…workflow Solution: - create static filename for argo artifact collection
WalkthroughThe recent changes in the Changes
Sequence Diagram(s)sequenceDiagram
participant A as Process
participant B as Temp Storage
participant C as Output Directory
A->>B: Create tarball at /data.tar.bz2
B->>C: Copy tarball to output directory
C-->>A: Confirmation of file copy
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1535 +/- ##
===========================================
- Coverage 36.12% 15.24% -20.89%
===========================================
Files 97 67 -30
Lines 7725 4874 -2851
===========================================
- Hits 2791 743 -2048
+ Misses 4585 4037 -548
+ Partials 349 94 -255 |
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.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- testground/benchmark/benchmark/stateless.py (1 hunks)
Additional comments not posted (1)
testground/benchmark/benchmark/stateless.py (1)
154-156
: Verify the function usage in the codebase.The function signature has been modified. Ensure that all calls to the
run
function are updated to match the new signature.
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.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (1)
testground/benchmark/benchmark/stateless.py (1)
154-154
: Ensure the directory check is necessary.The assertion ensures that
outdir
is a directory. If this check is necessary, consider adding a more descriptive error message for clarity.assert outdir.is_dir(), f"Output directory {outdir} is not a directory."
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- testground/benchmark/benchmark/stateless.py (1 hunks)
Additional comments not posted (2)
testground/benchmark/benchmark/stateless.py (2)
149-151
: Add error handling for file operations.The current implementation does not handle potential errors that might occur during file operations, such as creating or writing to the tarball.
try: with tarfile.open(output, "x:bz2") as tar: tar.add(home, arcname="data") except Exception as e: print(f"Error creating tarball: {e}") return
149-149
: Avoid using hardcoded paths.The use of hardcoded paths like
/data.tar.bz2
can lead to issues in different environments. Consider using a more flexible approach.output = Path(tempfile.gettempdir()) / "data.tar.bz2"
918fede
Solution:
The k8s workflow will have a static path to collect the artifacts:
/data.tar.bz2
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
run
function by removing unnecessary filename generation logic, leading to clearer code structure.