-
Notifications
You must be signed in to change notification settings - Fork 102
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
API to refresh all catalogs #215
Conversation
34c72b8
to
8dd3018
Compare
api/pkg/service/catalog/catalog.go
Outdated
db := s.DB(ctx) | ||
|
||
ctgs := []model.Catalog{} | ||
if err := db.Model(&model.Catalog{}).Find(&ctgs).Error; err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use directly db.find
since we don't want any specific fields from the tables ?
api/design/catalog.go
Outdated
@@ -26,18 +26,21 @@ var _ = Service("catalog", func() { | |||
Error("not-found", ErrorResult, "Resource Not Found Error") | |||
|
|||
Method("Refresh", func() { | |||
Description("Refreshes Tekton Catalog") | |||
Description("Refresh a Tekton Catalog by its name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think since we are having this for multicatalog support it should be as
Refresh a Catalog by it's name
If for a particular catalog we have
then for all catalogs, we can have
It will also not break the old API. WDYT? |
yeah we can do that to avoid the breakage, |
8dd3018
to
b5e1ec1
Compare
API: /catalog/refresh |
979074c
to
7632ba0
Compare
/lgtm |
/approve |
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: PuneetPunamiya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test |
/retest |
This adds an endpoint /catalog/refresh which will refresh all catalogs in db. User will need to have catalog:refresh scope in token to access the API. Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
7632ba0
to
ea5175d
Compare
/retest |
/lgtm |
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This adds an endpoint /catalog/refresh/all which will refresh all
catalogs in db. User will need to have catalog:refresh scope in token
to access the API.
Signed-off-by: Shivam Mukhade smukhade@redhat.com
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Closes #207