Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

migration tool missing shebang #53

Closed
wyardley opened this issue Oct 20, 2020 · 6 comments · Fixed by #57
Closed

migration tool missing shebang #53

wyardley opened this issue Oct 20, 2020 · 6 comments · Fixed by #57
Assignees
Labels
api: secretmanager Issues related to the googleapis/python-secret-manager API. type: docs Improvement to the documentation for an API.

Comments

@wyardley
Copy link

The migration tool documented in https://googleapis.dev/python/secretmanager/latest/UPGRADING.html suggests executing the fixup script directly (without, e.g., python3 -m ...), but that tool has no shebang, giving an import error when run as directed.

Additionally, while it's flagged as a breaking change, it would have been extremely handy if the changelog / release notes had pointed to the migration guide.
https://github.com/googleapis/python-secret-manager/blob/master/CHANGELOG.md

Environment details

  • OS type and version: Darwin LM-LTH-40012925 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
  • Python version: Python 3.8.5
  • pip version: pip 20.2.1 from [...] (python 3.8)
  • google-cloud-secret-manager version: 2.0.0

Steps to reproduce

  1. run `% fixup_secretmanager_v1_keywords.py --input-directory foo --output-directory /tmp/foo
  2. get the error below

Code example

Stack trace

fixup_secretmanager_v1_keywords.py: line 18: import: command not found
fixup_secretmanager_v1_keywords.py: line 19: import: command not found
fixup_secretmanager_v1_keywords.py: line 20: import: command not found
fixup_secretmanager_v1_keywords.py: line 21: import: command not found
fixup_secretmanager_v1_keywords.py: line 22: import: command not found
fixup_secretmanager_v1_keywords.py: line 23: syntax error near unexpected token `('
fixup_secretmanager_v1_keywords.py: line 23: `from typing import (Any, Callable, Dict, List, Sequence, Tuple)'
@product-auto-label product-auto-label bot added the api: secretmanager Issues related to the googleapis/python-secret-manager API. label Oct 20, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 21, 2020
busunkim96 added a commit that referenced this issue Oct 21, 2020
@busunkim96 busunkim96 added type: docs Improvement to the documentation for an API. and removed triage me I really want to be triaged. labels Oct 21, 2020
@busunkim96
Copy link
Contributor

@wyardley Hi, thanks for the feedback. We added in the changelog in some libraries but didn't do it consistently in all libraries.
As for the missing shebang, I've opened #54 to update the doc.

@wyardley
Copy link
Author

I could have tested better, but in the end, it broke something because it didn’t call out explicitly that there were actual breaking changes vs just a major because it was moving to generated code.

Would it be possible to just add the shebang to point to /usr/bin/env python3, which should be relatively portable?

@wyardley
Copy link
Author

wyardley commented Dec 2, 2020

Hi - I see that the PR was merged - did you see my comment on it, because I don’t think the corrected docs will work either.

@busunkim96
Copy link
Contributor

Whoops I must have missed that. 🤦‍♀️ https://github.com/googleapis/python-secret-manager/pull/57/files#diff-26ec12bc43b8f3c0d49cf8ad436056c5f54b25b7ffa75ebaf79691203351e02d adds the shebang to the scripts. I will also follow up with an edit to the docs.

@wyardley
Copy link
Author

wyardley commented Dec 2, 2020

No worries! Thanks for following up.

Probably most people who would be affected have already upgraded.

@busunkim96
Copy link
Contributor

Closed by #57

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: secretmanager Issues related to the googleapis/python-secret-manager API. type: docs Improvement to the documentation for an API.
Projects
None yet
3 participants