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: store artifacts in OCI registry #3328

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ jobs:
run: just pnpm-install
- name: Build Language Plugins
run: just build-language-plugins
- name: Pull Registry
run: docker image pull registry:2
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should just use docker compose for this yeah?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason it was failing to pull on CI, and I have no idea why. Explicitly pulling it worked for some reason. I can remove this and try again in case it was a transient failure, but it was very odd.

- name: Console e2e
run: just e2e-frontend
integration-shard:
Expand Down
10 changes: 4 additions & 6 deletions backend/controller/artefacts/artefact.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"io"

"github.com/TBD54566975/ftl/internal/model"
"github.com/TBD54566975/ftl/internal/sha256"
)

Expand All @@ -31,15 +30,14 @@ type ReleaseArtefact struct {
Executable bool
}

type Registry interface {
type Service interface {

// GetDigestsKeys locates the `digests` corresponding `ArtefactKey`s and identifies the missing ones
GetDigestsKeys(ctx context.Context, digests []sha256.SHA256) (keys []ArtefactKey, missing []sha256.SHA256, err error)

// Upload pushes the specified media, and metadata, to the registry and returns the computed digest
Upload(context context.Context, artefact Artefact) (sha256.SHA256, error)

// Download performs a streaming download of the artefact identified by the supplied digest
Download(context context.Context, digest sha256.SHA256) (io.ReadCloser, error)
// GetReleaseArtefacts locates the artefacts metadata corresponding with the specified release
GetReleaseArtefacts(ctx context.Context, releaseID int64) ([]ArtefactKey, error)
// AddReleaseArtefact associates the given `release` with the artefact associated with the given `digest`
AddReleaseArtefact(ctx context.Context, key model.DeploymentKey, ra ReleaseArtefact) error
}
137 changes: 0 additions & 137 deletions backend/controller/artefacts/dal_registry.go

This file was deleted.

31 changes: 0 additions & 31 deletions backend/controller/artefacts/internal/sql/db.go

This file was deleted.

5 changes: 0 additions & 5 deletions backend/controller/artefacts/internal/sql/models.go

This file was deleted.

22 changes: 0 additions & 22 deletions backend/controller/artefacts/internal/sql/querier.go

This file was deleted.

29 changes: 0 additions & 29 deletions backend/controller/artefacts/internal/sql/queries.sql

This file was deleted.

Loading
Loading