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

Synthtool does not detect a template change that contains only file permission changes #783

Closed
chingor13 opened this issue Oct 1, 2020 · 2 comments · Fixed by #784
Closed
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@chingor13
Copy link
Contributor

0762e8e made a java template file executable.

To repro:

  1. Use a repo that has the readme.sh file with 644 permissions (e.g. java-asset)
  2. run python3 -m synthtool
  3. run git diff & observe no diff except the synth.metadata file
  4. delete ,kokoro/readme.md
  5. run python3 -m synthtool
  6. run git diff& observe that the file permissions have changed
@chingor13
Copy link
Contributor Author

Additionally, if I modify the file contents, it still does not change the file mode.

To test: I added a newline in the file and ran synthtool with local templates. Running git diff, I see the newline added, but the file permissions remain 644.

@chingor13
Copy link
Contributor Author

Looks like this happens if you specify a merge function (which we do for java). In that case, it does a file write and does not respect the source file's permissions.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Oct 1, 2020
@chingor13 chingor13 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 1, 2020
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants