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: schedule feature flag changes #467

Merged
merged 51 commits into from
Aug 21, 2023
Merged

✨ feat: schedule feature flag changes #467

merged 51 commits into from
Aug 21, 2023

Conversation

cosmos-explorer
Copy link
Contributor

@cosmos-explorer cosmos-explorer commented Jul 30, 2023

create new version when archive, enable, disable, copy flags,
Do nothing when a flag is deleted

Run the following script to add id to condition

db.FeatureFlags.updateMany(
  {},
  [
    {
      $set: {
        rules: {
          $map: {
            input: "$rules",
            as: "rule",
            in: {
              $mergeObjects: [
                "$$rule",
                {
                  conditions: {
                    $map: {
                      input: "$$rule.conditions",
                      as: "condition",
                      in: {
                        $mergeObjects: [
                          "$$condition",
                          {
                            _id: UUID().toString().split('"')[1]
                          }
                        ]
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]
)

@cosmos-explorer cosmos-explorer self-assigned this Jul 30, 2023
@deleteLater deleteLater changed the title ✨ Feat: support scheduling flag changes ✨ feat: schedule feature flag changes Aug 3, 2023
@deleteLater deleteLater added enhancement New feature or request ui api labels Aug 3, 2023
Copy link
Contributor

@deleteLater deleteLater left a comment

Choose a reason for hiding this comment

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

LGTM

@deleteLater
Copy link
Contributor

More UI/UX improvements will be done in other PRs

@deleteLater deleteLater merged commit 9b12a88 into main Aug 21, 2023
2 checks passed
@deleteLater deleteLater deleted the feat/schedule branch August 21, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants