-
Notifications
You must be signed in to change notification settings - Fork 8.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
[dev-utils/run] expose unexpected flags as more than just names #54080
Merged
Conversation
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
spalger
force-pushed
the
fix/dev-run-unexpected-argv
branch
3 times, most recently
from
January 7, 2020 01:44
336a274
to
6d0569d
Compare
spalger
force-pushed
the
fix/dev-run-unexpected-argv
branch
from
January 7, 2020 01:46
6d0569d
to
1639dc4
Compare
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
spalger
added
release_note:skip
Skip the PR/issue when compiling release notes
Team:Operations
Team label for Operations Team
v7.6.0
v8.0.0
labels
Jan 7, 2020
Pinging @elastic/kibana-operations (Team:Operations) |
mistic
approved these changes
Jan 7, 2020
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.
That LGTM. I also agree with the design choices made here!
7.x/7.6: 8f8d083 |
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jan 8, 2020
* master: (55 commits) [ui/public/utils] Copy rarely used items to where they are consumed (elastic#53819) set AppArch team as an owner of the search endpoints (elastic#54131) Don't expose Elasticsearch client as Observable (elastic#53824) [SIEM] Cleanup unnecessary use of enzyme-to-json (elastic#53980) fix ui exports doc (elastic#54138) change markdown element title (elastic#54194) [Logs UI] Refactor log position to hooks (elastic#53540) [SIEM] Implement NP Plugin Setup (elastic#54030) [DOCS] Updates ML links (elastic#53613) sort renovate packages in config Spaces - fix flakey api tests (elastic#54154) Remove dependency that was causing effect to re-execute infinitely. (elastic#54160) [dev/run] expose unexpected flags as more than just names (elastic#54080) [DOCS] Moves index pattern doc to Discover (elastic#53347) [SIEM] Cleanup React imports (elastic#53981) Update eslint related packages (elastic#54107) [Uptime] Added date range filter into expanded list query (elastic#52609) [SIEM] Add react/display-name eslint rule (elastic#53107) [SIEM] Enable eslint prefer-template rule (elastic#53983) Elasticsearch snapshots automation (elastic#53706) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
release_note:skip
Skip the PR/issue when compiling release notes
Team:Operations
Team label for Operations Team
v7.6.0
v8.0.0
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.
The
@kbn/dev-utils
run()
helper automatically validates that all passed flags are expected, but when theflags.allowUnexpected
option is set to true then the unexpected flags are passed to the run function asflags.unexpected
. This was designed for the dev cli to use so it could forward the flags to the Kibana server, but was implemented in a somewhat useless way, only forwarding the names of the flags and not their values. Even supplying the parsed values is somewhat useless for our case as we'd have to convert them back into their unparsed representation before passing them to the Kibana server.To fix this I've updated
flags.unexpected
to include the full flag and value from theargv
array with one exception, shortcut flags which are defined as a single flag like-abcd
are "exploded" as-a
,-b
, etc. and only the unexpected ones are passed. (see test case for an example,-x
is expected butz
andy
are not).