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

Fix create race condition #380

Merged

Conversation

eric-spence-code
Copy link
Contributor

Addressing race conditions on creates where resources immediately GET after creating #273 . Similar to GH-274 but addressing it by allowing callers to pass in a different error callback based on what the invoking function wants the error behavior to be.

@eric-spence-code eric-spence-code marked this pull request as draft August 29, 2021 15:34
@eric-spence-code eric-spence-code marked this pull request as ready for review August 29, 2021 15:34
@eric-spence-code
Copy link
Contributor Author

@stmcallister Apologies for the direct ping but I see you are a consistent contributor to this repo. Are there any guidelines on how to get reviewers added to this PR and any next steps to get this one merged. Thanks!

@eric-spence-code
Copy link
Contributor Author

@drastawi I noticed that you have also been involved in some prs recently. Am I missing anything to get this work reviewed?

@stmcallister
Copy link
Contributor

@eric-spence-code sorry for letting this sit so long! can you resolve the conflicts? I'll be sure to review it soon after the conflicts are resolved. Thanks!

@eric-spence-code
Copy link
Contributor Author

@stmcallister all good! I will get those conflicts resolved. Anything else needed for this pr to get merged

@stmcallister
Copy link
Contributor

@eric-spence-code as far as i can tell, without testing, it looks pretty good!

@stmcallister
Copy link
Contributor

@eric-spence-code were you ready for me to test? I saw some activity on the PR and gave it another try but ran into some issues with this code in the fetch functions. So, maybe you're not ready? 😅

What I'm seeing is this code:

client := meta.(*pagerduty.Client)

Throws an error panic: interface conversion: interface {} is *pagerduty.Config, not *pagerduty.Client.

The other functions are building client with client, _ := meta.(*Config).Client().

Is there advantage to using meta.(*pagerduty.Client) I'm not seeing?

@eric-spence-code
Copy link
Contributor Author

@stmcallister nah its just a bad merge. I will update them all to use the same client constructor.

@stmcallister
Copy link
Contributor

@eric-spence-code also, can you merge in the latest master as well? I'm still getting conflicts with recent changes to master.

@eric-spence-code
Copy link
Contributor Author

@stmcallister just pulled in upstream and I am not seeing any conflicts. Are you saying merge conflicts or failing tests?

Copy link
Contributor

@stmcallister stmcallister left a comment

Choose a reason for hiding this comment

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

That works! Thanks, @eric-spence-code ! 👍

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