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

feat(flags): add python onboarding sidebar #80871

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michellewzhang
Copy link
Member

@michellewzhang michellewzhang commented Nov 15, 2024

what does this pr do?

flow walkthrough

The sidebar is triggered by the "set up integration" button on the feature flags table on issue details.

SCR-20241115-nhtq

It opens a flyout sidebar, which explains onboarding instructions for how to set up feature flag integrations. Depending on whether OpenFeature is selected (which allows for an additional dropdown to pick another provider) or another SDK, the instructions will vary.

LD:

SCR-20241115-njpv

OpenFeature with LD:

SCR-20241115-nkwd

signing secret

At the bottom of the sidebar is a spot to post a signing secret, which is what we use to verify the integration. This posts to the /signing-secret/ endpoint:

sentry/src/sentry/api/urls.py

Lines 2072 to 2076 in 9dfbc5a

re_path(
r"^(?P<organization_id_or_slug>[^\/]+)/flags/hooks/provider/(?P<provider>[\w-]+)/signing-secret/$",
OrganizationFlagsWebHookSigningSecretEndpoint.as_view(),
name="sentry-api-0-organization-flag-hooks-signing-secret",
),

Screen.Recording.2024-11-15.at.3.10.45.PM.mov

when the token is saved, a success banner appears:

SCR-20241115-nmxv

video demos

triggering from issue details:

of.mov

example of what it would look like if OpenFeature had multiple options:

Screen.Recording.2024-11-15.at.2.47.54.PM.mov

todo (this PR):

  • tests
  • fix/test the secret endpoint
  • fill in links for docs

todo (followups)

  • javascript onboarding
  • figure out CTA details (another way the sidebar can be triggered)
  • if we detect that event.contexts.flags is not undefined, we should hide the first half of the onboarding as specified in the designs
  • analytics charts

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 15, 2024
Copy link

codecov bot commented Nov 15, 2024

Bundle Report

Changes will increase total bundle size by 22.17kB (0.07%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
app-webpack-bundle-array-push 31.91MB 22.17kB (0.07%) ⬆️

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 34.45378% with 78 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ents/featureFlags/featureFlagOnboardingSidebar.tsx 39.65% 35 Missing ⚠️
...ents/featureFlags/onboardingIntegrationSection.tsx 20.00% 20 Missing ⚠️
...vents/featureFlags/featureFlagOnboardingLayout.tsx 18.75% 13 Missing ⚠️
...s/events/featureFlags/useFeatureFlagOnboarding.tsx 50.00% 6 Missing ⚠️
static/app/gettingStartedDocs/python/python.tsx 25.00% 3 Missing ⚠️
static/app/components/sidebar/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #80871      +/-   ##
==========================================
- Coverage   78.41%   78.40%   -0.01%     
==========================================
  Files        7209     7212       +3     
  Lines      319622   319690      +68     
  Branches    44006    44013       +7     
==========================================
+ Hits       250642   250664      +22     
- Misses      62594    62640      +46     
  Partials     6386     6386              

<div>
<LinkButton
size="sm"
href="" // TODO: docs link
Copy link
Member Author

Choose a reason for hiding this comment

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

wasn't sure what link to use here, i don't think we have a general feature flag page in docs yet

disabled={setupMode() === 'other'}
/>
),
link: <ExternalLink href="" />, // TODO: link
Copy link
Member Author

Choose a reason for hiding this comment

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

wasn't sure whether to use the OpenFeature site here (https://openfeature.dev/) or the sentry specific docs (https://docs.sentry.io/platforms/python/integrations/openfeature/)

<div>
<LinkButton
size="sm"
href="" // TODO: docs link
Copy link
Member Author

Choose a reason for hiding this comment

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

same here, not sure what docs to use

@michellewzhang michellewzhang marked this pull request as ready for review November 15, 2024 23:25
@michellewzhang michellewzhang requested review from a team as code owners November 15, 2024 23:25
@maikool
Copy link

maikool commented Nov 15, 2024

Wow great work Michelle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants