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

Enhance Share Health Status Verify/ReApply #1346

Merged
merged 7 commits into from
Jun 25, 2024

Conversation

noah-paige
Copy link
Contributor

Feature or Bugfix

  • Feature

Detail

  • Enhance Share UI for re-apply and verify share health status

Relates

Security

Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

  • Does this PR introduce or modify any input fields or queries - this includes
    fetching data from storage outside the application (e.g. a database, an S3 bucket)?
    • Is the input sanitized?
    • What precautions are you taking before deserializing the data you consume?
    • Is injection prevented by parametrizing queries?
    • Have you ensured no eval or similar functions are used?
  • Does this PR introduce any functionality or component that requires authorization?
    • How have you ensured it respects the existing AuthN/AuthZ mechanisms?
    • Are you logging failed auth attempts?
  • Are you using or adding any cryptographic features?
    • Do you use a standard proven implementations?
    • Are the used keys controlled by the customer? Where are they stored?
  • Are you introducing any new policies/roles/users?
    • Have you used the least-privilege principle? How?

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

@noah-paige noah-paige self-assigned this Jun 19, 2024
@noah-paige noah-paige changed the title Enhance Share Health Status pt 1 Enhance Share Health Status Verify/ReApply Jun 19, 2024
@noah-paige
Copy link
Contributor Author

noah-paige commented Jun 19, 2024

Changes:

  • [1] Expose health status text + remove tooltip
    • Make health status text visible to user on ShareView to avoid confusion of icons or inconsistency in text size/font
Screenshot 2024-06-19 at 12 46 04 PM Screenshot 2024-06-19 at 12 48 56 PM
  • [2] Share item health status refreshes to PendingVerify immediately after starting verify task (and same with reApply)

    • This is the same as how it works for Share Item status as well
    • To note - there may be desire to design a way to update FE with changes to status in BE via GQL subscriptions or some type of polling logic. I am leaving this task open for a future issue if wanted since it is a more general scoped issue for how to handle a retrieving status updates that can be applied to share items, share objects, stacks, etc.
  • [3] If item is not shared (['Revoke_Failed', 'Share_Succeeded']) then do not expose Item health status but instead show Item Not Shared

Screenshot 2024-06-19 at 12 52 34 PM
  • [4] For Shares that are in pendingReApply - do not allow revokes until re-apply task is finished
Screenshot 2024-06-19 at 12 54 14 PM
  • [5] Add Modal to navigate to Share View after verify share on dataset
Screenshot 2024-06-24 at 3 41 25 PM

@noah-paige noah-paige marked this pull request as ready for review June 19, 2024 18:57
@dlpzx dlpzx self-requested a review June 24, 2024 09:56
>
<PendingIcon color={'info'} />
</Tooltip>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: add some space between the tag and tooltip and the text with the verification time. At the moment it is really tight
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-06-24 at 3 34 42 PM

I wrapped timestamp in parenthesis to differentiate - let me know if rather it designed some way else

@@ -173,7 +192,7 @@ const ItemRow = (props) => {
)}
{possibleAction === 'Nothing' && (
<Typography color="textSecondary" variant="subtitle2">
Wait until this item is processed
Wait until this item is processed and/or re-apply task is complete
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we enforcing this in the backend?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in latest commit and tested again to ensure revoke still works for healthy share item and throws error for PendingReApply item

For now only enforcing this check on revoke items - the more closer healthstatus and status get related - the more I am tempted to include transitions and such in the already existing state machine... for now I am leaving as is to not increase complexity / scope of this PR

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.

Left some comments, but the feature looks good. I tested it locally.

@noah-paige
Copy link
Contributor Author

@dlpzx The latest commit addressed you comments c9ccb16 - take a look and I will merge tomorrow if still all looks good

@noah-paige noah-paige merged commit cc927d0 into main Jun 25, 2024
9 checks passed
@dlpzx dlpzx deleted the enhance-share-verify-reapply-ui branch September 11, 2024 11:24
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