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

Set up GitHub ⇔ Jira connector #63

Closed
35 tasks done
Tracked by #42
chadwhitacre opened this issue Oct 28, 2022 · 44 comments
Closed
35 tasks done
Tracked by #42

Set up GitHub ⇔ Jira connector #63

chadwhitacre opened this issue Oct 28, 2022 · 44 comments
Assignees

Comments

@chadwhitacre
Copy link
Member

chadwhitacre commented Oct 28, 2022

To support #42 we want to set up an automation that creates a shadow Jira ticket for issues in the sentry GitHub repo. The purpose of the Jira ticket is to integrate with our existing customer tagging/tracking infrastructure, as well as our sprints and planning for EPD. Most comments and content should stay on GitHub. Ideally we wouldn't create a Jira for every GitHub, but only when we want to start doing something with it in Jira (tag a customer, bring it into a sprint, etc.(?)).

Requirements

  1. When someone applies Trigger: Create Jira Ticket
    1. Check the description for a link to an existing Jira.
    2. Create a new Jira if it doesn't exist, and link it in the description.
    3. Remove Trigger: Create Jira Ticket
  2. When resolved in Jira.
    1. Close on GitHub.
  3. When unresolved in Jira.
    1. Reopen on GitHub.

To Do

  • Evaluate options, integration vendors vs. diy with eng-pipes.
  • Pin down requirements.
  • Investigate Unito a little more.
    • Understand permissions.
    • Try to guess how it will break for us.
    • Pin down pricing.
    • Have a call with Unito.
  • Submit SaaS intake.
  • Go through legal / security review.
  • Buy Unito.
  • Do a little label maintenance.
  • Configure Unito in sentry.
  • Add to remaining repos.
    • self-hosted
    • sentry-docs
    • relay
    • sentry-javascript
    • sentry-php
    • sentry-python
    • sentry-react-native
    • sentry-laravel
    • sentry-cocoa
    • sentry-dart
    • sentry-dotnet
    • sentry-java
    • sentry-native
    • sentry-ruby
    • sentry-symfony
    • sentry-unity
    • sentry-android-gradle-plugin
@BYK
Copy link
Member

BYK commented Oct 29, 2022

Sounds like you may wanna try Pipedream out.

@chadwhitacre
Copy link
Member Author

Yeah, maybe! I saw when you first linked that a while ago (probs on Twitter?). Are you actively using it?

@chadwhitacre
Copy link
Member Author

Options:

  • Pipedream
  • Zapier
  • eng-pipes
  • ???

@BYK
Copy link
Member

BYK commented Oct 31, 2022

@chadwhitacre we've been using it at Formsort for many things and it works quite well. I think for Sentry's scale, you'd need to pay for the pro/team account up front as the daily limit of 66 invocations is a bit too low. The individual dev plan has more headroom for initial testing though.

We did build out that magical "automated changelog based on SaaS deploys powered by Jira tickets" thing we have been thinking about :)

@chadwhitacre
Copy link
Member Author

Why should we use a nocode solution instead of eng-pipes?

@BYK
Copy link
Member

BYK commented Oct 31, 2022

It is not a no-code solution. You do write code but don't have to deal with the boring and error-prone parts like authentication, tokens etc. Arguably, you can probably replace whole eng-pipes with Pipedream workflows.

@chadwhitacre
Copy link
Member Author

@chadwhitacre
Copy link
Member Author

Twitter Followers

Company n
Zapier 70,253
Pipedream 6,524
Unito 1,067
Exalate 21

I checked, we don't already have any of these.

@chadwhitacre
Copy link
Member Author

No-one ever got fired for buying Zapier? :o)

@chadwhitacre
Copy link
Member Author

There's a "New Label in GitHub" event in Zapier but not afaict an "Apply label to issue" event.

@chadwhitacre
Copy link
Member Author

Same with Pipedream, but there is a "create it" option.

Screen Shot 2022-11-11 at 12 10 49 PM

