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

S3 objects lifecycle GUI #2759

Open
NShaforostov opened this issue Aug 2, 2022 · 11 comments
Open

S3 objects lifecycle GUI #2759

NShaforostov opened this issue Aug 2, 2022 · 11 comments
Assignees
Labels
kind/enhancement New feature or request state/has-doc Issues that have documentation sys/core Issues related to core functionality (API, VM management, ...) sys/gui Issues related to the web gui

Comments

@NShaforostov
Copy link
Collaborator

NShaforostov commented Aug 2, 2022

Background

This issue describes requirements to the GUI for the functionality implemented via #2721.

Approach

Admin and owner shall have the ability to configure the transition rules for object storages (currently, only for AWS s3).

Separately, there shall be the ability to restore files, previously transferred according to the transition rules, back to the s3 storage.

Create/Edit rule

Ability to manage storage rules shall be available via the Create/Edit data storage form.
A new tab "Transition rules" shall be added:
image

Note: as unnecessary, the controls that previously managed storage lifecycle - STS/LTS duration shall be removed from this form

By click this new tab, a new form shall be opened, e.g.:
image
This form shall contain:

  • button to add a new transition rule for the storage
  • a list of all transition rules configured for the current storage (empty list by default)

To create a new rule, admin/owner shall click the +Create button.
A new form shall appear, e.g.:
image

Here, the rule settings shall be specified:

  • Root path (mandatory) - it is the path inside the storage, from which the search for files to transition (corresponding to the specified glob pattern) will be performed. Example: /, /some_folder/sub_folder/, /some_folder/*
  • Glob (mandatory) - glob pattern. Pattern that shall define files that will be transferred by the current rule. Pattern shall be applied in the storage path specified as root. Example: *.csv - any CSV file in the current root path, /**/*.csv - any CSV file in any subfolder of the root path.
  • Method (mandatory) - method that defines the transition process. The control shall be a dropdown list, multi-select is disabled. Possible variants:
    • One by one (default) - each file matches the glob pattern will be transferred separately. For each such file separate notification will be sent (if notifications are enabled)
    • By the earliest file - all files match the glob pattern will be transferred simultaneously - when the earliest file from them corresponds to all conditions of the transition rule
    • By the latest file - all files match the glob pattern will be transferred simultaneously - when the latest file from them corresponds to all conditions of the transition rule
  • Condition (mandatory) - additional condition that shall be met to initiate the transition procedure. The control shall be a dropdown list, multi-select is disabled. Possible variants:
    • Default - no additional conditions are required
    • Files matches - if this condition is selected, a new field appears - to specify additional glob pattern. In this case, transition of the files that match main glob pattern can be performed only after in the root path the files will appear that match this additional glob pattern. Example - rule for transition of CSV files in case of TSV files appear:
      image
  • Transitions - there, shall be a list of destinations where exactly files shall be transferred and in which dates. By default, at least one item shall be in the list. Each item shall include fields:
    • Destination (mandatory) - destination where files matches the glob pattern shall be transferred. The control shall be a dropdown list, multi-select is disabled. Possible variants: S3 Glacier Instant Retrieval, S3 Glacier Flexible Retrieval (formerly S3 Glacier), S3 Glacier Deep Archive and Deletion
    • Date (mandatory) - date when files matches the glob pattern shall be transferred. There are two variants (only one can be selected for the rule):
      • specifying the count of days (from the file creation) after which the transition will be performed. For example, if in this field the count 30 is specified - so files match the glob pattern in the root path will be transferred to S3 Glacier Instant Retrieval after 30 days after their appearance in the current storage:
        image
      • specific date. If the specific date is selected - files match the glob pattern in the root path will be transferred exactly in that date:
        image

Additional destinations can be created by the "+ Add" button. There, 4 destinations can be maximum (according to the currently available possible AWS destinations). When user adds a new destination - in the corresponding Destination dropdown list, only destinations shall be available that were not used in the previous items. After, there are all possible destinations in the list, "+ Add" button shall disappear. There, shall be the ability to remove destination item from the list. Example of the several destinations in the list:
image

  • Notify - here, the settings for messages about files transition can be configured. In based scenario, recipients shall receive notifications about files transition before the period specified as "notice period". Users can click Prolongate button from the notification (message body) - in this case, transition will be delayed for days specified as Prolongation period, after prolongation period is over - a new notification shall be sent again. Prolongation can be repeated any times.
    • Disable all notifications for the current rule checkbox - if it is set, notifications for the current rule shall not be sent at all (regardless of the performed/prolonged transitions). If it is set, all controls below in the section shall be disabled
    • Recipients (optional) - list of notification recipients. If this list is empty - no one will receive notifications (except those users that are specified in the email notification settings)
    • Notice period (optional) - period in days before the date specified in Date field - when the notification about further transition will be sent. Note: if it is not specified - the default value shall be used from the email notification settings during the rule performing
    • Prolongation period (optional) - period in days for which the transition will be delayed in case when user clicks the Prolongate button. This prolongate period shall be applied explicitly to files for which notification is received. Note: if it is not specified - the default value shall be used from the email notification settings during the rule performing
    • Notification - expanding section that shall include fields for templates of the notification subject and body. By default, these fields shall be hidden. Instead of them, the enabled checkbox "Use default template" shall be shown. In this case, values from the email notification settings will be used when building message. Once user unselects the checkbox "Use default template", fields for notification subject and body shall appear, these fields shall be filled in by the corresponding values from the email notification settings. Additionally, user shall have the ability to view/edit these fields and also preview - how the notification will be displayed in the email. If the notification subject/body will be changed via this section - it shall impact only to the ending view of the current rule notifications and shall not change the default templates in the email notification settings. Expanded section shall have the same view as it was implemented for the EMAIL NOTIFICATIONS tab of the System Settings, e.g.:
      image

When the new rule is created, it will appear in the list, e.g.:
image

This form shall contain the list of all transition rules configured for the current storage.
For each rule, there shall be:

  • short info (Root path, Glob, Transition destinations)
    Note: if for the same rule, there are several destinations were specified - only the first shall be shown in the table, all other shall be displayed as a hyperlink in the format + <additional_count> more, where <additional_count> = count of specified destinations for the rule - 1. For 3 destinations for the same rule, see an example on the image above. By click such link, the list of additional destinations specified for the rule shall appear in a tooltip
  • the control to edit a rule. By click this button, a form like described above shall be opened with the rule settings
  • the control to view rule logs - logs of all transitions/prolongations performed via the current rule (see details below)
  • the control to remove a rule

Example of the several rules for a storage:
image

View rules

If user opens any folder in the storage, and for that folder any rule is configured - that info shall be displayed in the Attributes panel of the folder, e.g.:
image

  • a rule should be considered to belong to this folder if the folder is specified as Root path in that rule
  • if no rule has the current folder specified as Root path - this info label shall be hidden

Rule logs

By click the Logs button for any rule - a new form shall appear. This form shall include logs of all transitions/prolongations performed via the current rule, e.g.:
image
image

That form shall contain:

  • info fields - short info about the current rule (Root path, Glob)
  • Action type dropdown list - to filter logs table by performed action (it may be transition/deletion/prolongation):
    • If the rule has transition destination S3 Glacier Instant Retrieval, S3 Glacier Flexible Retrieval, S3 Glacier Deep Archive, this dropdown list shall have only items Transition and Prolongation. Empty value is allowed - in this case, logs table shall not be filtered
    • If the rule has transition destination Deletion, this dropdown list shall have only items Deletion and Prolongation. Empty value is allowed - in this case, logs table shall not be filtered
  • logs table with columns:
    • Date - datetime of the event
    • Action - it may be one of the system actions - Transition or Deletion, or manual user action - Prolongation
    • User - in case of system actions, there should be system stub. In case of Prolongation, there should be a user name who has prolonged transition for a file(s)
    • Path - path to the file/folder, with which the action was performed
    • Destination - transition destination
    • Prolongation - period in days for which transition/deletion was delayed (Note: only for prolonged files)
    • Renewed transition - a new date when transition/deletion shall take place (Note: only for prolonged files)

Notifications

A new notification type shall be added to Email Notifications (e.g. DATASTORAGE_LIFECYCLE_ACTION).
Default template of the notification shall include subject, text, recipients. Template shall contain a link to delay data transition.

Also via the notification settings, there shall be the ability:

  • to define default notice period (i.e. when data is close up to N days to transition). This date can be overridden by the specific rule field
  • to define default prolongation period. This period can be overridden by the specific rule field

Restoring files

If there are files in the storage folder that were previously transferred to any S3 Glacier destination according to some transition rule - admin or owner shall have the ability to restore such files.
This ability shall be available:

  • for separate files
  • for whole folder. In this case, all previously transferred files in that folder shall be restored identically. Also, all transferred files in sub-folders of the folder, should be restored too - recursively.

Restore separate file

To restore a file - user should select it.
In the file management menu (above the files list), a new button shall appear, e.g.:
image

By click this button, a pop-up shall appear, e.g.:
image
Here, user shall specify:

  • the period duration for which the file shall be restored. Restore duration period can not be empty. Default value for this field shall be received from the preference
  • recipients who shall be notified about file restoring process (by email notifications). This field can be left empty - in this case, file will be restored without notifications
  • additionally, only in case when the storage is versioning storage, user shall have the ability to define - restore only the latest file version (default behavior) or all versions - via the corresponding checkbox:
    image

