-
Notifications
You must be signed in to change notification settings - Fork 232
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
No longer require hooks/extensions must be added to overlays #865
base: main
Are you sure you want to change the base?
Conversation
priv/templates/extended_bin
Outdated
@@ -188,7 +189,7 @@ Commands: | |||
versions Print versions of the release available | |||
escript Run an escript in the same environment as the release | |||
status Verify node is running and then run status hook scripts | |||
$EXTENSIONS" | |||
$EXTENSION_DESCRIPTIONS" |
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.
@Vagabond kindly offered to help out here with his shell-fu
9630ed1
to
e3f6fb8
Compare
No longer demand that developers add a hook/extension and also correctly configure the required overlay copy instructions as this now gets automatically added. Start script extensions now also support descriptions. Extensions: previous: {extended_start_script_extensions, [ {bar, "extensions/bar"}, {foo, "extensions/foo"}, {baz, "extensions/baz"}]}, {overlay, [ {copy, "./bar", "bin/extensions/bar"}, {copy, "./foo", "bin/extensions/foo"}, {copy, "./baz", "bin/extensions/baz"}]} after: {extended_start_script_extensions, [ % auto copied over to `bin/extensions/bar` with empty description {bar, "./bar"}, % auto copied over to `bin/extensions/foo` with description `"foo description"` {foo, "./foo", "foo description"}, % auto copied over to `bin/extensions/baz` with description `"baz description"` {baz, "./baz", "bin/extensions/baz", "baz description"} ]} Hooks: previous: {extended_start_script_hooks, [ {pre_start, [ {custom, "hooks/pre_start"} ]}, {post_start, [ wait_for_vm_start, {pid, "foo.pid"}, wait_for_vm_start, {custom, "hooks/post_start"} ]}, {pre_stop, [ {custom, "hooks/pre_stop"} ]}, {post_stop, [ {custom, "hooks/post_stop"} ]}, {status, [ {custom, "hooks/status"} ]} ]}, {overlay, [ {copy, "./hooks/status", "bin/hooks/status"}, {copy, "./hooks/{pre,post}_{start,stop}", "bin/hooks/"} ]} after: {extended_start_script_hooks, [ {pre_start, [ % auto copied over to `bin/hooks/pre_start` {custom, "hooks/pre_start"} ]}, {post_start, [ wait_for_vm_start, {pid, "foo.pid"}, wait_for_vm_start, {custom, "hooks/post_start"}, % auto copied over to `bin/hooks/extra/post_start` {custom, "hooks/post_start2", "bin/hooks/extra/post_start"} ]}, {pre_stop, [ {custom, "hooks/pre_stop"} ]}, {post_stop, [ {custom, "hooks/post_stop"} ]}, {status, [ {custom, "hooks/status"} ]} ]}
e3f6fb8
to
889c966
Compare
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.
Does this change break anything? Will people's old scripts stop working? If not, we should keep the old format for shelltests. If it breaks, we gotta figure out a release strategy for that
It does break extension scripts, previously you said: I think the breakage is worth it as it:
To ease the migration we can error out when unable to find the source script, update the doc and link it in the error |
Maybe. The thing is I have a hard time with breakage since we just went to 4.0.0, and now we'd bump to 5.0.0 right away. I get it's worth it, but it's forcing more breakage into how everyone is building releases. Would it make sense to name the options I'm hoping to avoid the case where someone had all their releases broken when upgrading the last rebar3 point version, and gets to break them all over again on the next point version, but maybe this is too narrow of a concern and not that many people use extensions anyway? |
yeah, that's what i'm thinking, the few people that do use them will probably be ok and won't mind the change as it makes using them generally easier. We can go with the keep retro-compat route, however cruft will pile on and in the long run things will just get harder to reason |
Yeah. I mean I'm okay with removing cruft, I think part of the challenge of maintaining this stuff is in how many edge cases we create. I'm fine with forcing the breaking change if typical users are good with it, I'd say, and there aren't too many of them. This might be a good candidate for it. |
There's no big rush with this as it's an improvement over existing functionality, we can wait and see what people have to say |
Don't think we can have breakage like this. Any way to support both? |
Suppose we can keep the previous
|
Assuming there's breakage, are the required changes documented somewhere? |
@lrascao, the links are broken. They point to https://github.com/erlware/relx/pull/here. Edit: in any case I'll check rebar3.org, thanks. |
Yeah I'd feel better if we just add the new format at some point I guess. Prevents breakage at least. |
roger, i'll keep old tests and expand them with this new format then |
gonna push forward with this format, hopefully this week i can squeeze this in |
@lrascao any update? I'm going to make a release soon, this will probably be bumped to the next release unless you are close? |
damn, I forgot all about this, better not block this release |
Ok, will do. |
oops, didnt meAn to close, thought github knew to switch the target... |
Ah, I was supposed to rename the default branch and not switch the default... well this is going to be a pain. |
This is a breaking change in the relx configuration section, the change is small and i think the gain outweighs the hassle.
No longer demand that developers add a hook/extension and also
correctly configure the required overlay copy instructions as this
now gets automatically added. Start script extensions now also
support descriptions.
Extensions:
previous:
Hooks:
previous: