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

Commit proxy images same (delayed) way as normally uploaded ones #701

Merged
merged 1 commit into from
Apr 25, 2020

Conversation

paskal
Copy link
Collaborator

@paskal paskal commented Apr 24, 2020

Resolves #694.

Behavior before this PR

  • Set EDIT_TIME=20s and IMAGE_PROXY_CACHE_EXTERNAL=true in docker-compose.yml
  • Start dev instance using docker-compose, post comment with text ![](https://homepages.cae.wisc.edu/~ece533/images/cat.png)
  • Restart docker-compose
  • Wait for 2 minutes
  • Reload the page: image from the comment will be re-loaded as it was stuck in Staging without commit and then was deleted after EDIT_TIME*5, 1m40s in this case. And with current logic, we re-load it in case it's not in storage.

Behavior after this PR

  • Set EDIT_TIME=20s and IMAGE_PROXY_CACHE_EXTERNAL=true in docker-compose.yml
  • Start dev instance using docker-compose, post comment with text ![](https://homepages.cae.wisc.edu/~ece533/images/cat.png)
  • Restart docker-compose
  • Wait for 2 minutes
  • Reload the page: the image is still in place and loaded from storage.
    Message in logs:
    Commit image cached_images/da39a3ee5e6b4b0d3255bfef95601890afd80709-da39a3ee5e6b4b0d3255bfef95601890afd80709
    

@github-actions
Copy link

Pull Request Test Coverage Report for Build bc62a84b4-PR-701

  • 9 of 15 (60.0%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.06%) to 83.542%

Changes Missing Coverage Covered Lines Changed/Added Lines %
backend/app/store/image/image.go 8 14 57.14%
Files with Coverage Reduction New Missed Lines %
backend/app/notify/notify.go 2 92.73%
Totals Coverage Status
Change from base Build 5579bd1a8: -0.06%
Covered Lines: 5198
Relevant Lines: 6222

💛 - Coveralls

@paskal paskal force-pushed the proxy_image_commit branch 3 times, most recently from f2e5419 to f93aad6 Compare April 25, 2020 11:10
@umputun umputun merged commit 71dcb13 into master Apr 25, 2020
@umputun umputun deleted the proxy_image_commit branch April 25, 2020 17:15
@paskal paskal added this to the v1.6 milestone Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxified images commited disregarding the edit period
2 participants