After period and recipients are specified - user shall confirm to proceed.

Note: user shall have the ability to restore several files simultaneously in described way. In this case, user shall select desired files and click the same button as for the single file. Pop-up to confirm restoring shall look like:
image
All selected files will be restored for the same period

If restoring for a file is requested, in the file row, the restoring status shall be shown.
There are possible states:

  • RESTORING - when restore operation is in progress. This status shall be shown after the request for the restore was submitted and until the file is restored successfully or restoring is failed. Status shall be shown as additional label in the file row, e.g.:
    image
  • RESTORE FAILED - when restore operation is failed. This status shall not be shown at the GUI
  • RESTORED TILL <DATE> - when restore operation is completed. This status shall be shown after the file is restored successfully and till the date when the recovery period is finished. Status shall be shown as additional label in the file row, e.g.:
    image

Note: when hovering such status label, the tooltip with the corresponding status text shall appear

Example of statuses:
image

When restore period is over, restore status shall disappear.

Restore whole folder

Restoring of the whole folder (i.e. recursively restoring of all files in that folder, previously transferred to some S3 Glacier) shall be available via additional control in the Attributes panel of the folder, e.g.:
image

By click this control, a pop-up shall appear, e.g.:
image

Note: options and settings for that pop-up shall be similar to the pop-up of the single file restoring

After restoring for a folder is requested, in the Attribute panel, the restoring status shall be shown.
There are possible statuses:

  • Restore in progress - when restore operation is in progress
  • Restore was failed - when restore operation is failed. This status shall not be shown at the GUI
  • Restore is completed. Folder is restored till <DATE> - when restore operation is completed. <DATE> - the end date of the recovery period

Example:
image
When restore period is over, restore status shall disappear.

Other options

  • All S3 objects lifecycle events (transitions, prolongations, deletions) shall be additionally logged in the System logs of the platform. Restoring operations shall be logged in the System logs too. For details see Extend Security Logs with Storage Lifecycle Events #2797
  • To the Cloud Regions settings, add a new field - "Storage Lifecycle Service properties" - to save config of the lifecycle service. It shall be a text input field, that waiting for input in JSON format, e.g.:
    image
    Details:
@NShaforostov NShaforostov added the kind/enhancement New feature or request label Aug 2, 2022
@NShaforostov NShaforostov changed the title S3 objects lifecycle GUI [DRAFT] S3 objects lifecycle GUI Aug 2, 2022
@NShaforostov NShaforostov added sys/gui Issues related to the web gui sys/core Issues related to core functionality (API, VM management, ...) labels Aug 9, 2022
@NShaforostov NShaforostov changed the title [DRAFT] S3 objects lifecycle GUI S3 objects lifecycle GUI Aug 25, 2022
AleksandrGorodetskii added a commit that referenced this issue Aug 25, 2022
…lidations. Remove system default settings from notify form
AleksandrGorodetskii added a commit that referenced this issue Aug 25, 2022
AleksandrGorodetskii added a commit that referenced this issue Aug 25, 2022
AleksandrGorodetskii added a commit that referenced this issue Aug 26, 2022
…y 'Path'. Mark 'Delete' transitions. Style adjustments
AleksandrGorodetskii added a commit that referenced this issue Aug 26, 2022
AleksandrGorodetskii added a commit that referenced this issue Aug 30, 2022
AleksandrGorodetskii added a commit that referenced this issue Sep 2, 2022
rodichenko added a commit that referenced this issue Sep 8, 2022
AleksandrGorodetskii added a commit that referenced this issue Sep 8, 2022
rodichenko added a commit that referenced this issue Sep 8, 2022
#2792)

