-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: add dry-run flag for config profile apply command #5455
Conversation
(basically, gx has a lot of rough edges we're working on ironing out). |
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.
Looking good but we'll definitely need some sharness tests. You'll probably want to add them to test/sharness/t0021-config.sh
.
@Stebalien Thanks for your guidance. I find that /elgris/jsondiff doesn't support unmarshal. Should I write a new jsondiff lib to support this feat? |
Hm. I see. Well, we have two options:
That is, send back |
@Stebalien Thx. The second method looks great and I use it. Could you help me review my code again? |
@schomatis in an effort to "spread the love", I'm assigning you to review 😄. |
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.
Feeling the love 😬
hey, @schomatis . I have completed modifications according to your advice. Could you help me review my code again? 😊 |
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.
Niiiiiicee, this is definitely much cleaner, thanks for taking the time to make those changes.
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.
Great, thanks!
@Stebalien Is there any other work that needs to be done? If so, please tell 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.
Hard blocking the PR.
We changed other config commands to stop exposing Identity.PrivKey
over HTTP API for security reasons. This command will also need to do that.
@Kubuxu Could you expand some more on that please? How is this PR impacting security? |
In the past we hardened config endpoints not to return This would reintroduce this risk. |
Oh, I see, the newly added diff output could expose sensitive information, makes sense, thanks. |
This is a good suggestion. Thx a lot. I have updated the pr to stop exposing |
Thanks for resolving it quickly. |
This fixes the data-race in the config. Depends on: ipfs/go-ipfs-config#16. This does not fix #4942 as there's still a logical race: parallel config updates clobber each other. However, we'll still need the Clone function for the new `--dry-run` flag introduced in #5455. License: MIT Signed-off-by: Steven Allen <[email protected]>
Blocked on #5455, unfortunately. |
(that is, the dereference isn't sufficient to actually clone the config). |
Maybe dereference is sufficient. Because |
I see. Yeah, this should work... (well, shouldn't be any worse than it already is). |
License: MIT Signed-off-by: chenminjian <[email protected]>
License: MIT Signed-off-by: chenminjian <[email protected]>
Hey, @Stebalien . Thx for your review. If you need a better jsondiff lib in the future, ping me please. I am sure I will do this well. |
Issue: #4914
License: MIT
Signed-off-by: chenminjian [email protected]