mirror of https://github.com/pulumi/pulumi.git
274920fead
13218: CLI update summary now shows after non-mandatory policy events seen. r=abhinav a=dixler <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description This change causes only mandatory policy violations to skip the summary display causing the resources changed and duration details to not be printed. Policy Violations are categorized as `mandatory`, `disabled`, and `advisory`. We were treating all 3 as policy violations to skip displaying the update summary. Now we only use `mandatory`. Fixes #13109 ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [x] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13220: `pulumi new` now supports numeric stack names. r=abhinav a=dixler <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description `pulumi new` now correctly serializes a stack name of 123456 as a string in the `Pulumi.yaml` file. Previously `123456` is interpreted as a number in YAML by default. <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes #12136 ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [x] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13224: Remove extra tab that convert TS outputs in JSON file r=abhinav a=mikhailshilkov <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes #10776 Examples of generated files: tsconfig.js: ```json { "compilerOptions": { "strict": true, "outDir": "bin", "target": "es2016", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "experimentalDecorators": true, "pretty": true, "noFallthroughCasesInSwitch": true, "noImplicitReturns": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.ts", ] } ``` package.json ```json { "name": "simple-yaml", "devDependencies": { "`@types/node":` "^14" }, "dependencies": { "typescript": "^4.0.0", "`@pulumi/pulumi":` "^3.0.0", "`@pulumi/aws-native":` "*" } } ``` ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13225: cli: Fix Markdown reference formatting issues r=abhinav a=abhinav Fixes a couple of Markdown formatting issues in the output of `gen-markdown`. This is used as input to this section of the Pulumi website: <https://www.pulumi.com/docs/cli/commands/> Differences in gen-markdown output following this change: diff -u before/pulumi_logout.md after/pulumi_logout.md --- before/pulumi_logout.md 2023-06-20 15:20:06 +++ after/pulumi_logout.md 2023-06-20 15:20:17 `@@` -19,6 +19,7 `@@` If no URL is provided, you will be logged out of the current backend. If you would like to log out of all backends simultaneously, you can pass `--all`, + $ pulumi logout --all ``` diff -u before/pulumi_state_delete.md after/pulumi_state_delete.md --- before/pulumi_state_delete.md 2023-06-20 15:20:06 +++ after/pulumi_state_delete.md 2023-06-20 15:20:17 `@@` -20,12 +20,15 `@@` Make sure that URNs are single-quoted to avoid having characters unexpectedly interpreted by the shell. -Example: -pulumi state delete 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' - ``` pulumi state delete <resource URN> [flags] +``` + +### Examples + +``` +pulumi state delete 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' ``` ### Options diff -u before/pulumi_state_rename.md after/pulumi_state_rename.md --- before/pulumi_state_rename.md 2023-06-20 15:20:06 +++ after/pulumi_state_rename.md 2023-06-20 15:20:17 `@@` -17,12 +17,15 `@@` Make sure that URNs are single-quoted to avoid having characters unexpectedly interpreted by the shell. -Example: -pulumi state rename 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' new-name-here - ``` pulumi state rename <resource URN> <new name> [flags] +``` + +### Examples + +``` +pulumi state rename 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' new-name-here ``` ### Options Resolves #11991 13227: Fix `stack rm` removing config files for the wrong project r=abhinav a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes https://github.com/pulumi/pulumi/issues/12246 ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13228: Don't use printf without a fixed format string r=abhinav a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes https://github.com/pulumi/pulumi/issues/11990 There were a few places we were passing an already formatted string in as the format argument for printf. This replaces those calls with non-formatting print calls. ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13229: [Snyk] Fix for 1 vulnerabilities r=abhinav a=pulumi-bot <p>This PR was automatically created by Snyk using the credentials of a real user.</p><br /><h3>Snyk has created this PR to fix one or more vulnerable packages in the `yarn` dependencies of this project.</h3> #### Changes included in this PR - Changes to the following files to upgrade the vulnerable dependencies to a fixed version: - sdk/nodejs/package.json #### Note for [zero-installs](https://yarnpkg.com/features/zero-installs) users If you are using the Yarn feature [zero-installs](https://yarnpkg.com/features/zero-installs) that was introduced in Yarn V2, note that this PR does not update the `.yarn/cache/` directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run `yarn` to update the contents of the `./yarn/cache` directory. If you are not using zero-install you can ignore this as your flow should likely be unchanged. <details> <summary>⚠️ <b>Warning</b></summary> ``` Failed to update the yarn.lock, please update manually before merging. ``` </details> #### Vulnerabilities that will be fixed ##### With an upgrade: Severity | Priority Score (*) | Issue | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:------------------------- ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png "medium severity") | **658/1000** <br/> **Why?** Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 5.3 | Regular Expression Denial of Service (ReDoS) <br/>[SNYK-JS-SEMVER-3247795](https://snyk.io/vuln/SNYK-JS-SEMVER-3247795) | Yes | Proof of Concept (*) Note that the real score may have changed since the PR was raised. Check the changes in this PR to ensure they won't cause issues with your project. ------------ **Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.* For more information: <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI5ZjM5MzJlOS1jYTdhLTQyMmYtODRkMi04OGQ0YmEyYjJhNzUiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjlmMzkzMmU5LWNhN2EtNDIyZi04NGQyLTg4ZDRiYTJiMmE3NSJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/pulumi/project/e3f34c6a-bc17-4001-b1c7-ab15ce3940e5?utm_source=github&utm_medium=referral&page=fix-pr) 🛠 [Adjust project settings](https://app.snyk.io/org/pulumi/project/e3f34c6a-bc17-4001-b1c7-ab15ce3940e5?utm_source=github&utm_medium=referral&page=fix-pr/settings) 📚 [Read more about Snyk's upgrade and patch logic](https://support.snyk.io/hc/en-us/articles/360003891078-Snyk-patches-to-fix-vulnerabilities) [//]: # (snyk:metadata:{"prId":"9f3932e9-ca7a-422f-84d2-88d4ba2b2a75","prPublicId":"9f3932e9-ca7a-422f-84d2-88d4ba2b2a75","dependencies":[{"name":"normalize-package-data","from":"2.5.0","to":"3.0.0"},{"name":"semver","from":"6.3.0","to":"7.5.2"}],"packageManager":"yarn","projectPublicId":"e3f34c6a-bc17-4001-b1c7-ab15ce3940e5","projectUrl":"https://app.snyk.io/org/pulumi/project/e3f34c6a-bc17-4001-b1c7-ab15ce3940e5?utm_source=github&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-JS-SEMVER-3247795"],"upgrade":["SNYK-JS-SEMVER-3247795"],"isBreakingChange":true,"env":"prod","prType":"fix","templateVariants":["pr-warning-shown","priorityScore"],"priorityScoreList":[658],"remediationStrategy":"vuln"}) --- **Learn how to fix vulnerabilities with free interactive lessons:** 🦉 [Regular Expression Denial of Service (ReDoS)](https://learn.snyk.io/lessons/redos/javascript/?loc=fix-pr) Co-authored-by: Kyle Dixler <kyle@pulumi.com> Co-authored-by: Mikhail Shilkov <github@mikhail.io> Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io> |
||
---|---|---|
.. | ||
benchmarks/go-alias-norm | ||
examples | ||
integration | ||
testdata | ||
testprovider | ||
.gitignore | ||
README.md | ||
about_test.go | ||
config_test.go | ||
go.mod | ||
go.sum | ||
history_test.go | ||
login_test.go | ||
main_test.go | ||
remote_test.go | ||
roundtrip_test.go | ||
smoke_test.go | ||
stack_test.go |
README.md
Integration Tests
This module provides integration tests for the Pulumi CLI.
The tests can be run via:
make test_all
Usage of Go build tags
In order to speed up integration tests in GitHub actions, Go build tags are used to conditionally compile the desired test cases.
// integration_nodejs_test.go
//go:build (nodejs || all) && !xplatform-acceptance
// integration_nodejs_acceptance_test.go
//go:build nodejs || all