-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Include closed milestones in milestones stream #300
feat: Include closed milestones in milestones stream #300
Conversation
8cdd859
to
c1126e0
Compare
@TrishGillett wdyt about putting behind a (new) setting to make it opt-in? |
I'd be down for that! If we can make it non-disruptive for existing users that's a big win. Are you thinking of:
|
d35f298
to
a11c1a2
Compare
I think this is my preference. Not ideal that a top-level setting affects the behavior of a stream, but there's some precedence in the ecosystem so I think we can live with it. |
Yeah, it's not my favourite either. I think the least-bad way to do a top-level setting might be to structure it in a way where we won't hate ourselves later if more cases like this come up in other streams and we need to add more. (Full disclosure: I've been looking into Github's GraphQL API lately and thinking about how there may be reasons to make GraphQL versions of some streams, and I can picture wanting to add more stream options in that case since GraphQL offers a lot more flexibility. For example, a GraphQL issues stream could support an end date, and hopefully also an option to only get data about issues, instead of the default which includes data about PRs too.) For a pattern, how would you feel about one of these:
Option 2
|
d2da696
to
5638c38
Compare
Hey @TrishGillett, sorry for the delay in reviewing. I like Option 1 😄. Wdyt of shorter names, e.g. config:
milestones:
state: all
all_streams:
thing: value_1
other_thing: value_2 Otherwise I think "nested" is the right approach. |
Cool! Will implement. 🙌 |
Pushed an update. This can be considered fair game for review, although it shouldn't be merged just yet because I still need to do a test run and confirm it works as expected. |
1df0367
to
24aa4ce
Compare
e2e33d2
to
e72085a
Compare
e72085a
to
7a5292b
Compare
Done test runs:
|
196814e
to
5a291a6
Compare
83287dc
to
b8eb8eb
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for your patience @TrishGillett 😄
⚠️ This may be a disruptive change for some users who are only interested in open milestones and are relying on the fact that this tap only pulls open milestones. These existing users would need to apply a stream map or downstream filter in order to continue excluding closed milestones.Update: we've landed on a way to implement it as optional, with the stream still extracting only open milestones by default.Why is it worth making this potentially disruptive change?
If a user is using this tap to maintain and update a data source about milestones and their states/attributes, but each run only extracts data about open milestones, all past and current milestones will show up as open whether they are open or closed. Other fields (especially counts of open/closed issues, closed_at, updated_at) would contain potentially stale data corresponding to the last time they were observed before they were closed. By extracting data about all milestones, previously extracted milestones which are now closed can be updated to a closed state and have any other changed fields updated as well.
The implementation approach for this change follows the pattern used in streams like IssuesStream and PullRequestsStream when diverging from the default query parameters.