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
Allow to link back to another label for continuation of push #1193
base: push-instead-bud
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.
This looks great overall 👍
PostgresServerNexus::update_superuser_password also has retval check (which is added after this PR) |
When we bud a prog, we need to implement an additional label to wait it. However, when we bud a single prog, we can achieve the same functionality with pushing. Budding has the power to run multiple concurrent progs.
325e871
to
ff70d19
Compare
We use a custom rspec matcher to verify hop events. In certain tests, it's necessary to examine the details of the hop exception. Therefore, we've made a change to pass the hop exception to the rspec helper, enabling us to check the exception details within the rspec matcher.
d440eef
to
97576c6
Compare
Pushing is becoming popular these days. If you're budding a single prog and don't require concurrency, push is a better option than bud. At present, its usage pattern is complex. You need to check the retval of push in the same label you pushed, then move to the next label. However, we can simplify this by allowing a link back to another label for the continuation of push. This way, the pushed program returns the next label instead of the previous one.
97576c6
to
7b51464
Compare
@@ -29,6 +27,10 @@ def user | |||
echo #{sshable.keys.map(&:public_key).join("\n").shellescape} | sudo tee /home/rhizome/.ssh/authorized_keys > /dev/null | |||
SH | |||
|
|||
push Prog::InstallRhizome, {"target_folder" => frame["target_folder"]} | |||
push Prog::InstallRhizome, {"target_folder" => frame["target_folder"]}, next_label: "finish" |
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.
Wew it's slightly brutal how many strings are in "push", and that we don't have a nice way to avoid free-handing errors in next_label or a way to check them on file load. But, that's for another day. Maybe let's pencil in these renovations for the next quarter. It's one of those sub-legible tasks that's easy to forget. Just planting the seed of a thought here.
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 created a issue for it #1293
Budding and pushing with metaprogramming might be interesting
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.
can next_label be required? maybe the old retval form has no virtues and should be eliminated.
If the prog runs and returns some values, it could be helpful. Of course, we might be able to find an alternative solution. ubicloud/prog/download_boot_image.rb Line 52 in 7b51464
|
Can't the continuation also look at |
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.
Just my question on retval/continuation/etc, leaving this review so it clears my query
ff70d19
to
64cb193
Compare
64cb193
to
a6c6e5f
Compare
Pass hop exception to the custom rspec matcher
We use a custom rspec matcher to verify hop events. In certain tests,
it's necessary to examine the details of the hop exception. Therefore,
we've made a change to pass the hop exception to the rspec helper,
enabling us to check the exception details within the rspec matcher.
Allow to link back to another label for continuation of push
Pushing is becoming popular these days. If you're budding a single prog
and don't require concurrency, push is a better option than bud.
At present, its usage pattern is complex. You need to check the retval
of push in the same label you pushed, then move to the next label.
However, we can simplify this by allowing a link back to another label
for the continuation of push. This way, the pushed program returns the
next label instead of the previous one.
Fixes #1187