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

Add sorting by creation time when --detailed flag is not specified. #1405

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

tewboat
Copy link
Contributor

@tewboat tewboat commented Dec 26, 2022

Pull request description

[Issue] (#1108)
Added GenericMetaInteractors for:

  • Mongo
  • Redis
  • Fdb
  • SqlServers

Interactors are used for fetching backup StartTime to sort backups by creation time.
Added sorting by creation time in DefaultHandleBackupList when --detailed flag is not specified.

@tewboat tewboat changed the title Issue/1108 Add sorting by creation time when --detailed flag is not specified. Dec 26, 2022
@usernamedt usernamedt self-requested a review December 27, 2022 09:12
Copy link
Member

@usernamedt usernamedt left a comment

Choose a reason for hiding this comment

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

Overall looks good, will merge after fixing the issues.

@@ -0,0 +1,8 @@
package internal
Copy link
Member

Choose a reason for hiding this comment

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

well, separate file for one struct is an overkill, I suggest to move it to internal/backup_list_handler.go

@@ -113,6 +140,27 @@ func SortBackupTimeSlices(backupTimes []BackupTime) {
})
}

func SortBackupTimeWithMetadataSlices(backupTimes []BackupTimeWithMetadata) {
order := ByCreationTime
Copy link
Member

Choose a reason for hiding this comment

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

Well, if we always sort by the creation time why separate if down below? I suggest to remove it

@tewboat tewboat force-pushed the issue/1108 branch 2 times, most recently from f2b9f7f to eb3cf84 Compare January 24, 2023 14: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.

None yet

2 participants