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

feat: add share reason in share requests #498

Merged
merged 24 commits into from
Jun 22, 2023
Merged

Conversation

noah-paige
Copy link
Contributor

Feature or Bugfix

  • Feature

Detail

  • Expose the Share Request Comments as Part of the Share View for the Approver to See
  • Allow Approver to Provide Comments when Rejecting a Share for the Requester to See

Relates

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dlpzx dlpzx changed the title 422 add share reason feat: add share reason in share requests Jun 6, 2023
@noah-paige noah-paige changed the base branch from main to v1m6m0 June 6, 2023 15:41
@noah-paige
Copy link
Contributor Author

This PR adds the Share Request Purpose specified when requesting data access to the Share View so that the Approver of the share request is able to understand why the requester needs access
Screenshot 2023-06-06 at 11 45 54 AM
Screenshot 2023-06-06 at 11 47 42 AM

Additionally, this PR adds the ability of the approver to add the reject purpose when they reject a share request so the requester is able to see why the request was rejected

Screenshot 2023-06-06 at 11 48 56 AM
Screenshot 2023-06-06 at 11 49 16 AM

@noah-paige noah-paige marked this pull request as ready for review June 6, 2023 15:49
Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

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

in general it looks good

@noah-paige
Copy link
Contributor Author

I added string limit to the reject purpose similar to that of the request purpose we have in place using Yup.string().max(5000)

Screenshot 2023-06-07 at 9 50 51 AM

@noah-paige
Copy link
Contributor Author

Finished writing unit tests - ready for another review

@dlpzx
Copy link
Contributor

dlpzx commented Jun 13, 2023

I just checked the following:

  • Add request purpose at request creation
  • Add reject purpose at rejection
  • Add either of the above when editing the request (checking approvers and requesters personas
  • Leave everything empty and check that it does not break anything
  • Edit either of the purposes and check that they get updated

For the frontend I think we could have something a bit more organised. On the right we have the request details and on the left the dataset details. I would place the request purpose on the request details or in a different box like in this screenshot:
image

I did some testing in 9c75ac1, if you want (only if you want) you can take it as reference

@noah-paige
Copy link
Contributor Author

I like this frontend design screenshot better - let me add that separate box and get a new commit up

@noah-paige
Copy link
Contributor Author

Latest Commit:

  • Removes print statement
  • Fix Typo in Migration Script
  • Change Share Object Comments Frontend View to a new box as shown in @dlpzx screenshot above



def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
Copy link
Contributor

Choose a reason for hiding this comment

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

We are missing the back-filling when downgrading. I know, we hardly ever downgrade, but once I had a customer that needed to downgrade and it was crucial that migrations were both-sided

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just updated the PR with code for downgrading and did tests on both upgrade and downgrade again on the Aurora DB

Validated the resource permissions and columns got upgraded and downgraded as expected. @dlpzx - Think we are good here if you want to do one last final review

@@ -1031,6 +1063,7 @@ def list_user_received_share_requests(
f'{{{username}}}'
),
models.Dataset.stewards.in_(groups),
models.Dataset.SamlAdminGroupName.in_(groups),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch!

tests/api/conftest.py Outdated Show resolved Hide resolved
Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

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

final final details

@dlpzx dlpzx self-requested a review June 22, 2023 06:38
@@ -764,6 +765,7 @@ const ShareView = () => {
<Typography
color="textPrimary"
variant="subtitle2"
sx={{ wordBreak: "break-word" }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice

Copy link
Contributor

@dlpzx dlpzx left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for including so many small fixes in this PR. I also re-tested the migration up and down an it is 🥇

@noah-paige noah-paige merged commit 4aff9a7 into v1m6m0 Jun 22, 2023
@dlpzx dlpzx mentioned this pull request Jul 11, 2023
dlpzx added a commit that referenced this pull request Jul 19, 2023
### Feature or Bugfix
Release PR with the following list of features. Refer to each PR for the
details

### Detail
- #498 
- #482 
- #543
- #524 (which also solves #531)
- #532 
- #535 
- #497 
- #515
- #529 
- #562 
- #455 
- #572 
- #567 
- #573 
- #579 
- #578 
- #582 

### Breaking changes - release notes
- ⚠️ IMPORTANT: upgrade to a version >V1.5.0 before upgrading to V1.6 to
avoid deletion of resources in custom resource deletion
- ⚠️ IMPORTANT: requires an update of environments and then datasets
after upgrading. Either using cdk.json parameter
`enable_update_dataall_stacks_in_cicd_pipeline`, waiting for overnight
update stack task, or manually updating first environments and then
datasets
- CloudFront distribution replace for #529 
- Additional EC2 permissions in CDK Synth CodeBuild stage for #543 -->
this can be avoided by upgrading to v1.5.6 before upgrading to v1.6.0
- local development affected by more restrictive pivotRole trust policy


### Relates
V1.6.0 release

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Co-authored-by: Gezim Musliaj <102723839+gmuslia@users.noreply.github.com>
Co-authored-by: Noah Paige <69586985+noah-paige@users.noreply.github.com>
Co-authored-by: nikpodsh <124577300+nikpodsh@users.noreply.github.com>
Co-authored-by: chamcca <40579012+chamcca@users.noreply.github.com>
Co-authored-by: Nikita Podshivalov <nikpodsh@amazon.com>
Co-authored-by: dbalintx <132444646+dbalintx@users.noreply.github.com>
Co-authored-by: mourya-33 <134511711+mourya-33@users.noreply.github.com>
@dlpzx dlpzx deleted the 422-add-share-reason branch July 20, 2023 09:17
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.

Show reason to approver why share is requested by the consumer and vice versa
2 participants