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(medusa, utils): Allow object feature flags #4701

Merged
merged 9 commits into from
Aug 7, 2023

Conversation

olivermrbl
Copy link
Contributor

Feature flags can be set as follows:

Environment variables

MEDUSA_FF_ANALYTICS=true
MEDUSA_FF_WORKFLOWS=createProducts,addShippingMethods

Project config

{
  featureFlags: {
    analytics: true,
    workflows: {
      createProducts: true,
      addShippingMethods: true,
    }
  }
}

@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2023

🦋 Changeset detected

Latest commit: 65bad34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@medusajs/medusa Patch
@medusajs/types Patch
@medusajs/utils Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 6, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Aug 7, 2023 9:07am

@olivermrbl olivermrbl marked this pull request as ready for review August 6, 2023 10:44
@olivermrbl olivermrbl requested a review from a team as a code owner August 6, 2023 10:44
@olivermrbl olivermrbl force-pushed the feat/feature-flag-nested branch from ceaae51 to 33bbbae Compare August 6, 2023 10:46
Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

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

Nice! Just added one thought.

@olivermrbl
Copy link
Contributor Author

@adrien2p – we should probably switch out the core flag router with the one from utils soon to not maintain several

@adrien2p
Copy link
Member

adrien2p commented Aug 6, 2023

@olivermrbl yes definitely, i didn't thought we would change it that quickly 😅 maybe you can include it here? Or ill do it tomorrow

@olivermrbl
Copy link
Contributor Author

maybe you can include it here?

Will do it in a follow up tomorrow 👍

@olivermrbl olivermrbl force-pushed the feat/feature-flag-nested branch from 150741a to c491dea Compare August 6, 2023 13:24
@olivermrbl olivermrbl force-pushed the feat/feature-flag-nested branch from f14de2c to 42a6282 Compare August 6, 2023 13:34
@olivermrbl
Copy link
Contributor Author

@adrien2p, will you give this a review? Would like to cut a release today with the create-products endpoint guarded by this feature flag

@adrien2p
Copy link
Member

adrien2p commented Aug 7, 2023

Yes i will @olivermrbl

Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

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

Very nice 💪 few small todo's

@olivermrbl olivermrbl force-pushed the feat/feature-flag-nested branch from ad87af9 to 81425ac Compare August 7, 2023 08:42
@olivermrbl olivermrbl requested a review from adrien2p August 7, 2023 08:46
@kodiakhq kodiakhq bot merged commit 5c60aad into develop Aug 7, 2023
@kodiakhq kodiakhq bot deleted the feat/feature-flag-nested branch August 7, 2023 09:38
@github-actions github-actions bot mentioned this pull request Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants