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

Git based workflows #244

Open
maxgurewitz opened this issue Jun 19, 2023 · 0 comments
Open

Git based workflows #244

maxgurewitz opened this issue Jun 19, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@maxgurewitz
Copy link
Member

maxgurewitz commented Jun 19, 2023

This issue will describe the work that needs to go into implementing git based workflows, as described in Dittofeed's docs. This is a major initiative and will require several new internal features.

Resource Mapping

A way to map database resources to and from yaml configuration.

  • A function for mapping resource values held in postgres to a YAML based dsl / config, resourcesToConfig.
  • A function for diffing resource config files and updating resource values held in postgres, updateResourcesFromConfig.
  • A new branch column on resource data models, updating their unique columns from @@unique([workspaceId, name]) to @@unique([workspaceId, name, branch]). This value would default to "main".

Authorization

An authorization scheme to protect resources on the main branch. When workspaces are "protected", you should not be able to update resources on the main branch directly.

  • A function canUpdateResource which accounts for the branch of the resource that's being updated.
  • Using this function in the API to prevent updates to protected resources.
  • Incorporate this function into the dashboard, to prevent forbidden updates.
  • A way to make a workspace protected in the settings.

Branching

  • An API endpoint for creating new branches, and switching between them, to be integrated into the dashboard.
  • An API endpoint for deleting branches, to be integrated into the dashboard.
  • An API endpoint for rendering diffs between workspace branches.

Github App.

We will need a git app reading from, and writing to github. This app will be used to write config to git when changes are made, and read them back from main.

The previously discussed updateResourcesFromConfig will be called on the main branch when changes to the config are made.

@maxgurewitz maxgurewitz added the enhancement New feature or request label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant