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

local workspace project validation should include error message #15279

Merged
merged 3 commits into from Jan 28, 2024

Conversation

szesch
Copy link
Contributor

@szesch szesch commented Jan 27, 2024

Description

If project settings are not valid contract.Requiref(proj.Validate() == nil, "proj", "Validate()") just returns Validate() which makes it difficult to debug why the call to proj.Validate() failed. This change captures the error returned by proj.Validate() and includes that as part of the message.

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

Copy link

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Jan 27, 2024

Changelog

[uncommitted] (2024-01-27)

Bug Fixes

  • [sdk/go] Include error message in local workspace validation.

Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

Good change! Just a couple of minor edits needed.

szesch and others added 2 commits January 27, 2024 16:53
…ocal-workspace-validation.yaml

Co-authored-by: Fraser Waters <frassle@gmail.com>
Co-authored-by: Fraser Waters <frassle@gmail.com>
Copy link

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

1 similar comment
Copy link

PR is now waiting for a maintainer to take action.

Note for the maintainer: Commands available:

  • /run-acceptance-tests - used to test run the acceptance tests for the project
  • /run-codegen - used to test the Pull Request against downstream codegen
  • /run-docs-gen - used to test the Pull Request against documentation generation

@szesch
Copy link
Contributor Author

szesch commented Jan 27, 2024

Thanks for the feedback! Updated.

@Frassle Frassle added this pull request to the merge queue Jan 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 27, 2024
@Frassle
Copy link
Member

Frassle commented Jan 28, 2024

Merge failed due to pytest errors. Not an issue with this PR itself, we'll get that fixed then get this merged.

@Frassle Frassle added this pull request to the merge queue Jan 28, 2024
Merged via the queue into pulumi:master with commit a3738fb Jan 28, 2024
8 of 9 checks passed
@szesch szesch deleted the validate-error-message branch January 29, 2024 19:48
@justinvp justinvp mentioned this pull request Jan 31, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2024
### Features

- [backend] Allows the PULUMI_SKIP_CHECKPOINTS environment variable to
be set without requiring the PULUMI_EXPERIMENTAL flag.
  [#15318](#15318)

- [auto/go] Add new API to install the Pulumi CLI from the Automation
API
  [#15049](#15049)

- [auto/nodejs] Allow disabling version validation when using a custom
PulumiCommand instance
  [#15242](#15242)

- [auto/python] Add new API to install the Pulumi CLI
  [#15204](#15204)

- [auto/python] Inline programs can now be defined as async functions.
  [#15278](#15278)

- [pkg/testing] Add RequireEmptyPreviewAfterRefresh option to
ProgramTest


### Bug Fixes

- [engine] Fix a hang in preview --import-file.
  [#15203](#15203)

- [engine] Engine will now error if aliases request a parent with no
URN.
  [#15232](#15232)

- [engine] Fix stack name validation when PULUMI_DISABLE_VALIDATION
isn't set.
  [#15245](#15245)

- [engine] Fix a performance issue doing unneeded secret encryption.
  [#15306](#15306)

- [sdk/go] Include error message in local workspace validation.
  [#15279](#15279)

- [sdkgen/go] Remove pulumix references from generated enums
  [#15280](#15280)

- [programgen/nodejs] Fixes generated expression for filebase64 function
to use fs.readFileSync directly with base64 encoding option
  [#15253](#15253)

- [sdkgen/python] Use importlib.metadata instead of pkg_resources
  [#15266](#15266)


### Miscellaneous

- [auto/go] Remove obsolete note from FullyQualifiedStackName comment.
  [#15281](#15281)

- [backend/filestate] Upgrade gocloud.dev to the latest version
  [#15202](#15202)

- [sdk/python] Remove compatability code for Python 3.7 and below.
  [#15276](#15276)
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.

None yet

3 participants