Skip to content
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

Fix: Graph deleted before aptly exits #1214

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

reglim
Copy link
Contributor

@reglim reglim commented Sep 13, 2023

Fixes: #1213

Requirements

All new code should be covered with tests, documentation should be updated. CI should pass.

Description of the Change

The temporary output file is now only deleted after copying it to the output location.
We no longer wait 1s for the open command, but exit immediately, since the process will continue running even after aptly exits.

Why this change is important?

Because the assumption was made that any application that opened the image would continue displaying it, even if the image was removed right after, which isn't true for the Gnome Image Viewer.

Checklist

  • unit-test added (if change is algorithm)
  • functional test added/updated (if change is functional)
  • man page updated (if applicable)
  • bash completion updated (if applicable)
  • documentation updated
  • author name in AUTHORS

@reglim reglim force-pushed the fix/1213-aptly-graph-removed-before-exiting branch 6 times, most recently from 8655777 to 7192f1e Compare September 15, 2023 07:07
@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (f1649a6) 74.85% compared to head (7192f1e) 66.64%.
Report is 4 commits behind head on master.

❗ Current head 7192f1e differs from pull request most recent head 2ee09ab. Consider uploading reports for the commit 2ee09ab to get more accurate results

Files Patch % Lines
cmd/graph.go 18.18% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1214      +/-   ##
==========================================
- Coverage   74.85%   66.64%   -8.22%     
==========================================
  Files         143      143              
  Lines       16187    16184       -3     
==========================================
- Hits        12117    10786    -1331     
- Misses       3134     4630    +1496     
+ Partials      936      768     -168     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The temporary output file is now only deleted after copying it to the output location.

Fixes: #1213
@reglim reglim force-pushed the fix/1213-aptly-graph-removed-before-exiting branch from 7192f1e to 486e864 Compare December 13, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aptly graph image is removed immediately after rendering
2 participants