@chadwhitacre
Copy link
Member Author

I looked through Pipedream's issues and PRs and didn't see anything already in the works for this event.

@BYK
Copy link
Member

BYK commented Nov 13, 2022

@chadwhitacre I think you are looking for "New or Updated Issue (Instant)"?

It is essentially the same logic with GitHub actions: new/updated issue -> filter by update type & label

@chadwhitacre
Copy link
Member Author

Afaict Zapier and Pipedream are focused on one-way automations, vs. Unito and Exalate which are focused on bidirectional syncing between objects in disparate systems.

@chadwhitacre
Copy link
Member Author

chadwhitacre commented Nov 15, 2022

Unito was super easy to set up, no code! 😁

org-3392dc2e/testing#1


GH


Jira

@chadwhitacre
Copy link
Member Author

1

2

3

4

5

@chadwhitacre
Copy link
Member Author

Seeing an unexpected result, when I remove the label from the GitHub issue, it moves the Jira ticket to "Done" and vice versa.

Screen Shot 2022-11-15 at 2 26 18 PM

@chadwhitacre chadwhitacre self-assigned this Nov 15, 2022
@chadwhitacre
Copy link
Member Author

Also seeing that Jira is using my auth (I selected OAuth 2 on setup). Not sure what's best, ideal might be to have issue author's auth used, more likely will need to set up a bot account on Jira.

@chadwhitacre
Copy link
Member Author

@chadwhitacre
Copy link
Member Author

@chadwhitacre
Copy link
Member Author

chadwhitacre commented Nov 16, 2022

Note: Before setting up permissions, we recommended you create a Jira bot user.

Well there ya go. :) That's for Jira.

@chadwhitacre
Copy link
Member Author

Pricing

👉 https://unito.io/pricing/ 👈

The word from GTM is that this would be useful across all tier 1 repos. That's currently 2,210 open issues/PRs.

Unito prices are based on "items in sync," and each side counts for one, so if all 2,210 issues are synced from GitHub to Jira then that is 4,420 items. I don't expect all tickets will have a Jira shadow, certainly not off the bat. That said we are likely to see more tickets created in GitHub more rapidly than before. Some history:

Assumptions

  1. We will be able to define "items in sync" as open GitHub issues with Sync: Jira label applied, across 27 repos.
  2. Eyeballing on the above chart:
    • 3,600 total new in getsentry in 2019
    • 6,000 in 2020 / 3,600 = 1.67
    • 7,200 in 2021 / 6,000 = 1.2
    • 9,000 in 2022 / 7,200 = 1.25
  3. So that is 1.2x – 1.67x growth yoy in getsentry repo. Let's assume roughly the same rate in other repos.
  4. How many issues will have the Sync: Jira label applied? 10%? 50%? 80%?

Scenarios

  • lo - 10% labeled, 1.2x growth
  • mid - 50% labeled, 1.4x growth
  • hi - 80% labeled, 1.7x growth

Base is 4,420, calculation is "items in sync".

scenario now now + 1yr now + 2 yrs now + 3 yrs
lo 442 530 637 764
mid 2,210 3,094 4,331 6,064
hi 3,536 6,011 10,219 17,372

I'm inclined to lean towards the higher estimate, because the whole point of this exercise is to get more issues created in GitHub, both by GTM teams and by customers directly. On the other hand it's not like we're going to label 3,500 issues immediately out of the gate. We'll start with zero, maybe label a couple hundred in an initial migration, and then grow from there.

Plans

The two relevant plans are:

Plan Items $/yr Sync Lag
Team 150 – 2,000 288 – 1,668 ~6 minutes
Company 1,500 – 15,000 2,376 – 11,700 ~20 seconds

Conclusion

I think we should go for the low end of the Company plan. We don't know exactly what to expect but if we're successful we should see significant growth this year. Remember that every new labeled GitHub issue counts for two items in sync, so we only need to label/sync 1,000 of our existing 2,210 issues (let alone sync new issues) in order to max out the Team plan. The sub-minute lag time will be beneficial for maintaining flow state for the ICs creating tickets.