* GUI S3 Objects lifecycle (#2759): add s3 objects lifecycle tab to edit storage modal

* GUI S3 Objects lifecycle (#2759): set required and default values. Validations. Remove system default settings from notify form

* GUI S3 Objects lifecycle (#2759): History modal - change filter select to multiselect. Refactoring

* GUI S3 Objects lifecycle (#2759): Datastorage metadata panel - add lifecycle rules counter

* GUI S3 Objects lifecycle (#2759): Remove STS/LTS durations from storage creation and edit storage forms

* GUI S3 Objects lifecycle (#2759): Transition rules tab - sort rules by 'Path'. Mark 'Delete' transitions. Style adjustments

* GUI S3 Objects lifecycle (#2759): Disable 'Glob' and 'Root path' inputs when editing an existing rule

* GUI S3 Objects lifecycle (#2759): Disable 'Save' button if form values has not changed

* GUI S3 Objects lifecycle (#2759): fix new rule creation form modified state check

* GUI S3 Objects lifecycle (#2759): Collapse notify panel if method 'ONE_BY_ONE' selected. Minor style adjustments

* GUI S3 Objects lifecycle (#2759): add user info to rule history table (prolongations)

* GUI S3 Objects lifecycle (#2759): notifications recipients: move from informedUserIds to recipients API field

* GUI S3 Objects lifecycle (#2759): 'Use default template' checkbox

* S3 objects lifecycle GUI (#2759) - refactoring

* S3 objects lifecycle GUI (#2759) - History: root & glob mismatch fixed; "transition rule(s)" text fixed

* GUI S3 Objects lifecycle (#2759): Use default template for 'body' and 'subject' from settings

* GUI S3 Objects lifecycle (#2759): delete rule - confirm dialog

* GUI S3 Objects lifecycle (#2759): delete rule - remove unnecessary async

* S3 objects lifecycle GUI (#2759) - History: momentjs warning fix

Co-authored-by: Mikhail Rodichenko <Mikhail_Rodichenko@epam.com>
AleksandrGorodetskii added a commit that referenced this issue Sep 9, 2022
rodichenko pushed a commit that referenced this issue Sep 9, 2022
@maryvictol
Copy link
Collaborator

@rodichenko , @AleksandrGorodetskii

Bug:
Restore transferred item button shouldn't be shown for folders in the NFS Storage.
To reproduce:

  1. Open NFS Storage
  2. Tick checkbox for any folder

Actual result:
Restore transferred item button appears.

rodichenko pushed a commit that referenced this issue Oct 5, 2022
@maryvictol
Copy link
Collaborator

@rodichenko, @AleksandrGorodetskii

Bug:
Download and Restore version buttons shouldn't be shown for versions of archived files.

image

@maryvictol
Copy link
Collaborator

@rodichenko, @AleksandrGorodetskii

Bug:
For shared files and folders:

  • Download button is shown for the DEEP_ARCHIVE and GLACIER_IR archived files.
  • Download button isn't shown for restored files.

To reproduce:

  1. Open the folder that contains archived and restored files with statuses GLACIER, GLACIER_IR and DEEP_ARCHIVE
  2. Click Share current folder button
  3. In the Select users / groups to share folder pop up select user
  4. Click SAVE AND SHARE button
  5. Copy the shared folder link
  6. Open link. Login as user from step 3

Expected result:

  • Download button isn't shown for all types of archived files.
  • Download button is shown for all restored files.

@maryvictol
Copy link
Collaborator

@SilinPavel

Case:
It is impossible to restore a transferred file that has archived versions and its latest version has been deleted.

image

AleksandrGorodetskii added a commit that referenced this issue Oct 6, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 10, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 10, 2022
…settings and transition rules preview (#2759) - field subject renders into 'div' (instead iframe)
rodichenko pushed a commit that referenced this issue Oct 11, 2022
…tons for versions of archived files

GUI S3 Objects lifecycle (#2759): lifecycle rules history: transition status icons
rodichenko pushed a commit that referenced this issue Oct 11, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 13, 2022
rodichenko pushed a commit that referenced this issue Oct 14, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 19, 2022
rodichenko pushed a commit that referenced this issue Oct 20, 2022
rodichenko pushed a commit that referenced this issue Oct 20, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 21, 2022
rodichenko pushed a commit that referenced this issue Oct 21, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 24, 2022
@maryvictol
Copy link
Collaborator

maryvictol commented Oct 25, 2022

@SilinPavel

Case:
The file in the storage with enabled versioning has several versions and its latest version has Standard status and old ones are archived.
It is impossible to restore old versions of file directly because *Restore transferred item button isn't shown for such files.

Old versions can be restored only either when restoring the folder containing this file, or if we select some other archived file along with it.

rodichenko pushed a commit that referenced this issue Oct 25, 2022
AleksandrGorodetskii added a commit that referenced this issue Oct 31, 2022
…tatic preview) for archived and not restored files
NShaforostov added a commit that referenced this issue Nov 7, 2022
NShaforostov added a commit that referenced this issue Nov 7, 2022
- 'Sensitive storages' (#1036)
- 'Tool image history' (#1140)
- 'Custom run capabilities' (#2234, #2295, #2323)
- 'Storage Lifecycle' (#2721, #2759)
@NShaforostov NShaforostov added the state/has-doc Issues that have documentation label Nov 7, 2022
@NShaforostov
Copy link
Collaborator Author

Docs were added via #2547 and can be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request state/has-doc Issues that have documentation sys/core Issues related to core functionality (API, VM management, ...) sys/gui Issues related to the web gui
Projects
None yet
Development

No branches or pull requests

5 participants