Skip to content

Conversation

migmartri
Copy link
Member

@migmartri migmartri commented Jul 11, 2023

As part of #223, we want to enable the controlplane to be able to store other types of CAS_Backend.

  • adds migrations to rename current oci_repository DB table to cas_backends.
    • it includes now a provider property and a default property
    • This default property is now used to load the default cas backend for the org
    • If the instance already has data in the table, it will keep it and mark is as OCI
  • Updates the data and biz layer to meet that new DB schema
  • Deprecates the oci_repositories API endpoint. It will get replaced by a cas_backends one.

All of that is backwards compatible.

Note for reviewers. This is a big patch but note that most of the code is generated.

instead ptal at

  • migrations/migrate
  • biz/cas_backend.go

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri requested a review from danlishka July 11, 2023 14:41
out: .
opt: paths=source_relative,lang=go
- remote: buf.build/stephenh/plugins/ts-proto
- plugin: buf.build/community/stephenh-ts-proto:v1.151.1
Copy link
Member Author

Choose a reason for hiding this comment

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

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Copy link
Member

@danlishka danlishka left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri merged commit f3dec39 into chainloop-dev:main Jul 12, 2023
@migmartri migmartri deleted the rename-cas-backend branch July 12, 2023 09:33
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