mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-22 08:09:13 -04:00
format string uses
%q not useful for []string; %v used instead %q in nop.go replaced %v with %s for strings -""-
This commit is contained in:
parent
0ab2947c29
commit
da8d18121d
@ -74,7 +74,7 @@ func (a *Archivist) Archive(ctx context.Context, version versionsapi.Version, cs
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
a.log.Debug(fmt.Sprintf("Archiving OS image %q to s3://%v/%v", fmt.Sprintf("%s %s %v", csp, attestationVariant, version.ShortPath()), a.bucket, key))
|
||||
a.log.Debug(fmt.Sprintf("Archiving OS image %q to s3://%s/%s", fmt.Sprintf("%s %s %v", csp, attestationVariant, version.ShortPath()), a.bucket, key))
|
||||
_, err = a.uploadClient.Upload(ctx, &s3.PutObjectInput{
|
||||
Bucket: &a.bucket,
|
||||
Key: &key,
|
||||
|
@ -78,7 +78,7 @@ func (a *Uploader) Upload(ctx context.Context, imageInfo versionsapi.ImageInfo)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
a.log.Debug(fmt.Sprintf("Archiving image info to s3://%v/%v", a.bucket, key))
|
||||
a.log.Debug(fmt.Sprintf("Archiving image info to s3://%s/%s", a.bucket, key))
|
||||
buf := &bytes.Buffer{}
|
||||
if err := json.NewEncoder(buf).Encode(imageInfo); err != nil {
|
||||
return "", err
|
||||
|
@ -92,7 +92,7 @@ func (a *Uploader) Upload(ctx context.Context, rawMeasurement, signature io.Read
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
a.log.Debug(fmt.Sprintf("Archiving image measurements to s3://%v/%v and s3://%v/%v", a.bucket, key, a.bucket, sigKey))
|
||||
a.log.Debug(fmt.Sprintf("Archiving image measurements to s3://%s/%s and s3://%s/%s", a.bucket, key, a.bucket, sigKey))
|
||||
if _, err = a.uploadClient.Upload(ctx, &s3.PutObjectInput{
|
||||
Bucket: &a.bucket,
|
||||
Key: &key,
|
||||
|
@ -28,6 +28,6 @@ func New(log *slog.Logger) *Uploader {
|
||||
|
||||
// Upload pretends to upload images to a csp.
|
||||
func (u *Uploader) Upload(_ context.Context, req *osimage.UploadRequest) ([]versionsapi.ImageInfoEntry, error) {
|
||||
u.log.Debug(fmt.Sprintf("Skipping image upload of %s since this CSP does not require images to be uploaded in advance.", req.Version.ShortPath()))
|
||||
u.log.Debug(fmt.Sprintf("Skipping image upload of %q since this CSP does not require images to be uploaded in advance.", req.Version.ShortPath()))
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ func (c *Client) waitForInvalidations(ctx context.Context) error {
|
||||
}
|
||||
|
||||
waiter := cloudfront.NewInvalidationCompletedWaiter(c.cdnClient)
|
||||
c.logger.Debug(fmt.Sprintf("Waiting for invalidations %q in distribution %q", c.invalidationIDs, c.distributionID))
|
||||
c.logger.Debug(fmt.Sprintf("Waiting for invalidations %v in distribution %q", c.invalidationIDs, c.distributionID))
|
||||
for _, invalidationID := range c.invalidationIDs {
|
||||
waitIn := &cloudfront.GetInvalidationInput{
|
||||
DistributionId: &c.distributionID,
|
||||
|
Loading…
x
Reference in New Issue
Block a user