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

Workspace should auto-download a new harness version if it has changed in workspace.yml #76

Open
jameshalsall opened this issue Feb 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@jameshalsall
Copy link
Contributor

Currently, if you pull some changes from your repository that include a harness version bump, you have to manually remove the .my127ws harness directory and redownload it with ws harness download (or run ws install).

It would be nice to have workspace check some kind of metafile in the .my127ws directory that contains harness info, like the version number, and compare it to the current version defined in workspace.yml. If it differs, then it should automatically download the new version of the harness.

Workspace could generate this metafile in the .my127ws directory after a harness download.

@jameshalsall jameshalsall added the enhancement New feature or request label Feb 24, 2021
@jameshalsall
Copy link
Contributor Author

As discussed with @dcole-inviqa directly, we should have workspace do something like the following

  1. Check the metafile each time workspace commands are invoked
  2. If the harness version in the metafile matches project workspace.yml then do as normal; otherwise
  3. Prompt the user, with something like "Looks like your downloaded harness version does not match the one defined in workspace.yml, would you like to download the correct version now?"
  4. Fire an event that harnesses can hook into for before-harness-auto-download
  5. Do the harness re-download
  6. Fire another event that harnesses can hook into for after-harness-auto-download

In step 4 and 6, harnesses will be able to cleanly shut down any running environment, and bring it back up as safe as possible without completely destroying it, which would lead to poor DX.

Also, it might be worth making this feature opt-in per harness, as without those event hooks it might cause problems for developers.

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
None yet
Development

No branches or pull requests

1 participant