-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: correct example in documentation #935
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.
arrow_up Do I need to update the changelog for a change this small?
i would say it's OK not to have a changelog for this
@@ -133,7 +133,7 @@ var ( | |||
ArgsUsage: "addon-id", | |||
Description: CommandDescription{ | |||
Description: "Display information about an add-on attached to your app", | |||
Examples: []string{"scalingo --app my-app addons-info mongodb"}, | |||
Examples: []string{"scalingo --app my-app addons-info addon_uuid"}, |
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 would actually prefer if we could make the previous example work. We developed a fix for this use case for the logs
command, we could do the same for the addons-info
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.
In addition, we always give example names, like my-app
instead of app-name
.
This is already specified in the ArgsUsage
that it is the addon-id that is expected.
If we want to change what we put for the addon id in the examples, we have to change it as well for every example in addon-ids.
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.
We developed a fix for this use case for the logs command, we could do the same for the addons-info
logs
is taking a --addon
params, it's not the case here (it's what I'm proposing also).
I tried a to duplicate the logs
behavior for the addons-info
but didn't succesed, and I don't have the time currently to do it.
I would be in favor of accepting this PR, and wrote an issue to improve this command, in order to accept a params or a flag and a addon name or uuid.
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 I think you are right. I opened #937.
@yohann-bacha currently both addon_uuid
and addon-uuid
are in use, there is unfortunately no convention. Hence it looks good to me.
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.
@yohann-bacha waiting for your review in order to merge this PR :)
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.
@EtienneM My point was not about using a _
or a -
, this is more a problem of consistency.
Currently for every example in addons.go
, we are giving real names for addons. As mongodb
, and not addon-id
, neither addon_uuid
.
If we use now addon_uuid
this is fine, but we shall do this everywhere at least in the addons.go
file.
The following point is not blocking, but I think examples should be real world commands that you can copy paste and use them. What we need as args must be in the ArgsUsage (they are already there), the examples should not be another ArgsUsage.
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.
As mongodb, and not addon-id, neither addon_uuid.
I think you miss-understood something, mongodb is not an id or uuid it's a addon name. Here the user need to use a value that looks like this 23w2e3rjwefsdjl;fgnlsdnfgnsdgn23
(yes I put my head on the keyboard), so I don't think we should give a "real" example.
Could you Add a suggestion to this PR if I didn't understood what's you're proposing?
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.
You are absolutely right, then in that case, in examples where an addon-id is required, there should always be addon_uuid
then. Line 107, 77...
And for the addon-add command, the argusage is wrong : it is not the addon-id we are waiting for, but the addon name
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.
You are absolutely right, then in that case, in examples where an addon-id is required, there should always be addon_uuid then. Line 107, 77...
And for the addon-add command, the argusage is wrong : it is not the addon-id we are waiting for, but the addon name
Indeed it seems there are other errors in this file :/
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.
@yohann-bacha Thanks for the update!
@EtienneM can you review the new commit?
@@ -133,7 +133,7 @@ var ( | |||
ArgsUsage: "addon-id", | |||
Description: CommandDescription{ | |||
Description: "Display information about an add-on attached to your app", | |||
Examples: []string{"scalingo --app my-app addons-info mongodb"}, | |||
Examples: []string{"scalingo --app my-app addons-info addon_uuid"}, |
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.
In addition, we always give example names, like my-app
instead of app-name
.
This is already specified in the ArgsUsage
that it is the addon-id that is expected.
If we want to change what we put for the addon id in the examples, we have to change it as well for every example in addon-ids.
@@ -133,7 +133,7 @@ var ( | |||
ArgsUsage: "addon-id", | |||
Description: CommandDescription{ | |||
Description: "Display information about an add-on attached to your app", | |||
Examples: []string{"scalingo --app my-app addons-info mongodb"}, | |||
Examples: []string{"scalingo --app my-app addons-info addon_uuid"}, |
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 I think you are right. I opened #937.
@yohann-bacha currently both addon_uuid
and addon-uuid
are in use, there is unfortunately no convention. Hence it looks good to me.
⬆️ Do I need to update the changelog for a change this small?
Also I'm wondering if this command shouldn't use the
--addon
params like other command?