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

Allow updating of comment in delta share resource #3629

Conversation

ScottReyn-db
Copy link

Changes

Why:
Based on the feedback in
#3529 (comment), that pull request needed to be extended to handle updates to comment in the share resource

How:
Bit of a refactor to create UpdateShareMeta which takes in the ctx, the resource information, client and the two different values in the share. If only th owner is changed, then a call to set the owner is set to the API. If the owner and comment are changed then both are set to the API.

And likewise, handling just the comment change.

A test was added to demonstrate that

Tests

Added new test

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

Why:
Based on the feedback in
databricks#3529 (comment),
that pull request needed to be extended to handle updates to `comment`
in the share resource

How:
Bit of a refactor to create `UpdateShareMeta` which takes in the ctx,
the resource information, client and the two different values in the
share. If only th `owner` is changed, then a call to set the owner is
set to the API. If the `owner` and `comment` are changed then both are
set to the API.

And likewise, handling just the `comment` change.

A test was added to demostrate that
@ScottReyn-db ScottReyn-db requested review from a team as code owners May 30, 2024 06:20
@ScottReyn-db ScottReyn-db requested review from hectorcast-db and removed request for a team May 30, 2024 06:20
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 35.29412% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 82.67%. Comparing base (a5901dd) to head (4be78d9).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           share-issue    #3629      +/-   ##
===============================================
- Coverage        82.75%   82.67%   -0.08%     
===============================================
  Files              183      183              
  Lines            18814    18832      +18     
===============================================
  Hits             15569    15569              
- Misses            2328     2343      +15     
- Partials           917      920       +3     
Files Coverage Δ
sharing/resource_share.go 77.91% <35.29%> (-9.68%) ⬇️

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.

2 participants