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

Handle the old key when writing configuration, but write the new one #3575

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Jun 11, 2024

Summary

Our current configuration key for the GH app provider is "github-app" which
is problematic to use as a key in protobuf. Let's rename the key to
"github_app", but do it in steps - first, this patch ensures that any
new providers are written with underscore, but the old providers
continue to work. As the next step, we're going to migrate the database
records in order to not risk a race where we migrate the database but
the code would still be creating providers with the old key.

Related: #3569

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

manual + adjusted unit tests

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

Our current configuration key for the GH app provider is "github-app" which
is problematic to use as a key in protobuf. Let's rename the key to
"github_app", but do it in steps - first, this patch ensures that any
new providers are written with underscore, but the old providers
continue to work. As the next step, we're going to migrate the database
records in order to not risk a race where we migrate the database but
the code would still be creating providers with the old key.

Related: mindersec#3569
@jhrozek jhrozek requested a review from a team as a code owner June 11, 2024 08:46
@coveralls
Copy link

Coverage Status

coverage: 53.158% (+0.02%) from 53.137%
when pulling 575ad82 on jhrozek:github_app_underscore
into 8e16fe5 on stacklok:main.

@jhrozek jhrozek merged commit 16f95ce into mindersec:main Jun 11, 2024
21 checks passed
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.

3 participants