-
Notifications
You must be signed in to change notification settings - Fork 62
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
Check that version is not the same #727
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
16f74cc
Check whether old and new version are the same
juliasilge 19ef8d9
Use devel testthat
juliasilge c5b0baa
Refine error message
juliasilge 5f8a138
Move test to be with other versioning tests
juliasilge fd7b462
Fix DESCRIPTION
juliasilge 94f9780
Merged origin/main into error-for-same-version
juliasilge 20cb896
Use some `Sys.sleep()` in vignettes to make new timestamps/versions
juliasilge 8e88b4d
Merge from main
juliasilge 52044c9
Add needed Sys.sleep() and remove not needed ones
juliasilge e9c7b26
Update error message, pass call
juliasilge b6a536a
Write different content so hash changes here
juliasilge 83232e2
Change content of pin to change hash
juliasilge 0a431bc
Merged origin/main into error-for-same-version
juliasilge b42f803
Update NEWS
juliasilge 73e0f4d
Return NULL for same versions, and don't store
juliasilge 846e479
Revert "Return NULL for same versions, and don't store"
juliasilge cb0a17e
Update NEWS again (messed up revert)
juliasilge 8975435
Oh my gosh :see_no_evil:
juliasilge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
I wonder if it might be better to tackle this by thinking more about the data hash — maybe here it's fine to just return the existing version since we know it's the same?
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.
I definitely agree that how we make a version/hash could use some rework. I believe, though, if we do make some improvement in how we generate a data hash, we would still end up with this same problem. If you try to store a pin but the data hash hasn't changed and the timestamp hasn't changed, then we try to write to the same file in the local cache and end up with those "[EACCES] Failed to copy" errors. I don't believe making improvements to the data hashing strategy will solve this.
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.
If it's the same data, and less than a second has elapsed, why not just return a path to the existing pin?
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.
Let me know if I am not understanding what you are getting at, but that's basically the current situation that is leading to confusing errors;
version_setup()
returns a version/path to an existing pin but since the file is read only, it can't be overwritten and we get the "[EACCES] Failed to copy" errors with the long paths in them which folks find hard to interpret. Those errors are cropping up whenversion_setup()
is called from thepin_store
method (this really just applies toboard_folder()
since anything with a remote server can't respond that fast).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.
Right, so why try to overwrite that file?