-
Notifications
You must be signed in to change notification settings - Fork 14
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
feature: skip image download if it exists #447
Conversation
e9e4218
to
8c6fd67
Compare
Transport: &http.Transport{ | ||
TLSClientConfig: &tls.Config{ | ||
//nolint:gosec | ||
InsecureSkipVerify: true, // TODO: remove skip verify |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check High
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.
@glimchb Should I remove this?
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.
@h0lyalg0rithm we have a separate issue for this #341 if you remove it it will fail CI/CD.. need to fix server certs
2257429
to
95551e0
Compare
Signed-off-by: Suraj Shirvankar <[email protected]>
95551e0
to
065d27d
Compare
if err != nil { | ||
return err | ||
} | ||
func (a *Agent) downloadArtifact(uri string) (*os.File, error) { |
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.
should download
go to utils
?
|
Got it I assumed that if there are was an image present it would use it instead of downloading it. |
Proposed changes
There are multiple changes introduced in this PR
This is the how the image download and validation process works
Download and Validate Image
HTTPClient Unification
Now an agent receives an instantiated client which makes all the http requests.Currently it configured to be not validate the server certificate.Injecting the httpclient allows us to test out the api client.
Types of changes
What types of changes does your code introduce to the repo? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.