-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add Support for Blob Type (s3 and GCS) #879
Conversation
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
3f5b1b8
to
c91eaaa
Compare
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.
/assign @enarha @vdemeester
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
/test pull-tekton-results-unit-tests |
The following is the coverage report on the affected files.
|
if legacy { | ||
logRec, err = getLogRecord(s.db, parent, rec.ResultID, rec.Name) | ||
if err != nil { | ||
s.logger.Debugf("error getting legacy log record: %s", err) |
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.
why do we continue here?
- If err != nil, then logRec will be nil
- If legacy is configured which means log type to v1alpha2, why do we continue as v1alpha3?
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.
- Yes, fixed that.
- Yes, Log Type kind itself can be v1alpha2 or v1alpha3.
In plugin API, there's no LogType record itself.
err := json.Unmarshal(logRec.Data, log) | ||
if err != nil { | ||
err = fmt.Errorf("could not decode Log record: %w", err) | ||
s.logger.Error(err) |
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.
below you call the .Error() (s.logger.Error(err.Error())
) method on the error while logging. I do not mind either, just keep consistent.
Also in the other instances below.
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.
Changed it to use s.logger.Error(err)
to everywhere.
} | ||
|
||
s.logger.Debugf("LOGS_TYPE: %s", strings.ToLower(s.config.LOGS_TYPE)) | ||
// If the logs type is not Loki, we don't need to set up the LogPluginServer |
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.
setLogPlugin() with also return true if the log type BlobLogType, so either the comment is outdated or the logic below.
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.
Yes. Comment is outdated.
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.
Updated this.
/retest |
7c735d5
to
7d4c40c
Compare
The following is the coverage report on the affected files.
|
Added support for reading forwarded logs to s3 and GCS. If vector forwards logs to s3 and GCS, these logs can be read using Go CDK's blob library. Also, if result logging mechanism is changeg from v1alpha2 to v1alpha3 which doesn't support watcher, we can read old logs if they exist.
The following is the coverage report on the affected files.
|
Added documentation for blob plugin logging and added details about CDK.
The following is the coverage report on the affected files.
|
Fix typo in documentation (ena)
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enarha, vdemeester 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 |
The following is the coverage report on the affected files.
|
/kind feature |
Added support for reading forwarded logs to s3 and GCS.
If vector forwards logs to s3 and GCS, these logs can be read using
Go CDK's blob library.
Also, if result logging mechanism is changed from v1alpha2 to v1alpha3
which doesn't support watcher, we can read old logs if they exist.
Changes
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes