-
Notifications
You must be signed in to change notification settings - Fork 426
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
Allow interactive px
cli usage to prompt and save preferred cloud in pixie config file
#1964
Merged
ddelnano
merged 1 commit into
pixie-io:main
from
ddelnano:ddelnano/add-cloud_addr-to-pixie-config-file
Jul 16, 2024
Merged
Allow interactive px
cli usage to prompt and save preferred cloud in pixie config file
#1964
ddelnano
merged 1 commit into
pixie-io:main
from
ddelnano:ddelnano/add-cloud_addr-to-pixie-config-file
Jul 16, 2024
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
ddelnano
changed the title
Allow interactive
Allow interactive Jul 10, 2024
px
cli usage to prompt for saving preferred cloud in pixie config filepx
cli usage to prompt and save preferred cloud in pixie config file
pixie config file Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano
force-pushed
the
ddelnano/add-cloud_addr-to-pixie-config-file
branch
from
July 10, 2024 17:01
915e759
to
37612a4
Compare
vihangm
approved these changes
Jul 16, 2024
ddelnano
added a commit
to ddelnano/pixie
that referenced
this pull request
Aug 23, 2024
… cloud in pixie config file (pixie-io#1964)" This reverts commit 1d41f9b.
ddelnano
added a commit
to ddelnano/pixie
that referenced
this pull request
Aug 23, 2024
… cloud in pixie config file (pixie-io#1964)" This reverts commit 1d41f9b. Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
aimichelle
pushed a commit
that referenced
this pull request
Aug 23, 2024
…ile (#1964) (#1990) Summary: Revert change for interactive prompt to store cloud to pixie config file (#1964) We've received feedback from users that is confusing to no longer have a default cloud for the pixie cli. We will be restoring the previous behavior in a follow up PR. With that new direction in mind, it no longer makes sense to have the functionality added in #1964. Relevant Issues: N/A Type of change: /kind cleanup Test Plan: None since this was a `git revert` Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano
added a commit
to ddelnano/pixie
that referenced
this pull request
Sep 23, 2024
…n pixie config file (pixie-io#1964) Summary: Allow interactive px cli usage to prompt and save preferred cloud in pixie config file This is a continuation of the plan I outlined in pixie-io#1960 now that cloud addr is required for the `px` cli. Relevant Issues: N/A Type of change: /kind feature Test Plan: Verified the following scenarios. I will make sure to update the PX cli release checklist accordingly if/when approved <details><summary>Default cloud selection testing</summary> - [x] Running `px` command that requires cloud prompts for selection and whether to store it ``` $ ./px auth login Pixie CLI ✔ withpixie.ai:443 ✔ No <------ Cloud selection was opted out of Starting browser... (if browser-based login fails, try running `px auth login --manual` for headless login) Fetching refresh token ... Failed to perform browser based auth. Will try manual auth error=browser failed to open Please Visit: https://work.withpixie.ai:443/login?local_mode=true Copy and paste token here: ^C ``` - [x] Cli commands following storing preferred cloud use the preferred value ``` $ ./px auth login Pixie CLI ✔ withpixie.ai:443 ✔ Yes <------ Cloud selection was opted into saving Starting browser... (if browser-based login fails, try running `px auth login --manual` for headless login) Fetching refresh token ... Failed to perform browser based auth. Will try manual auth error=browser failed to open Please Visit: https://work.withpixie.ai:443/login?local_mode=true Copy and paste token here: ^C $ ./px auth login Pixie CLI Starting browser... (if browser-based login fails, try running `px auth login --manual` for headless login) Fetching refresh token ... Failed to perform browser based auth. Will try manual auth error=browser failed to open Please Visit: https://work.withpixie.ai:443/login?local_mode=true Copy and paste token here: ^C $ cat ~/.pixie/config.json {"uniqueClientID":"XXX","cloudAddr":"withpixie.ai:443"} ``` - [x] Using `--cloud_addr` overrides the value set in config file ``` $ cat ~/.pixie/config.json {"uniqueClientID":"XXX","cloudAddr":"boguscloud.com"} $ ./px --cloud_addr=withpixie.ai auth login Pixie CLI Starting browser... (if browser-based login fails, try running `px auth login --manual` for headless login) Fetching refresh token ... Failed to perform browser based auth. Will try manual auth error=browser failed to open Please Visit: https://work.withpixie.ai:443/login?local_mode=true Copy and paste token here: ``` - [x] Running non-interactively uses cloud stored in config file - [x] Running non-interactively without preferred cloud or `--cloud_addr` results in error </details> <details><summary>`px config` command testing</summary> - [x] `px config list` prints out cloud addr ``` $ ./px config list Pixie CLI CloudAddr: boguscloud.com ``` - [x] `px config set` validates arguments ``` $ ./px config set --key NonExistant --value tesitng Pixie CLI FATA[0000]src/pixie_cli/pkg/cmd/config.go:80 px.dev/pixie/src/pixie_cli/pkg/cmd.glob..func16() Key 'NonExistant' is not settable. Must be one of [CloudAddr] $ ./px config set --key CloudAddr --value withpixie.ai:443 --value testing Pixie CLI FATA[0000]src/pixie_cli/pkg/cmd/config.go:74 px.dev/pixie/src/pixie_cli/pkg/cmd.glob..func16() the number of --key and --value flags must match ``` - [x] `px config set` updates config file ``` $ ./px config set --key CloudAddr --value withpixie.ai:443 Pixie CLI $ ./px config list Pixie CLI CloudAddr: withpixie.ai:443 ``` </details> Changelog Message: Update `px` cli to store preferred cloud in pixie config file Signed-off-by: Dom Del Nano <ddelnano@gmail.com> GitOrigin-RevId: 1d41f9b
ddelnano
added a commit
to ddelnano/pixie
that referenced
this pull request
Sep 23, 2024
…ile (pixie-io#1964) (pixie-io#1990) Summary: Revert change for interactive prompt to store cloud to pixie config file (pixie-io#1964) We've received feedback from users that is confusing to no longer have a default cloud for the pixie cli. We will be restoring the previous behavior in a follow up PR. With that new direction in mind, it no longer makes sense to have the functionality added in pixie-io#1964. Relevant Issues: N/A Type of change: /kind cleanup Test Plan: None since this was a `git revert` Signed-off-by: Dom Del Nano <ddelnano@gmail.com> GitOrigin-RevId: 33244cd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary: Allow interactive px cli usage to prompt and save preferred cloud in pixie config file
This is a continuation of the plan I outlined in #1960 now that cloud addr is required for the
px
cli.Relevant Issues: N/A
Type of change: /kind feature
Test Plan: Verified the following scenarios. I will make sure to update the PX cli release checklist accordingly if/when approved
Default cloud selection testing
px
command that requires cloud prompts for selection and whether to store it--cloud_addr
overrides the value set in config file--cloud_addr
results in error`px config` command testing
px config list
prints out cloud addrpx config set
validates argumentspx config set
updates config fileChangelog Message: Update
px
cli to store preferred cloud in pixie config file