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: Add sane defaults for segment_operators, integration_data, saml flags #4554

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

rolodato
Copy link
Member

@rolodato rolodato commented Aug 28, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Add default values to the FoF flags segment_operators, integration_data, and saml. This avoids the following scenario:

  1. Customer is setting up self-hosted environment, everything works fine
  2. FoF environment is created with only a few specific flags that the customer wants to modify
  3. Creating segments and trying to use the "Single Sign-On" button at the login page no longer works, unless the segment_operators and saml flags are created with the correct values.

The flags all still work as usual, but don't break anything if they don't exist in a FoF environment.

integration_data is a bonus to have integrations work out of the box.

How did you test this code?

In a local environment, set up FoF but do not create any flags. These should still work:

  • Creating segments
  • Viewing and creating integrations
  • Clicking the "Single Sign-On" button in the home page

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 9:21pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 9:21pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 9:21pm

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Aug 28, 2024
@github-actions github-actions bot added the feature New feature or request label Aug 28, 2024
@rolodato rolodato marked this pull request as ready for review August 28, 2024 21:22
@rolodato rolodato requested a review from a team as a code owner August 28, 2024 21:22
@rolodato rolodato requested review from kyle-ssg and removed request for a team August 28, 2024 21:22
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Aug 28, 2024
Copy link
Contributor

github-actions bot commented Aug 28, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-4554 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-4554 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-4554 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4554 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4554 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-4554 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Aug 28, 2024

Uffizzi Preview deployment-55668 was deleted.

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

I've added one specific comment, but I'm also interested to know if / how we plan to keep the defaults in sync with any changes to the flags in production.

I'm also keen to know @kyle-ssg 's opinion on this of course.

@rolodato
Copy link
Member Author

I'm also interested to know if / how we plan to keep the defaults in sync with any changes to the flags in production.

  • segment_operators: I see 2 options here:
    1. Keep making manual changes to the hardcoded defaults at the same time we make changes to production. Changes to segment operators are rare enough that this is probably fine
    2. Deprecate this flag and plan to remove it. This seems awkward to do given the dependency on production SaaS - one way I could see this happening is by passing in a transient version trait while fetching FoF flags, and creating a segment override on segment_operators that removes its value if this trait version is set. This keeps old instances working, lets users customise segment_operators on their own FoF, and frees us from needing to make changes to this flag again.
  • integration_data: Same options as for segment_operators
  • saml: This flag will probably never be changed in production

@rolodato rolodato added this pull request to the merge queue Aug 30, 2024
Merged via the queue into main with commit ff5c0ed Aug 30, 2024
49 checks passed
@rolodato rolodato deleted the fix/default-segment-operators branch August 30, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants