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

Only prune the trailing spaces in Python automation result #8160

Conversation

iamjekyun
Copy link
Contributor

@iamjekyun iamjekyun commented Oct 7, 2021

Description

replaced strip() to rstrip() in order to preserve indentation of the manifest

Fixes #8147

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@github-actions
Copy link

github-actions bot commented Oct 7, 2021

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
  • /run-containers - used to test the Pull Request against the containers tests

@github-actions
Copy link

github-actions bot commented Oct 7, 2021

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
  • /run-containers - used to test the Pull Request against the containers tests

@iamjekyun iamjekyun changed the title only pruning the trailing spaces Only pruning the trailing spaces Oct 7, 2021
@iamjekyun iamjekyun changed the title Only pruning the trailing spaces Only pruning the trailing spaces in python automation result Oct 7, 2021
@iamjekyun iamjekyun changed the title Only pruning the trailing spaces in python automation result Only pruning the trailing spaces in Python automation result Oct 7, 2021
@komalali
Copy link
Member

komalali commented Oct 7, 2021

Thanks for the PR @iamjekyun! I know we don't have tests of this specific piece of the code, but do you have an example of the before and after from using it locally to confirm it does what you expect? Like what does the example from your comment here look like after this change?

@komalali
Copy link
Member

komalali commented Oct 7, 2021

/run-acceptance-tests

@github-actions
Copy link

github-actions bot commented Oct 7, 2021

Please view the results of the PR Build + Acceptance Tests Run Here

1 similar comment
@github-actions
Copy link

github-actions bot commented Oct 7, 2021

Please view the results of the PR Build + Acceptance Tests Run Here

@komalali komalali added the awaiting-feedback Blocked on input from the author label Oct 8, 2021
@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
  • /run-containers - used to test the Pull Request against the containers tests

@iamjekyun
Copy link
Contributor Author

I'm wrapping around my head to set up a local testing environment. How can I build the result, and run it locally? I read CONTRIBUTING.md, and installed the prerequisites.

@iamjekyun
Copy link
Contributor Author

@komalali I was able to tweak some of the codes, in main.go and the actual testcode, but still wondering how can I use the result of the code I built.

@iamjekyun
Copy link
Contributor Author

/run-acceptance-tests

@komalali
Copy link
Member

@iamjekyun to test the python SDK in a local project you can run make build in sdk/python which will create a usable python SDK in sdk/python/env/src. You can then use that in your project locally by running venv/bin/pip install -e path/to/env/src where path/to/env/src is the path to that directory. Like for me, the path is ~/go/src/github.com/pulumi/pulumi/sdk/python/env/src.

@iamjekyun
Copy link
Contributor Author

image

It was indeed straightforward process! Thx for helping out. Result indicates that it well preserves the original indentation.

@komalali komalali removed the awaiting-feedback Blocked on input from the author label Oct 11, 2021
@komalali
Copy link
Member

Awesome thanks for following up @iamjekyun!

@komalali komalali changed the title Only pruning the trailing spaces in Python automation result Only prune the trailing spaces in Python automation result Oct 11, 2021
@komalali komalali merged commit 1bb85ca into pulumi:master Oct 11, 2021
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.

Better readability in result of automation API
2 participants