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

Hotfix: update the logic to get path of access tokens. #198

Merged
merged 3 commits into from
Nov 17, 2017
Merged

Hotfix: update the logic to get path of access tokens. #198

merged 3 commits into from
Nov 17, 2017

Conversation

metacpp
Copy link
Contributor

@metacpp metacpp commented Nov 16, 2017

  1. Add logic to read path of access tokens through environment variable.
  2. Add fallback logic to default one.

Notice: this is short-term fix and require user to use latest version of provider in Cloud Shell.

Thank you for your contribution to Go-AutoRest! We will triage and review it as soon as we can.

As part of submitting, please make sure you can make the following assertions:

  • I've tested my changes, adding unit tests if applicable.
  • I've added Apache 2.0 Headers to the top of any new source files.
  • I'm submitting this PR to the dev branch, except in the case of urgent bug fixes warranting their own release.
  • If I'm targeting master, I've updated CHANGELOG.md to address the changes I'm making.

1. Add logic to read path of access tokens through environment variable.
2. Add fallback logic to default one.

Notice: this is short-term fix and require user to use latest version of provider in Cloud Shell.
@metacpp
Copy link
Contributor Author

metacpp commented Nov 16, 2017

I could not find any legacy unit test for AccessTokensPath method. Let me know if we need to add it.

Copy link
Member

@marstr marstr left a comment

Choose a reason for hiding this comment

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

Couple of quick fixes, and as you mention, we would much appreciate it if you helped out and added a unit-test regardless of whether or not one previously existed.

Thanks!

var err error

// Fallback logic to default path on non-cloud-shell environment.
// TODO(sushi): remove the dependency on hard-coding path.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of mentioning yourself, please open a new issue and mention it in this comment. :)

CHANGELOG.md Outdated

### Bug Fixes

- Update the logic to get path of access tokens through AZURE_ACCESS_TOKEN_FILE.
Copy link
Member

Choose a reason for hiding this comment

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

Mind rephrasing this to make clear that the previous default still works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

@metacpp
Copy link
Contributor Author

metacpp commented Nov 17, 2017

@marstr let me create an issue as TODO item for the unit test.

@metacpp
Copy link
Contributor Author

metacpp commented Nov 17, 2017

@marstr the PR is updated, when it's merged, please let me know. I will work with Tom to update the dependency on provider repo.

@marstr marstr merged commit 0b0c957 into Azure:master Nov 17, 2017
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