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 support for response_plays #404

Merged
merged 4 commits into from
Jan 16, 2022
Merged

Add support for response_plays #404

merged 4 commits into from
Jan 16, 2022

Conversation

petetanton
Copy link
Contributor

Adding support for the response_plays API and enable adding response_plays to services

Copy link
Collaborator

@theckman theckman left a comment

Choose a reason for hiding this comment

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

Thank you so much for the contribution. I've requested a few changes on this PR. Some of things I requested apply to multiple areas of this PR, but I only commented once to avoid repetition, so please let me know if you have any questions or if any of the feedback is unclear.

Also, could you please squash your commits into a single one? I'm cool with multiple commits if we're adding distinct features in each, but if the follow-up commits fix an earlier commit in the PR I'd rather we just squash them together to avoid the extra commits in the history.

response_play.go Outdated Show resolved Hide resolved
service.go Outdated Show resolved Hide resolved
response_play.go Outdated Show resolved Hide resolved
response_play.go Outdated Show resolved Hide resolved
response_play.go Show resolved Hide resolved
response_play.go Outdated Show resolved Hide resolved
response_play.go Outdated Show resolved Hide resolved
response_play.go Outdated Show resolved Hide resolved
@theckman theckman added this to the v1.6.0 milestone Nov 25, 2021
@petetanton
Copy link
Contributor Author

@theckman thanks for your feedback!
I'll commit some changes and address your comments one-by-one

response_play.go Outdated
Runnability string `json:"runnability"`
ConferenceNumber string `json:"conference_number"`
ConferenceUrl string `json:"conference_url"`
ConferenceType string `json:"conference_type"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

So I think this PR is basically ready to go, but I do have some reservations about this struct (not anything you did) and would love to hear your thoughts on them.

Specifically, because all of these fields are string and not *string, consumers can't do a partial update of the play without potentially erasing data. They will need to set all of the fields on the struct, or those fields will be zeroed out when the API call is made if they aren't required.

A side effect of this is that consumers will almost always need to do a Get + Update operation, even if they are only updating a single field to a static value across all of their response plays.

Should we make these a *string and not a string, and include omitempty, so that folks can do partial updates?

I'm not necessarily asking that we do this, but am instead asking your opinion on it and what you'd maybe do if you were deciding.

Copy link
Contributor Author

@petetanton petetanton Dec 6, 2021

Choose a reason for hiding this comment

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

Thanks @theckman - yes I think that is a good suggestion, shall I make the changes and update the PR?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for the delay, was noodling on this.

Yeah, let's go with changing these up to be pointer values. 👍

@malderete
Copy link

@petetanton thanks for this contribution.
@theckman, could you review/merge this PR, please? I mean, is there anything else that need to be addressed in your opinion?

We're looking forward to use this feature :)

@theckman
Copy link
Collaborator

theckman commented Jan 7, 2022

I'll look at it shortly. Was focused on some of my own projects over the last few weeks.

@theckman
Copy link
Collaborator

theckman commented Jan 7, 2022

For some additional context, while I can merge the contributions of others into the master branch I cannot merge my own. So v1.5.0, and the release this was originally for (v1.6.0), are blocked on PagerDuty employees reviewing my outstanding PRs.

@theckman theckman modified the milestones: v1.6.0, v1.5.0 Jan 8, 2022
response_play.go Outdated Show resolved Hide resolved
@theckman theckman merged commit 623abb3 into PagerDuty:master Jan 16, 2022
@petetanton petetanton deleted the feat/response_plays branch February 3, 2022 15:19
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.

3 participants