Skip to content

Conversation

avishalom
Copy link
Contributor

do not merge, this is a breaking change.
adding context to network calls.

@avishalom avishalom requested a review from hiranya911 February 27, 2018 19:22
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Looks pretty solid. Just one suggestion regarding tests.


func TestNonExisting(t *testing.T) {
err := client.DeleteInstanceID(context.Background(), "dnon-existY")
// legal instance IDs are /[cdef][A-Za-z0-9_-]{9}[AEIMQUYcgkosw048]/
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look like it belong here. May be it will go away when merged with the latest dev?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this explains fictive-ID0 , i'll change the comment

)

var client *Client
var ctx context.Context
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this ever assigned to? Personally, I think we are better off calling context.Background() everywhere this is needed. Otherwise it is somewhat confusing since this is referenced from multiple test files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This gets set in test main for the app engine in line 60, else 68.
are we dropping the AE support?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see. Then lets leave it as is for now. Going forward though I think we should remove the dev app server test mode. It's complicating the code here.

* Cleaning up the auth package

* Variable grouping

* Removing some punctuation; Changed id to ID in error messages
* Cleaning up the auth (user management) code

* Added a few more tests

* Removed the fields inner type from UserToCreate and UserToUpdate

* Renamed _req variables; More consistent error messages
@hiranya911 hiranya911 merged commit d9742c8 into dev May 7, 2018
@hiranya911 hiranya911 deleted the breaking_context_change branch May 7, 2018 18:39
hiranya911 added a commit that referenced this pull request May 8, 2018
* Breaking context change (#88)

* context signatures

* VerifyIDToken context

* custom token context

* fix context arguments

* custom token with claims context

* remove TODO

* integration_iid_name

* propagate ctx

* propagate to private functions

* snippets and tests ctx

* integration test user2 fix

* error message

* Revert "integration test user2 fix"

This reverts commit 57148ce.

* add context to AE, fix integration test after merge.

* Revert "error message"

This reverts commit db7c34a.

* Merged with latest dev

* Using the 1.6 import for context

* Dropping call to WithContext

* Cleaning up the auth package (#134)

* Cleaning up the auth package

* Variable grouping

* Removing some punctuation; Changed id to ID in error messages

* Adding a minor comment

* Cleaning up the auth (user management) code (#136)

* Cleaning up the auth (user management) code

* Added a few more tests

* Removed the fields inner type from UserToCreate and UserToUpdate

* Renamed _req variables; More consistent error messages

* Removing golint checks from 1.6.x build (#141)

* Removing golint checks from 1.6.x build

* Minor reformat

* Bumped version to 3.0.0 (#142)

* Bumped version to 3.0.0

* Updated changelog
hiranya911 pushed a commit that referenced this pull request Jun 12, 2018
* context signatures

* VerifyIDToken context

* custom token context

* fix context arguments

* custom token with claims context

* remove TODO

* integration_iid_name

* propagate ctx

* propagate to private functions

* snippets and tests ctx

* integration test user2 fix

* error message

* Revert "integration test user2 fix"

This reverts commit 57148ce.

* add context to AE, fix integration test after merge.

* Revert "error message"

This reverts commit db7c34a.

* Merged with latest dev

* Using the 1.6 import for context

* Dropping call to WithContext

* Cleaning up the auth package (#134)

* Cleaning up the auth package

* Variable grouping

* Removing some punctuation; Changed id to ID in error messages

* Adding a minor comment

* Cleaning up the auth (user management) code (#136)

* Cleaning up the auth (user management) code

* Added a few more tests

* Removed the fields inner type from UserToCreate and UserToUpdate

* Renamed _req variables; More consistent error messages
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