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

Add Windows support #20

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

cagataygurturk
Copy link
Contributor

@cagataygurturk cagataygurturk commented Jan 21, 2025

  • Fixes Support Windows _netrc instead of .netrc #14
  • Switch from path to path/filepath for multi-platform line separators
  • Fix the AddConfigs test for Windows by removing the new lines in the test data. Different new line characters in Windows were causing tests always to fail

{"test-key": "test-value"}
Copy link
Member

Choose a reason for hiding this comment

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

Any chance we can revert this change? This is unrelated to the fix and the original key.json wasn't incorrectly formatted either.

Copy link
Contributor Author

@cagataygurturk cagataygurturk Feb 4, 2025

Choose a reason for hiding this comment

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

It is actually related to the fix. Without this change, tests in Windows are not passing due to new line differences. It was a quick fix to mitigate that. Should I revert and leave the tests broken in Windows or leave like this?

Copy link
Member

Choose a reason for hiding this comment

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

Can you explain more? I thought this file was only used in the add the first location with json key test case?

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see what you mean. Is it because \n and \r\n leading to different base64 encoding of json key? If so, this change LGTM

Copy link
Contributor Author

@cagataygurturk cagataygurturk Feb 6, 2025

Choose a reason for hiding this comment

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

Yes! It took me quite some time to understand why tests were passing on Mac/Linux and not on Windows, then I figured out that was the reason. And I just got rid of newlines since they are not too related to what we are trying to test.

Copy link
Member

@yihanzhen yihanzhen left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! Just a few nits

@cagataygurturk
Copy link
Contributor Author

cagataygurturk commented Feb 6, 2025

Thanks @yihanzhen for the review. Can we merge and release if all looks ok? The issues solved here are quite annoying for Windows users and even Google Cloud documentation does not mention about the possible workarounds.

@yihanzhen yihanzhen merged commit 256b6a6 into GoogleCloudPlatform:main Feb 6, 2025
6 checks passed
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.

2 participants