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: added flag migrations as yaml #583

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pixeldrew
Copy link

@pixeldrew pixeldrew commented Aug 1, 2024

Description

Add service end point to load flag, variants and segments from yaml files

Motivation and Context

I needed the ability to deploy flags as code, I paired these changes with a CI task that will upload a repository of yaml migration files that are written by developers. This allows us to migrate flags through environments with stable keys and to have the flags/changes peer reviewed.

How Has This Been Tested?

Tested using sqlite and mysql, on a osx environment.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@pixeldrew pixeldrew force-pushed the feature-migrations branch 7 times, most recently from 21ae5e9 to 9176179 Compare August 7, 2024 23:39
@pixeldrew
Copy link
Author

@nothing0012 can you review this please?

get:
tags:
- migration
operationId: runMigrations
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, if it's GET, should this be something like getMigrations?

Copy link
Author

Choose a reason for hiding this comment

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

yeah, I was a little unsure on this, i'm using this as endpoint to run the migration process. It will only run the migrations if finds new files in the directory

docs/flagr_migrations.md Show resolved Hide resolved
pkg/handler/flag_migrations.go Outdated Show resolved Hide resolved
docs/flagr_migrations.md Outdated Show resolved Hide resolved
pkg/handler/flag_migrations_test.go Show resolved Hide resolved
flag migrations as yaml
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