Skip to content

Conversation

@Chief-Rishab
Copy link
Member

  • Fix create asset failure with owner(s) identified by UUID by fetching the Compass native user ID for the given UUID. Create the user if no user exists for the given UUID.
  • Fix missing Owner's UUID field while creating asset patch
  • Refactor SQL for inserting owners to use squirrel SQL builder.

Closes #216

@coveralls
Copy link

coveralls commented Apr 4, 2023

Pull Request Test Coverage Report for Build 4604515538

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 32 of 41 (78.05%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 84.152%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/store/postgres/asset_repository.go 31 40 77.5%
Files with Coverage Reduction New Missed Lines %
internal/store/postgres/asset_repository.go 1 76.76%
Totals Coverage Status
Change from base Build 4560380896: 0.01%
Covered Lines: 5480
Relevant Lines: 6512

💛 - Coveralls

Comment on lines +650 to +651
for _, o := range owners {
sqlb = sqlb.Values(assetID, o.ID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this generate multiple values statements separated by commas?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, values statements with multiple comma seperated rows to be inserted in the table will be generated.
So in case the [] owners has two entries

VALUES (assetID, owners[0].ID), (assetID, owners[1].ID)

@kushsharma
Copy link
Member

LGTM

@ravisuhag ravisuhag merged commit dac97c3 into main Apr 21, 2023
@ravisuhag ravisuhag deleted the create-asset-with-owner-uuid branch April 21, 2023 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating asset with uuid gives internal server error, owner info is empty in asset fetching requests

5 participants