-
Notifications
You must be signed in to change notification settings - Fork 1.3k
snap: v0: build fixes & updates #3999
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7ca7ba6
snap: drop sudo
casperdcl 52ce849
snap: ci: fix builds
casperdcl c2cd34b
snap: ci: developer notifications
casperdcl f7dfa67
snap: minimise size
casperdcl dc0e446
debug commit
casperdcl 26eec9c
Revert "snap: minimise size"
casperdcl e87587b
fix image info
casperdcl d7a6145
Revert "debug commit"
casperdcl 4a8f8fb
snap: v1 channels
casperdcl b613a42
snap: v0 channels
casperdcl 699572d
snap: auto-version (major) detect
casperdcl 439ae84
ci: fetch --tags explanation & error checking
casperdcl a5636e1
snap: update warning framework
casperdcl a50871b
hardocde warning
casperdcl c7f1bce
add deprecation dev comment
casperdcl 2a74d6c
remove warning on explicit v0 channel
casperdcl 761c0c6
tidy comment
casperdcl 3da3319
fix py2
casperdcl 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 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,14 @@ if [ ! -d "dvc" ]; then | |
| exit 1 | ||
| fi | ||
|
|
||
| sudo snapcraft --use-lxd | ||
| sg lxd -c snapcraft | ||
| original_snap_name="$(ls dvc_*.snap)" | ||
| mv "$original_snap_name" original.snap | ||
|
|
||
| git apply scripts/remove_update_warning.patch | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will make
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes; I don't think that's an issue. |
||
| sg lxd -c snapcraft | ||
| mv dvc_*.snap nowarn_update_"$original_snap_name".snap | ||
| mv original.snap "$original_snap_name" | ||
|
|
||
| pip uninstall -y dvc | ||
| if which dvc; then | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| diff --git a/dvc/updater.py b/dvc/updater.py | ||
| index d6dc372..cfa416f 100644 | ||
| --- a/dvc/updater.py | ||
| +++ b/dvc/updater.py | ||
| @@ -48,15 +48,7 @@ class Updater(object): # pragma: no cover | ||
| logger.debug(msg.format(self.lock.lockfile, action)) | ||
|
|
||
| def check(self): | ||
| - if os.getenv("CI") or env2bool("DVC_TEST"): | ||
| - return | ||
| - | ||
| - if PKG == "snap": | ||
| - # hardcoded transition message | ||
| - version_major = version.parse(self.current).major | ||
| - self.current = "v{}".format(version_major) | ||
| - self.latest = "v{}".format(version_major + 1) | ||
| - self._notify() | ||
| + if os.getenv("CI") or env2bool("DVC_TEST") or PKG == "snap": | ||
| return | ||
|
|
||
| self._with_lock(self._check, "checking") | ||
| @@ -146,17 +138,6 @@ class Updater(object): # pragma: no cover | ||
| ), | ||
| "conda": "Run `{yellow}conda{reset} update dvc`", | ||
| "choco": "Run `{yellow}choco{reset} upgrade dvc`", | ||
| - "snap": ( | ||
| - "To upgrade to the latest major release,\n" | ||
| - "run `{yellow}snap{reset} refresh --channel=latest/beta`, or\n" | ||
| - "to stay on the current major release track,\n" | ||
| - "run `{yellow}snap{reset} refresh --channel={current}/stable`" | ||
| - "\n\n" | ||
| - "{red}WARNING{reset}: ignoring this message will result in\n" | ||
| - "snap automatically performing an upgrade soon.\n" | ||
| - "More information can be found at\n" | ||
| - "{blue}https://github.com/iterative/dvc/issues/3872{reset}" | ||
| - ), | ||
| None: ( | ||
| "Find the latest release at\n" | ||
| "{blue}https://github.com/iterative/dvc/releases/latest{reset}" | ||
| diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml | ||
| index 75d0f7d..996db8c 100644 | ||
| --- a/snap/snapcraft.yaml | ||
| +++ b/snap/snapcraft.yaml | ||
| @@ -30,7 +30,6 @@ parts: | ||
| override-pull: | | ||
| snapcraftctl pull | ||
| snapcraftctl set-version $(cd $SNAPCRAFT_PART_SRC && git describe --tags) | ||
| - git diff --quiet || error_dirty_build | ||
| echo 'PKG = "snap"' > $SNAPCRAFT_PART_SRC/dvc/utils/build.py | ||
| # install all optional extras | ||
| sed -ri 's/(=install_requires)/\1+all_remotes+hdfs/' $SNAPCRAFT_PART_SRC/setup.py |
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Ideally need a dvc.org link to migration/breaking changes.
https://dvc.org/doc/install/pre-release is currently not quite appropriate.