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

Support Parameterize in get-schema, gen-sdk #16210

Merged
merged 1 commit into from
May 20, 2024
Merged

Support Parameterize in get-schema, gen-sdk #16210

merged 1 commit into from
May 20, 2024

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented May 16, 2024

Description

This plumbs the use of the Parameterize method and GetSchema into get-schema (and gen-sdk partially, not that sdk gen can actually deal with it yet properly).

It also happens to fix get-schema working better for shimless providers (i.e. pointing to a folder and using the language host to run it).

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 May 16, 2024

Changelog

[uncommitted] (2024-05-17)

@Frassle Frassle added impact/no-changelog-required This issue doesn't require a CHANGELOG update labels May 16, 2024
@Frassle Frassle force-pushed the fraser/paramCmd branch 4 times, most recently from 9efe885 to 5053f5f Compare May 16, 2024 19:54
@Frassle Frassle marked this pull request as ready for review May 16, 2024 19:54
@Frassle Frassle requested a review from a team as a code owner May 16, 2024 19:54
@Frassle Frassle changed the title Support Parameterize in get-schema,gen-sdk Support Parameterize in get-schema, gen-sdk May 16, 2024
pkg/cmd/pulumi/package.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/package.go Outdated Show resolved Hide resolved
@Frassle Frassle force-pushed the fraser/paramCmd branch 2 times, most recently from dac94fe to 944b984 Compare May 17, 2024 11:30
pkg/cmd/pulumi/package_extract_schema.go Outdated Show resolved Hide resolved
pkg/cmd/pulumi/package_gen_sdk.go Outdated Show resolved Hide resolved
@Frassle Frassle force-pushed the fraser/paramCmd branch 2 times, most recently from e218f5a to ebdc7fc Compare May 17, 2024 14:37
@Frassle Frassle added this pull request to the merge queue May 17, 2024
@@ -25,16 +25,18 @@ import (

func newExtractSchemaCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "get-schema <schema_source>",
Args: cobra.ExactArgs(1),
Use: "get-schema <schema_source> [provider parameters]",
Copy link
Member

Choose a reason for hiding this comment

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

I would go with a repeatable flag here, not arbitrary args:

pulumi package get-schema terraform-bridge --param name=random -p version='>=3'

Instead of

pulumi package get-schema terraform-bridge name=random version='>=3'

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems a lot more verbose, not clear what the win is there?

Copy link
Member

Choose a reason for hiding this comment

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

My preference is to have binary command [sumcommands] [--modifiers]. Feel free to ignore me if you disagree.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeh gonna go with this feels more natural to me for now

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 17, 2024
@Frassle Frassle added this pull request to the merge queue May 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 18, 2024
@Frassle Frassle added this pull request to the merge queue May 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 18, 2024
@Frassle Frassle added this pull request to the merge queue May 19, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 19, 2024
@Frassle Frassle added this pull request to the merge queue May 20, 2024
Merged via the queue into master with commit 9f1ff9d May 20, 2024
49 checks passed
@Frassle Frassle deleted the fraser/paramCmd branch May 20, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants