Skip to content

Commit 49b037e

Browse files
committed
adjust uuid resolution
1 parent ac7ffda commit 49b037e

File tree

5 files changed

+321
-106
lines changed

5 files changed

+321
-106
lines changed

go.work

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use (
1616

1717
./taco/cmd/statesman
1818
./taco/cmd/taco
19+
./taco/cmd/token_service
1920
./taco/internal
2021
./taco/pkg/sdk
2122
./taco/providers/terraform/opentaco

taco/internal/api/internal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import (
66
"os"
77

88
"github.com/diggerhq/digger/opentaco/internal/auth"
9-
"github.com/diggerhq/digger/opentaco/internal/auth/oidc"
10-
"github.com/diggerhq/digger/opentaco/internal/auth/sts"
119
"github.com/diggerhq/digger/opentaco/internal/domain"
1210
"github.com/diggerhq/digger/opentaco/internal/middleware"
11+
"github.com/diggerhq/digger/opentaco/internal/oidc"
1312
"github.com/diggerhq/digger/opentaco/internal/rbac"
1413
"github.com/diggerhq/digger/opentaco/internal/repositories"
14+
"github.com/diggerhq/digger/opentaco/internal/sts"
1515
"github.com/diggerhq/digger/opentaco/internal/tfe"
1616
unithandlers "github.com/diggerhq/digger/opentaco/internal/unit"
1717
"github.com/labstack/echo/v4"

taco/internal/storage/s3store.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,32 @@ func (s *s3Store) Create(ctx context.Context, id string) (*UnitMetadata, error)
170170
}
171171

172172
func (s *s3Store) Get(ctx context.Context, id string) (*UnitMetadata, error) {
173+
fmt.Printf("[TEMPORARY LOG] S3Store.Get() CALLED\n") // temporary log
174+
fmt.Printf("[TEMPORARY LOG] - Input ID: %q\n", id) // temporary log
175+
fmt.Printf("[TEMPORARY LOG] - Bucket: %q\n", s.bucket) // temporary log
176+
fmt.Printf("[TEMPORARY LOG] - Prefix: %q\n", s.prefix) // temporary log
177+
178+
s3Key := s.objKey(id)
179+
fmt.Printf("[TEMPORARY LOG] - Constructed S3 Key: %q\n", s3Key) // temporary log
180+
fmt.Printf("[TEMPORARY LOG] - Full S3 path would be: s3://%s/%s\n", s.bucket, s3Key) // temporary log
181+
fmt.Printf("[TEMPORARY LOG] Calling HeadObject...\n") // temporary log
182+
173183
head, err := s.client.HeadObject(ctx, &s3.HeadObjectInput{
174184
Bucket: &s.bucket,
175-
Key: aws.String(s.objKey(id)),
185+
Key: aws.String(s3Key),
176186
})
187+
188+
fmt.Printf("[TEMPORARY LOG] HeadObject returned - err: %v\n", err) // temporary log
177189
if err != nil {
190+
fmt.Printf("[TEMPORARY LOG] Error details: %T - %v\n", err, err) // temporary log
178191
if isNotFound(err) {
192+
fmt.Printf("[TEMPORARY LOG] Identified as NOT FOUND error, returning ErrNotFound\n") // temporary log
179193
return nil, ErrNotFound
180194
}
195+
fmt.Printf("[TEMPORARY LOG] Returning error as-is\n") // temporary log
181196
return nil, err
182197
}
198+
fmt.Printf("[TEMPORARY LOG] HeadObject SUCCESS - ContentLength: %v, LastModified: %v\n", head.ContentLength, head.LastModified) // temporary log
183199
meta := UnitMetadata{ID: id}
184200
if head.ContentLength != nil {
185201
meta.Size = *head.ContentLength

0 commit comments

Comments
 (0)