Skip to content
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

Adds two new CLI features - search and AI search #13611

Merged
merged 18 commits into from Aug 21, 2023
Merged

Conversation

kpitzen
Copy link
Contributor

@kpitzen kpitzen commented Jul 27, 2023

Adds initial pulumi search implementation

Description

Fixes #13489
Fixes #12868

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Jul 27, 2023

Changelog

[uncommitted] (2023-08-21)

Features

  • [cli] Adds basic Search and AI-assisted Search functionality
    #13611

Copy link
Contributor

@abhinav abhinav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is a non-functional draft PR, but I gave it a quick high-level review.

pkg/backend/filestate/backend.go Outdated Show resolved Hide resolved
pkg/backend/backend.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/client.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/search.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/search.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/search.go Outdated Show resolved Hide resolved
@kpitzen kpitzen force-pushed the KP/AddsSearchCLICommands branch 3 times, most recently from c33e668 to 261fb28 Compare July 28, 2023 14:54
@kpitzen kpitzen changed the title Adds boilerplate for two new CLI features - search and AI search Adds two new CLI features - search and AI search Jul 28, 2023
@abhinav
Copy link
Contributor

abhinav commented Jul 31, 2023

New version looks much better. No obvious style/design issues to point out.
Will defer full review until you mark this as ready.

@kpitzen kpitzen marked this pull request as ready for review August 2, 2023 16:43
@kpitzen kpitzen force-pushed the KP/AddsSearchCLICommands branch 2 times, most recently from 5f802a6 to 7630544 Compare August 2, 2023 17:00
pkg/backend/httpstate/backend.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/client.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/client.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/client.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/client.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
@kpitzen kpitzen force-pushed the KP/AddsSearchCLICommands branch 2 times, most recently from cbe4499 to a2ead05 Compare August 3, 2023 16:18
Copy link
Contributor

@blampe blampe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primarily looked at API usage and types. You can simplify your API types since you only need to worry about deserialization.

pkg/cmd/pulumi/org.go Show resolved Hide resolved
pkg/cmd/pulumi/search.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/api_endpoints.go Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
sdk/go/common/apitype/search.go Outdated Show resolved Hide resolved
Copy link
Member

@justinvp justinvp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For CLI command changes, it'd be awesome to see a screenshot (or gif or https://asciinema.org) in the PR description showing off the usage.

Some comments, but LGTM otherwise.

pkg/cmd/pulumi/search.go Outdated Show resolved Hide resolved
pkg/backend/httpstate/client/api_endpoints.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/org.go Show resolved Hide resolved
pkg/cmd/pulumi/search.go Outdated Show resolved Hide resolved
Copy link
Contributor

@blampe blampe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search API bits LGTM!

Adds initial (not-totally-functional) pulumi search implementation
Still TODO:

- Validate users' ability to call this endpoint

- Iterate on naive search syntax to be a bit more compatible with Pulumi

Finalize interface
Removes debugging print statements

Remaining TODO:
- Decouple this command from the context of a Pulumi project
- Improve rendering logic to make results more readable
- Add user interaction for things like pagination, etc
Moves them to only the httpstate backend to reduce cross-contamination
@kpitzen kpitzen enabled auto-merge August 21, 2023 14:44
@pulumi pulumi deleted a comment from bors bot Aug 21, 2023
@kpitzen kpitzen added this pull request to the merge queue Aug 21, 2023
Merged via the queue into master with commit 59c08cb Aug 21, 2023
44 of 45 checks passed
@kpitzen kpitzen deleted the KP/AddsSearchCLICommands branch August 21, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pulumi search command CLI command for resource search
6 participants