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
cli(state upgrade): Prompt for project names for detached stacks #13078
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
Changelog[uncommitted] (2023-06-22)Features
|
b07a824
to
85aba26
Compare
45191c1
to
32f182e
Compare
As pointed out in #13078 (comment), we repreatedly reimplement the project name validation logic. This moves it to a central place: `tokens.ValidateProjectName`, and re-uses it in existing places where copies were found.
85aba26
to
d237a3e
Compare
3183a92
to
0224384
Compare
As pointed out in #13078 (comment), we repreatedly reimplement the project name validation logic. This moves it to a central place: `tokens.ValidateProjectName`, and re-uses it in existing places where copies were found.
d237a3e
to
360ea62
Compare
0224384
to
3433903
Compare
As pointed out in #13078 (comment), we repreatedly reimplement the project name validation logic. This moves it to a central place: `tokens.ValidateProjectName`, and re-uses it in existing places where copies were found.
360ea62
to
3e6cc0d
Compare
3433903
to
9841557
Compare
As pointed out in #13078 (comment), we repreatedly reimplement the project name validation logic. This moves it to a central place: `tokens.ValidateProjectName`, and re-uses it in existing places where copies were found.
3e6cc0d
to
03ff557
Compare
9841557
to
23eed33
Compare
13165: sdk/go: Add tokens.ValidateProjectName r=abhinav a=abhinav As pointed out in #13078 (comment), we repreatedly reimplement the project name validation logic. This moves it to a central place: `tokens.ValidateProjectName`, and re-uses it in existing places where copies were found. Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
5c2a01f
to
c9304ab
Compare
c2c7d4d
to
aa93f5a
Compare
bors merge |
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600 --- Preview ![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5) Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
bors cancel |
Canceled. |
slightly broken; vt10x library needs an update for Windows. |
aa93f5a
to
5d39fc9
Compare
bors merge |
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600 --- Preview ![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5) 13249: fix(codegen/go): Use raw string literals for multiline-strings r=abhinav a=abhinav We already have logic in place to generate mutliline strings with backticks if they meet certain conditions in genTemplateExpression. However, the logic came into effect only if the string was complex enough to warrant use of `Sprintf` because the function short circuits to just printing a string literal if the string doesn't need a `Sprintf`. This changes genStringLiteral to be responsible for the decision of whether the string warrants backticks or not, retaining the prior conditions on whether the string would benefit from being split across multiple lines. Resolves #12358 13252: Freeze v3.73.0 r=Zaid-Ajaj a=Zaid-Ajaj Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
Build failed (retrying...): |
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600 --- Preview ![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5) Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600
Canceled. |
5d39fc9
to
d5fea17
Compare
🤦 I need to skip pty.Open on Windows on the second test too.
|
bors try |
tryBuild failed: |
bors merge |
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600 --- Preview ![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5) 13254: cli(state/rename): Validate new name before renaming r=abhinav a=abhinav Check that resource names are valid before renaming a resource and possibly corrupting the stack. Resource names are `QName`s, so we rely on tokens.IsQName for this. Resolves #11746 13256: Changelog and go.mod updates for v3.73.0 r=pulumi-bot a=pulumi-bot bors merge Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> Co-authored-by: github-actions <github-actions@github.com>
Build failed (retrying...): |
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600 --- Preview ![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5) Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
Build failed: |
bors merge |
13078: cli(state upgrade): Prompt for project names for detached stacks r=abhinav a=abhinav When running 'pulumi state upgrade', supply the ProjectsForDetachedStacks option to the file state backend so that we get asked to fill in project names for stacks where we could not guess them automatically. The implementation of the prompt is straightforward: For each stack, ask a question with the survey package and feed the result back to the filestate backend. Testing this is a bit complicated because terminals are involved. The test for this uses the go-expect and vt10x libraries recommended in the documentation for survey. It uses them to simulate a terminal emulator and acts on the output. The pty library is used to create a compatible pseduo-terminal. Unfortunately, these test libraries rely on Unix APIs and are not available on Windows, so the test will not run on Windows machines. Resolves #12600 --- Preview ![Kapture 2023-05-31 at 19 25 57](https://github.com/pulumi/pulumi/assets/41730/69fcf37d-0267-40cc-9002-6514f1cf9ad5) Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
Build failed: |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page.
|
When running 'pulumi state upgrade', supply the
ProjectsForDetachedStacks option to the file state backend so that we
get asked to fill in project names for stacks where we could not guess
them automatically.
The implementation of the prompt is straightforward:
For each stack, ask a question with the survey package
and feed the result back to the filestate backend.
Testing this is a bit complicated because terminals are involved.
The test for this uses the go-expect and vt10x libraries
recommended in the documentation for survey.
It uses them to simulate a terminal emulator and acts on the output.
The pty library is used to create a compatible pseduo-terminal.
Unfortunately, these test libraries rely on Unix APIs and are not
available on Windows, so the test will not run on Windows machines.
Resolves #12600
Preview