-
Notifications
You must be signed in to change notification settings - Fork 367
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: add warning for unsupported keepAcl param in file#copy #841
Merged
JustinBeckwith
merged 8 commits into
googleapis:master
from
AVaksman:add_warning_for_unsupported_param
Sep 17, 2019
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
85dc796
Revert "fix: remove unsupported keepAcl param (#837)"
AVaksman 332a0e8
chore: add warning for unsupported keepAcl param in file#copy
AVaksman 16dfbc7
refactor: lint
AVaksman 0a3e817
Merge branch 'master' into add_warning_for_unsupported_param
bcoe a475306
Merge branch 'master' into add_warning_for_unsupported_param
AVaksman bc0ed47
refactor: switch to process.emitWarning once per process
AVaksman 542c396
lint: lint
AVaksman ad6b919
Merge branch 'master' into add_warning_for_unsupported_param
AVaksman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is scary to me, because we've always considered our chance to communicate dev-only messages is pre-installation via the changelog, but not at runtime. That could potentially interrupt their users, since we are commonly a base layer in more complex applications.
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.
cc @bcoe @callmehiphop for thoughts!
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 might be misremembering, but I seem to recall using the console to warn users about deprecated methods in the auth client as well (paging @JustinBeckwith). I'm ok with this, but think we should take a hard stance of how we communicate this kind of change across the board.
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've been known to use this approach in yargs:
https://github.com/yargs/yargs/blob/5d7ad989a851398587a0349cdd15344769b4cd79/yargs.js#L1035
And haven't received many complaints; my general thinking has been.
Buffer
, so the community is accustomed to it.In this case, my gut was that only a small percentage of folks would be explicitly setting
keepAcl
so it's probably fairly low impact.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 have opinions here!
https://github.com/googleapis/google-auth-library-nodejs/blob/master/src/messages.ts
A few thoughts:
process.emitWarning
instead ofconsole.warn
as it plays nicely with the cmd flags of nodejs. You can learn more here: https://medium.com/@jasnell/introducing-process-warnings-in-node-v6-3096700537eeAs with all things, final say here is deferred to @bcoe
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.
Seems like the right move is to switch to
process.emitWarning
👍 and let's land this.For this specific case, I don't have a strong opinion about including an error code; seems smart in the case of an HTTP response or a file operation going off the rails, but not quite sure what a good option would be for this.
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.
Done, thanks
@JustinBeckwith could I trouble you to look over the switch to
process.emitWarning
once per process (last commit).