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

Feature - Short Node Label for Stack Graph #11383

Merged
merged 1 commit into from Dec 13, 2022
Merged

Conversation

krupaJari
Copy link
Contributor

@krupaJari krupaJari commented Nov 16, 2022

Description

This feature allows the user to opt for short node labels, i.e, only the resource name part of the URN instead of the full URN that is returned as the node label in the stack graph while using pulumi stack graph command. A flag named short-node-name is added to the pulumi stack graph command that enables this feature.

Command Usage

Existing command : pulumi stack graph [file-name]
Example : pulumi stack graph dev
Output for dev :
strict digraph {
Resource0 [label="urn:pulumi:dev::Test-Simple-Stack::pulumi:pulumi:Stack::Test-Simple-Stack-dev"];
Resource1 [label="urn:pulumi:dev::Test-Simple-Stack::pulumi:providers:aws-native::default_0_40_2"];
Resource2 [label="urn:pulumi:dev::Test-Simple-Stack::aws-native:s3:Bucket::my-bucket2"];
Resource2 -> Resource0 [color = "#AA6639"];
Resource3 [label="urn:pulumi:dev::Test-Simple-Stack::aws-native:s3:Bucket::my-bucket1"];
Resource3 -> Resource0 [color = "#AA6639"];
}

Command for using the feature : pulumi stack graph [file-name] --short-node-name

Fixes #10663

Checklist

  • 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 Service API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Nov 16, 2022

Changelog

[uncommitted] (2022-12-13)

Features

  • [cli] Adds a flag that allows user to set the node label as the resource name instead of full URN in the stack graph

@iwahbe
Copy link
Member

iwahbe commented Nov 16, 2022

/run-acceptance-tests
Please view the results of the acceptance tests Here

@iwahbe iwahbe self-requested a review November 16, 2022 21:59
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

The change looks short and sweet. I left one nit on the help text, but otherwise it looks ready to merge.

pkg/cmd/pulumi/stack_graph.go Outdated Show resolved Hide resolved
@github-actions
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

@iwahbe iwahbe self-requested a review November 17, 2022 17:37
@iwahbe iwahbe marked this pull request as ready for review November 17, 2022 17:42
Copy link
Member

@iwahbe iwahbe left a comment

Choose a reason for hiding this comment

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

LGTM

@iwahbe
Copy link
Member

iwahbe commented Nov 17, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 17, 2022

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@dixler
Copy link
Contributor

dixler commented Nov 21, 2022

/run-acceptance-tests
Please view the results of the acceptance tests Here

@jazzyfresh
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Nov 22, 2022

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@AaronFriel
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented Dec 13, 2022

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@AaronFriel
Copy link
Member

/rebase

@AaronFriel
Copy link
Member

/rebase-autosquash

@AaronFriel
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented Dec 13, 2022

Stopped waiting for PR status (GitHub check) without running due to duplicate requests to run. You may check Bors to see that this PR is included in a batch by one of the other requests.

@bors
Copy link
Contributor

bors bot commented Dec 13, 2022

Build succeeded:

@bors bors bot merged commit 53c4457 into pulumi:master Dec 13, 2022
@iwahbe iwahbe mentioned this pull request Jan 12, 2023
3 tasks
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.

Short names in export graphviz file
6 participants