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

updates: Make it easier to bump the local pallet to the latest release or branch commit #246

Closed
ethanjli opened this issue Jun 13, 2024 · 0 comments · Fixed by #266
Closed
Assignees
Labels
enhancement New feature or request

Comments

@ethanjli
Copy link
Member

ethanjli commented Jun 13, 2024

Currently, in order to bump the local pallet from a release-tagged commit to a newer release tag, either we have to manually mess around with the Git CLI (or some other Git tool) or we have to run the plt switch {pallet path}@{version query} subcommand again with a newer version query. It would be convenient if we could run plt switch @{version query} (with no pallet path) to switch to a different version of the current pallet. If our local pallet is github.com/PlanktoScope/pallet-standard, for example, then we could just run plt switch @stable to stage any available upgrade on the stable release channel (i.e. the stable branch), or plt switch @beta to stage any available upgrade on the beta release channel. And we could just run plt switch @ to stage any available upgrade for the most-recently-used version query; plt upgrade could be an alias for this, though it'd be nice if plt upgrade had a --dry-run option (which might also be nice for plt switch). This would probably involve loading a setting from a config file somewhere (maybe in ~/.config/forklift/pallet-upgrades.yml) about which release channel (i.e. branch) of the pallet the user wants to check for updates from.

  • Each time we call plt switch with a version query it should change the config file's setting to the version query used with plt switch. But we should also have a subcommand (maybe plt set-upgrade-query @{version query}) to change it to a version query other than what was used in the last plt switch invocation. This way, we can run plt switch with a particular version tag when building OS images and then run plt set-upgrade-query to have Forklift track a branch for upgrades starting with the next boot. This way, a user can even configure Forklift to attempt to upgrade to a new tagged version even before the tagged version is published, by running forklift plt set-upgrade-query @{version query for upcoming version}; then subsequent runs of forklift plt upgrade will look for the new tagged version for upgrades.
  • The plt upgrade command should return an error if there are any uncommitted changes, unless a --force flag is enabled; the behavior should be the same as for plt switch, including with whatever happens in ui: plt switch/rm should only delete unsaved changes on a local pallet with user confirmation #229.
  • plt upgrade should fetch all remote branches and tags, if there is internet, before deleting the local pallet and checking out a commit.
  • It would be great if plt upgrade could show the upgrade to be performed (e.g. the planned change in (pseudo)version string), and if we could query that without performing the upgrade using a plt show-upgrade command.

This way, a simple scheduled automatic update system could be implemented by just running forklift plt upgrade in a timer. We could also make a system service to run forklift plt fetch whenever we get internet access and/or in a timer - e.g. we can create a file whenever we get internet access or on a daily schedule, and when that file exists then another timer polling the file will run forklift plt check-upgrade && forklift plt upgrade and delete the file. Support for background downloading of upgrades (and all their staging requirements) is covered in #254 rather than this issue.

@ethanjli ethanjli added the enhancement New feature or request label Jun 13, 2024
@ethanjli ethanjli self-assigned this Jun 14, 2024
@ethanjli ethanjli added this to the Preprint milestone Jun 14, 2024
@ethanjli ethanjli moved this to 🔖 Ready in PlanktoScope Software Jun 14, 2024
@ethanjli ethanjli changed the title Make it easier to bump the local pallet to the latest release or branch commit ui: Make it easier to bump the local pallet to the latest release or branch commit Jun 14, 2024
@ethanjli ethanjli changed the title ui: Make it easier to bump the local pallet to the latest release or branch commit updates: Make it easier to bump the local pallet to the latest release or branch commit Jun 14, 2024
@ethanjli ethanjli moved this from 🔖 Ready to 🏗 In progress in PlanktoScope Software Jul 4, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in PlanktoScope Software Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant