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(feature flags): add endpoint for copying a flag to multiple projects #18421

Merged
merged 26 commits into from
Nov 7, 2023

Conversation

jurajmajerik
Copy link
Contributor

Changes

Add an endpoint for copying a flag to multiple projects.

POST /api/organizations/:org_id/feature_flags/copy_flags

Ability to copy multiple flags at once will follow.

How did you test this code?

API tests

@jurajmajerik jurajmajerik changed the title feat(feature flags): add endpoint for copying a flag for multiple projects feat(feature flags): add endpoint for copying a flag to multiple projects Nov 6, 2023
Copy link
Collaborator

@neilkakkar neilkakkar left a comment

Choose a reason for hiding this comment

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

so far so good!

posthog/api/organization_feature_flag.py Outdated Show resolved Hide resolved
posthog/api/organization_feature_flag.py Outdated Show resolved Hide resolved
posthog/api/organization_feature_flag.py Outdated Show resolved Hide resolved
posthog/api/organization_feature_flag.py Show resolved Hide resolved
posthog/api/organization_feature_flag.py Outdated Show resolved Hide resolved
posthog/api/test/test_organization_feature_flag.py Outdated Show resolved Hide resolved
posthog/api/test/test_organization_feature_flag.py Outdated Show resolved Hide resolved
@neilkakkar
Copy link
Collaborator

(sorry if it seems I'm being too pedantic, but with create-update operations that automatically happen, really need to make sure things are solid and all code paths are tested so this doesn't come back to bite us)

Copy link
Collaborator

@neilkakkar neilkakkar left a comment

Choose a reason for hiding this comment

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

great!

"usage_dashboard": "__ignore__",
"is_simple_flag": True,
"experiment_set": [],
"surveys": [],
Copy link
Collaborator

Choose a reason for hiding this comment

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

in a follow up, add survey/experiment/early-access features linked to this flag, and ensure they aren't overridden :)

@jurajmajerik jurajmajerik enabled auto-merge (squash) November 7, 2023 21:16
@jurajmajerik jurajmajerik merged commit df1d102 into master Nov 7, 2023
67 checks passed
@jurajmajerik jurajmajerik deleted the fix/feature-flags-filters branch November 7, 2023 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants