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: versioned feature states #2688

Merged
merged 49 commits into from
Feb 15, 2024
Merged

Conversation

kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Aug 28, 2023

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

  • I have run pre-commit to check linting
  • 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

  • Opt into feature state versioning via environment settings
  • Create versioned segment overrides, environment feature state updates and multivariate options

What this does not fully cover, this should follow in an upcoming PR

  • Change Requests workflow for versioning
  • Creating/Deleting Multiviariate options

How did you test this code?

  • e2e tests that go through creating tests with feature versions enabled to check for regression

  • Created and updated feature state remote config
    image

  • Updated feature enabled state
    image

  • Created a segment override
    image

  • Update segment override
    Note: there is currently an API issue @matthewelwell is looking into.

  • Update multivariate weightings
    Note: this will probably change in the future, different feature versions could technically have totally different multivariate options, this currently only diffs the options that exist in the live feature.

image

# Conflicts:
#	frontend/common/types/requests.ts
#	frontend/common/types/responses.ts
…' into feature/versioned_feature_states

# Conflicts:
#	frontend/common/types/responses.ts
# Conflicts:
#	frontend/web/components/SegmentOverrides.js
#	frontend/web/components/modals/ConfirmToggleEnvFeature.tsx
#	frontend/web/components/pages/EnvironmentSettingsPage.js
@vercel
Copy link

vercel bot commented Aug 28, 2023

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 Feb 15, 2024 9:26am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 9:26am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 15, 2024 9:26am

@kyle-ssg kyle-ssg marked this pull request as draft August 28, 2023 16:11
@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Aug 28, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 28, 2023

Uffizzi Preview deployment-46127 was deleted.

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

  1. Enable feature versioning settings for "Production" environment and see feature history list.
  2. Switch to "Development" environment.
  3. Click on feature history button.
  4. Shown below error. If scaleup is required then the first environment shouldn't have been enabled. On the other hand if scaleup isn't required then a different message should be displayed when feature versioning isn't enabled for an environment.
image

# Conflicts:
#	frontend/common/services/useAuditLogItem.ts
#	frontend/common/types/responses.ts
#	frontend/e2e/tests/segment-test.ts
#	frontend/package-lock.json
#	frontend/web/components/AuditLog.tsx
#	frontend/web/routes.js
@kyle-ssg
Copy link
Member Author

kyle-ssg commented Feb 7, 2024

  1. Enable feature versioning settings for "Production" environment and see feature history list.
  2. Switch to "Development" environment.
  3. Click on feature history button.
  4. Shown below error. If scaleup is required then the first environment shouldn't have been enabled. On the other hand if scaleup isn't required then a different message should be displayed when feature versioning isn't enabled for an environment.
image

This is expected, envionments that don't have versioning enabled will be sent to the audit log page.

Edit: after discussion, it was decided that it's better to separate audit log and history actions, you can now do either of these.

@kyle-ssg
Copy link
Member Author

kyle-ssg commented Feb 7, 2024

Above issues are resolved.

@dabeeeenster
Copy link
Contributor

OK yep my issues are fixed. Is there anything else blocking this going live?

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

My issues have been addressed.

@matthewelwell
Copy link
Contributor

matthewelwell commented Feb 9, 2024

OK yep my issues are fixed. Is there anything else blocking this going live?

Well, yes - this

image

@kyle-ssg

(but I love that we have new E2E tests here!)

# Conflicts:
#	frontend/common/types/requests.ts
#	frontend/web/components/tables/TableFilterItem.tsx
@kyle-ssg
Copy link
Member Author

kyle-ssg commented Feb 15, 2024

My bad, was just a duplicate data-test attribute added from latest feedback to split audit log links from versioning links. I think we're good to go when tests pass.

@kyle-ssg kyle-ssg added this pull request to the merge queue Feb 15, 2024
Merged via the queue into main with commit c02562e Feb 15, 2024
21 of 24 checks passed
@kyle-ssg kyle-ssg deleted the feature/versioned_feature_states branch February 15, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants