-
Couldn't load subscription status.
- Fork 3
Adds pull command #21
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
base: main
Are you sure you want to change the base?
Conversation
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.
Looks great so far!
6565591 to
15bb280
Compare
app/Commands/PullCommand.php
Outdated
| if (empty($selectedRemoteRecipes)) { | ||
| return multiselect( | ||
| label: 'Which recipe(s) should I pull?', | ||
| options: app(MiseService::class)->allForSelect(), |
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.
OK, so there are a few things I have questions about.
How do we handle:
- Recipes that we already have locally and haven't changed
- Recipes that we already have locally and have changed
- Recipes that we have a local one with the same name but it's not 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.
Recipes that we already have locally and haven't changed
Recipes that we already have locally and have changed
Added a check in the flow to validate whether we have selected new, unchanged or updated Recipes, we then prompt the user to either skip-unchanged or overwrite-all
Recipes that we have a local one with the same name but it's not the same
This one is a bit more tricky, currently have leaned that downloaded Recipes live under a chosen namespace, in practice however given the saas app will have a username, perhaps it's best to have downloaded Recipes live at {GithubHandle}\{Namespace}\{Recipes|Steps}
|
|
||
| private function install($key) | ||
| { | ||
| info('Installing recipe: ' . $key); |
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'm never totally sure about best practices here, but is there any value in us shipping a hash of the file contents? I know people do that, but I'm trying to figure out if there's any way that helps us in this context.
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.
Have leaned into a simple sha512 integrity check, the api would return the the integrity check, and then we would also perform a hash check when we download the content/zip file
883c268 to
21d69f3
Compare
|
@gcavanunez ready for another review? |
21d69f3 to
e7a55c5
Compare
|
@gcavanunez Checking in--lmk when this is ready for a review! |
here we're validating agaisnt the mise lock file to verify if changes to versions or if the recipes already live locally
e7a55c5 to
39d1f67
Compare
Changes
PullCommandthat downloads recipes from the Mise webappMiseServicefor API communication with mise.devLocalRecipesServicefor local recipe management with lock file tracking (mise-lock.json)Recipesclass to support recursive loading from local recipe directoriesDemo
mise-pull-demo.mp4
Notes
We may want to hold off on this guy until we get the saas app uup and running.