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: add CreateRepositoryTag endpoint #8

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

jvallesm
Copy link
Collaborator

@jvallesm jvallesm commented Mar 27, 2024

Because

  • Distribution registry doesn't hold digest or timestamp info for tags

This commit

  • Implements the tag creation endpoint in artifact-backend, which will be used by api-gateway when it detects an image push has finished successfully.

@jvallesm jvallesm self-assigned this Mar 27, 2024
Copy link

linear bot commented Mar 27, 2024

@jvallesm jvallesm marked this pull request as ready for review March 27, 2024 12:43
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.05%. Comparing base (6cc2d8d) to head (a6bb41d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   94.44%   96.05%   +1.60%     
==========================================
  Files           1        2       +1     
  Lines          54       76      +22     
==========================================
+ Hits           51       73      +22     
  Misses          2        2              
  Partials        1        1              
Flag Coverage Δ
unittests 96.05% <100.00%> (+1.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jvallesm
Copy link
Collaborator Author

QA ✅

  • Update an existing tag -> modifies digest and timestamp
grpcurl -plaintext \
-proto ./artifact/artifact/v1alpha/artifact_private_service.proto \
-import-path ~/Code/go/src/github.com/instill-ai/pipeline-backend/integration-test/proto/vdp/pipeline/v1beta/ \
-import-path . \
-d '{"tag":{"name": "repositories/admin/hello-world/tags/latest", "id":"latest", "digest":"bar"}}' \
localhost:8085 artifact.artifact.v1alpha.ArtifactPrivateService/CreateRepositoryTag | jq
{
  "tag": {
    "name": "repositories/admin/hello-world/tags/latest",
    "id": "latest",
    "digest": "bar",
    "updateTime": "2024-03-27T12:39:05.749116180Z"
  }
}
  • Create a new tag
grpcurl -plaintext \
-proto ./artifact/artifact/v1alpha/artifact_private_service.proto \
-import-path ~/Code/go/src/github.com/instill-ai/pipeline-backend/integration-test/proto/vdp/pipeline/v1beta/ \
-import-path . \
-d '{"tag":{"name": "repositories/admin/hello-world/tags/1.0.14", "id":"1.0.14", "digest":"zot"}}' \
localhost:8085 artifact.artifact.v1alpha.ArtifactPrivateService/CreateRepositoryTag | jq
{
  "tag": {
    "name": "repositories/admin/hello-world/tags/1.0.14",
    "id": "1.0.14",
    "digest": "zot",
    "updateTime": "2024-03-27T12:39:49.198180839Z"
  }
}
  • List tags shows created info
grpcurl -plaintext \
-proto ./artifact/artifact/v1alpha/artifact_private_service.proto \
-import-path ~/Code/go/src/github.com/instill-ai/pipeline-backend/integration-test/proto/vdp/pipeline/v1beta/ \
-import-path . \
-d '{"parent": "repositories/admin/hello-world"}' \
localhost:8085 artifact.artifact.v1alpha.ArtifactPrivateService/ListRepositoryTags | jq
{
  "tags": [
    {
      "name": "repositories/admin/hello-world/tags/0.1.1-beta",
      "id": "0.1.1-beta"
    },
    {
      "name": "repositories/admin/hello-world/tags/0.1.0",
      "id": "0.1.0"
    },
    {
      "name": "repositories/admin/hello-world/tags/1.0.1",
      "id": "1.0.1"
    },
    {
      "name": "repositories/admin/hello-world/tags/0.1.3",
      "id": "0.1.3"
    },
    {
      "name": "repositories/admin/hello-world/tags/0.1.1",
      "id": "0.1.1"
    },
    {
      "name": "repositories/admin/hello-world/tags/0.1.4",
      "id": "0.1.4"
    },
    {
      "name": "repositories/admin/hello-world/tags/1.0.12",
      "id": "1.0.12"
    },
    {
      "name": "repositories/admin/hello-world/tags/1.0.14",
      "id": "1.0.14",
      "digest": "zot",
      "updateTime": "2024-03-27T12:39:49.198180Z"
    },
    {
      "name": "repositories/admin/hello-world/tags/latest",
      "id": "latest",
      "digest": "bar",
      "updateTime": "2024-03-27T08:22:14.728862Z"
    }
  ]
}

@jvallesm jvallesm merged commit 61bc325 into main Apr 1, 2024
16 checks passed
@jvallesm jvallesm deleted the jvalles/ins-3993-add-createrepositorytag-endpoint branch April 1, 2024 05:17
jvallesm pushed a commit that referenced this pull request Apr 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.2.0-alpha](v0.1.0-alpha...v0.2.0-alpha)
(2024-04-02)


### Features

* add CreateRepositoryTag endpoint
([#8](#8))
([61bc325](61bc325))
* aggregate tag list with database info
([#7](#7))
([6cc2d8d](6cc2d8d))
* create artifact database if it does not exist
([#4](#4))
([787a4ad](787a4ad))
* fetch repository tags from registry
([#6](#6))
([3568735](3568735))


### Bug Fixes

* expose private API on private port
([#9](#9))
([9ef4b03](9ef4b03))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Yougigun pushed a commit that referenced this pull request Sep 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.14.0-alpha](v0.13.2-alpha...v0.14.0-alpha)
(2024-09-13)


### Features

* add CreateRepositoryTag endpoint
([#8](#8))
([61bc325](61bc325))
* aggregate tag list with database info
([#7](#7))
([6cc2d8d](6cc2d8d))
* **artifact:** add minIO retry and file deletion
([#89](#89))
([8f391f0](8f391f0))
* **artifact:** update protogen-go
([c8d41a7](c8d41a7))
* **artifact:** use retrievable to decide if chunk can be return
([#54](#54))
([bde3e85](bde3e85))
* **catalog:** add file catalog api
([#73](#73))
([c30317f](c30317f))
* **catalog:** check the user tier for catalog limit
([#70](#70))
([d35a96f](d35a96f))
* **catalog:** implement conversation and message api
([#77](#77))
([e02b1f1](e02b1f1))
* **catalog:** order asc in create time
([#80](#80))
([98348e9](98348e9))
* **catalog:** rename endpoint from kb to catalog
([#56](#56))
([c8e543d](c8e543d))
* **catalog:** sort the chunk
([#74](#74))
([c434cbd](c434cbd))
* **catalog:** support concurrent text to embedding process
([#85](#85))
([12d313c](12d313c))
* **catalog:** support different file-to-embedding process
([#69](#69))
([7f40dc1](7f40dc1))
* **catalog:** support more file type to uplaod
([#67](#67))
([2d3c705](2d3c705))
* **catalog:** support originalData return
([#87](#87))
([eb0c7fd](eb0c7fd))
* **catalog:** support question answering
([#71](#71))
([a540c93](a540c93))
* **catalog:** support xlsx
([#79](#79))
([f1e2505](f1e2505))
* **catalog:** update the pipeline that ask endpoint use
([#83](#83))
([b5bbc75](b5bbc75))
* **catalog:** update the proto-go
([#82](#82))
([94fa708](94fa708))
* **catelog:** make topK default 5
([#62](#62))
([02259e1](02259e1))
* create artifact database if it does not exist
([#4](#4))
([787a4ad](787a4ad))
* fetch repository tags from registry
([#6](#6))
([3568735](3568735))
* **kb:** add acl and update pipeline
([#49](#49))
([bf7feea](bf7feea))
* **kb:** add check and clear message in openfga init
([#52](#52))
([0a11838](0a11838))
* **kb:** add file metadata
([#37](#37))
([51113ce](51113ce))
* **kb:** add owner_id parameter in knowledge base endpoint
([#27](#27))
([e85020b](e85020b))
* **kb:** add resource limit
([#43](#43))
([5f61f44](5f61f44))
* **kb:** add some kb metadata
([#36](#36))
([0e42ff4](0e42ff4))
* **KB:** chunk catalog api
([#39](#39))
([71a3996](71a3996))
* **kb:** dealing with failure in file-to-embedding process
([#47](#47))
([0448a69](0448a69))
* **KB:** file-to-embedding worker pool
([#32](#32))
([5409db3](5409db3))
* **kb:** knowldge base crud endpoints
([#19](#19))
([0e9f32b](0e9f32b))
* **kb:** knowledge base repository done
([#18](#18))
([f6aeaae](f6aeaae))
* **kb:** retrieval test api
([#41](#41))
([8b94cc9](8b94cc9))
* **kb:** support knowledge base file related api
([#23](#23))
([3912028](3912028))
* **kb:** update preset's pipeline
([2751023](2751023))
* **kb:** using preset's pipeline for file-to-embedding worker
([#45](#45))
([8c57ad1](8c57ad1))
* **registry:** support image deletion
([#29](#29))
([fe818da](fe818da))
* use camelCase for HTTP body
([#22](#22))
([5d0fc2f](5d0fc2f))
* use dind in Dockerfile
([#14](#14))
([d95aa68](d95aa68))


### Bug Fixes

* add /bin/sh to Dockerfile
([#10](#10))
([7df1dd3](7df1dd3))
* **artifact:** fix ctx issue
([#91](#91))
([1c61d69](1c61d69))
* **artifact:** improve catalog deletion slow issue
([#93](#93))
([0bbf3f2](0bbf3f2))
* **artifact:** use correct version of proto
([#84](#84))
([cba7e06](cba7e06))
* **catalog:** add requester when calling pipeline
([#72](#72))
([0880d91](0880d91))
* **catalog:** call embedding with max 32 size batch
([#60](#60))
([e6b25ec](e6b25ec))
* **catalog:** fix the catalog permission issue
([#75](#75))
([2db2ce3](2db2ce3))
* **catalog:** fix topk to topK
([#65](#65))
([5ff89fe](5ff89fe))
* **catalog:** list file api's page token
([#64](#64))
([ac56be0](ac56be0))
* **catalog:** max 3 catalog per namespace
([#58](#58))
([786790c](786790c))
* **catalog:** when delete catalog and file, also delete the artifact
([#61](#61))
([cf6ecc3](cf6ecc3))
* expose private API on private port
([#9](#9))
([9ef4b03](9ef4b03))
* **kb:** empty similar chunks
([#55](#55))
([d1d5345](d1d5345))
* **kb:** fix db migration error
([#53](#53))
([7cc65b7](7cc65b7))
* **kb:** fixed some bugs in file-to-embedding process
([#35](#35))
([703bb0b](703bb0b))
* **kb:** get owner uid
([#26](#26))
([b1d8ac5](b1d8ac5))
* **kb:** issue of chunking
([#34](#34))
([66307c7](66307c7))
* **kb:** similar chunk search by prompt text
([#46](#46))
([265f101](265f101))
* **kb:** use correct kb uid in chunk similarity search
([#44](#44))
([e76aafa](e76aafa))
* return pagination in tag list endpoint
([#17](#17))
([72bc47a](72bc47a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants