-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Make InitStep a first-class-citizen to add user-facing reporting around api / compiler #779
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
Closed
Conversation
This file contains hidden or 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
Codecov Report
@@ Coverage Diff @@
## main #779 +/- ##
==========================================
- Coverage 56.48% 54.36% -2.13%
==========================================
Files 243 260 +17
Lines 16164 17316 +1152
==========================================
+ Hits 9131 9413 +282
- Misses 6628 7486 +858
- Partials 405 417 +12
|
2c889d2 to
846f8f0
Compare
3 tasks
846f8f0 to
e7c256c
Compare
add missing routes to docs add missing admin initstep endpoint
add missing routes to postgres mock expand logger fields on some InitStep methods
And add a few logs intended for Vela users to see (not just admins)
Only possible once a build has been defined.
e7c256c to
e6b036c
Compare
Member
Author
|
Closed with go-vela/community#771 |
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.
Currently, we're abusing the
StepandContainermodels to allow reporting on build setup (eg when Docker initializes the Network and Volumes). This means that we have to check for the special "init" stage/step/container in many places. This makes "Init" reporting a first-class-citizen, instead of shoe-horning it into steps and containers (which was admittedly an excellent MVP).An
InitStepis a report by a "reporter" about a discrete part of the build setup. The "reporter" would be a logical part of the stack, for example "Pipeline Compiler", "Docker Runtime", "Kubernetes Runtime", ... For example, we could have these reporters be discrete initsteps:Similar to a
Step, where the log data is stored in a separateLogstruct/table, theInitStepis also associated with aLogthat stores the actual log/report. TheInitStephowever can also specify a mimetype for the output, which is meant for eventual consumption by the UI to do syntax highlighting if relevant.So, this adds:
database/initsteprouter/initstep,router/middleware/initstep,api/initstep,mock/server/initstepdatabase/logrouter/log,router/middleware/log,api/log,mock/server/logAnd then I also added example logs in and around the compiler (in
api/webhookandapi/build). Not everything that compiles a template has a build it can associate a log with, so logs get created only after the build is ready.