-
Notifications
You must be signed in to change notification settings - Fork 10
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
Build checks catalog #3
Merged
dottorblaster
merged 9 commits into
trento-project:main
from
arbulu89:feature/return-catalog
Mar 18, 2022
Merged
Build checks catalog #3
dottorblaster
merged 9 commits into
trento-project:main
from
arbulu89:feature/return-catalog
Mar 18, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arbulu89
force-pushed
the
feature/return-catalog
branch
from
March 18, 2022 07:44
7c4656a
to
4b4768f
Compare
arbulu89
force-pushed
the
feature/return-catalog
branch
from
March 18, 2022 08:15
563fed9
to
c84666b
Compare
arbulu89
requested review from
dottorblaster,
fabriziosestito,
nelsonkopliku,
rtorrero and
stefanotorresi
March 18, 2022 08:22
arbulu89
commented
Mar 18, 2022
|
||
func CatalogHandler(runnerService RunnerService) gin.HandlerFunc { | ||
return func(c *gin.Context) { | ||
c.JSON(200, runnerService.GetCatalog()) |
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.
This returns always 200
state, even though you request the catalog and it is not ready.
We can modify it of course
dottorblaster
suggested changes
Mar 18, 2022
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.
One nitpick then we can go
nelsonkopliku
approved these changes
Mar 18, 2022
dottorblaster
approved these changes
Mar 18, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the checks catalog built process.
This is what we have:
In the Ansible code:
ansible/vars
folder for the different entries, and based on the folders there, it will create a catalog entry for each of the items. So the catalog now is compose like a map where the key is the provider name, and it contains the catalog (the same we were using now).CATALOG_DESTINATION
instead of posted to the trento web serverRest of the code:
Runner
struct to a service like struct. To make the mocks possible/api/ready
and/api/catalog
GET requests/api/ready
endpoints returns{"ready": false}
and it is set to true once the catalog creation is doneThe
/api/catalog
would return something like this:PD: If at some point, we want to send the catalog creation as an event, we could use the future webhooks logic, and sent the created catalog once it is built
PD2: By now, all the golang code goes in the same folder, as I didn't want to make more fuzz of it. We can change in the next PR if needed