@chadwhitacre
Copy link
Member Author

Had a call w/ sales, open questions:

  1. Is it expected behavior to change status in Jira when the label is removed/re-applied? If so, is there a workaround to prevent the Jira change?
  2. Are checkbox tasks in GitHub indeed considered "items in sync," or only if/when converted to issues?

@chadwhitacre
Copy link
Member Author

Is it expected behavior to change status in Jira when the label is removed/re-applied?

Maaaaaybe?

If so, is there a workaround to prevent the Jira change?

They're offering a manual workaround once we have the prod flow ready.

Are checkbox tasks in GitHub indeed considered "items in sync"?

No.

@chadwhitacre
Copy link
Member Author

chadwhitacre commented Nov 17, 2022

One limitation with Unito is that we can't sync items after they've already been created. The workflow would have to be to recreate in GitHub and then go from there.

@chadwhitacre
Copy link
Member Author

What happens if we edit the link in the description? 🤔

@chadwhitacre
Copy link
Member Author

I clobbered the footer in both GH and Jira for org-3392dc2e/testing#5 and found that the connection appears to survive. Pure gravy.

@chadwhitacre
Copy link
Member Author

Working through negotiations with Unito now, making progress.

@chadwhitacre chadwhitacre mentioned this issue Nov 22, 2022
14 tasks
@chadwhitacre
Copy link
Member Author

NDA signed, proceeding with Security review.

@chadwhitacre
Copy link
Member Author

chadwhitacre commented Nov 29, 2022

Security review turned up a couple questions that we are waiting for answers on.

In the mean time here are a few other bidirectional sync vendors:

@chadwhitacre
Copy link
Member Author

SO CLOSE

@chadwhitacre
Copy link
Member Author

Compliance passed! Now to purchase and configure ...

@chadwhitacre chadwhitacre changed the title Set up GitHub => Jira connector Set up GitHub ⇒ Jira connector Dec 12, 2022
@chadwhitacre chadwhitacre changed the title Set up GitHub ⇒ Jira connector Set up GitHub ⇔ Jira connector Dec 12, 2022
@chadwhitacre
Copy link
Member Author

Purchased. Installed in GitHub. Need help with Jira.

@chadwhitacre
Copy link
Member Author

Got help with Jira!

chadwhitacre added a commit to getsentry/sentry that referenced this issue Dec 19, 2022
chadwhitacre added a commit to getsentry/sentry that referenced this issue Dec 19, 2022
@chadwhitacre
Copy link
Member Author

Installed for sentry! 💃

@chadwhitacre
Copy link
Member Author

Add to remaining repos.

Punting on this until there is demand. sentry-javascript has a Jira label already, will need to coordinate with them on that.

@chadwhitacre
Copy link
Member Author

Put the thing in Advanced Options to avoid status jump on unlabel.

Punting. Shouldn't be common.

@chadwhitacre
Copy link
Member Author

Dropping getsentry/sentry#42452 from scope here so I can close. 💃

@chadwhitacre
Copy link
Member Author

jk reopening to roll out to remaining repos, first one was in sentry-dart lol

@chadwhitacre chadwhitacre reopened this Dec 20, 2022
@chadwhitacre
Copy link
Member Author

I've (manually) added the label in all of the Core and SDK repos. I don't think we need this in Shared repos, nobody from GTM should care about those.

@chadwhitacre
Copy link
Member Author

I removed the Unito GitHub App from these repos we don't care to track:

  1. snuba
  2. snuba-sdk
  3. responses
  4. symbolic
  5. symbolicator
  6. craft
  7. arroyo
  8. cdc
  9. wal2json

@chadwhitacre
Copy link
Member Author

Confirmed they do care about Relay (makes sense since it's customer-facing).

@chadwhitacre
Copy link
Member Author

Done rolling out to other repos.

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

No branches or pull requests

2 participants