Skip to content

Conversation

@sudo-suhas
Copy link
Contributor

  • On the service layer, for get and delete, check if the given ID is a
    UUID and call corresponding method on repository (ex: GetByID or
    GetByURN). This introduces a limitation into the system where if an
    asset's URN is a UUID, the get and delete calls will fail. This
    limitation is considered acceptable in the short term and in the long
    term, the plan is to drop support for get or delete by ID. ID will be
    internal to Compass.
  • On the repository layer for PG and ES, add get and delete by URN
    variants.
  • Drop the Find method on asset repository and replace usages with
    GetWithURN.

BREAKING CHANGE: The interface for asset Repository and
DiscoveryRepository have been changed - methods have been renamed and
new methods have been added.

Closes #162

@ravisuhag ravisuhag changed the title Draft: Manage assets with URN for GET/DELETE feat: manage assets with URN for GET/DELETE Aug 16, 2022
@sudo-suhas sudo-suhas marked this pull request as draft August 16, 2022 06:54
@sudo-suhas sudo-suhas force-pushed the manage-assets-with-urn branch from a72004d to 6d361f4 Compare August 16, 2022 09:38
- On the service layer, for get and delete, check if the given ID is a
  UUID and call corresponding method on repository (ex: GetByID or
  GetByURN). This introduces a limitation into the system where if an
  asset's URN is a UUID, the get and delete calls will fail. This
  limitation is considered acceptable in the short term and in the long
  term, the plan is to drop support for get or delete by ID. ID will be
  internal to Compass.
- On the repository layer for PG and ES, add get and delete by URN
  variants.
- Drop the Find method on asset repository and replace usages with
  GetWithURN.

BREAKING CHANGE: The interface for asset Repository and
DiscoveryRepository have been changed - methods have been renamed and
new methods have been added.
@sudo-suhas sudo-suhas force-pushed the manage-assets-with-urn branch from 6d361f4 to d80fbbf Compare August 16, 2022 09:56
@coveralls
Copy link

Pull Request Test Coverage Report for Build 2867002035

  • 75 of 87 (86.21%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 85.844%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/store/postgres/asset_repository.go 39 51 76.47%
Totals Coverage Status
Change from base Build 2866865943: 0.1%
Covered Lines: 4736
Relevant Lines: 5517

💛 - Coveralls

Copy link
Contributor

@StewartJingga StewartJingga left a comment

Choose a reason for hiding this comment

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

LGTM

@StewartJingga StewartJingga marked this pull request as ready for review August 16, 2022 10:35
@ravisuhag ravisuhag merged commit 274fb0a into raystack:main Aug 16, 2022
@sudo-suhas sudo-suhas deleted the manage-assets-with-urn branch August 16, 2022 11:34
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.

feat: managing Asset via URN instead of ID

4 participants