Skip to content
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

Enable Duplicate Reports by changing Blob URI scheme #148

Open
gbdubs opened this issue Jan 19, 2024 · 3 comments
Open

Enable Duplicate Reports by changing Blob URI scheme #148

gbdubs opened this issue Jan 19, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@gbdubs
Copy link
Contributor

gbdubs commented Jan 19, 2024

{"error": "failed to perform operation: creating blob: creating blob row: ERROR: duplicate key value violates unique constraint \"blob_blob_uri_key\" (SQLSTATE 23505)"}

@bcspragu
Copy link
Collaborator

I'd imagine this happens when running an report twice on the same portfolio? IIRC, the blob URI is something like az://reports/<portfolio UUID>/<assets...>

@gbdubs
Copy link
Contributor Author

gbdubs commented Jan 19, 2024 via email

@bcspragu
Copy link
Collaborator

Totally, it's just this:

app/cmd/runner/main.go

Lines 478 to 479 in b743bc9

dirPath := filepath.Join(reportDir, dirEntry.Name())
tmp, err := h.uploadDirectory(ctx, dirPath, h.reportContainer)

The create_report.R script just outputs to a directory based on the input portfolio name, and we then just use that directly to create the subdir we upload the report to, but it can be set to whatever

@gbdubs gbdubs changed the title Duplicate Blob URI Issue Enable Duplicate Reports by changing Blob URI scheme Feb 16, 2024
@gbdubs gbdubs added the bug Something isn't working label Feb 16, 2024
@gbdubs gbdubs added this to the MS1 - Good Demo milestone Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants