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

[Kopia wrappers - C] Separate out kopia commands from a single file #1552

Merged
merged 19 commits into from
Jul 28, 2022

Conversation

shlokc9
Copy link
Contributor

@shlokc9 shlokc9 commented Jul 13, 2022

Change Overview

This PR separates each kopia command into a separate file

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@@ -1,486 +0,0 @@
// Copyright 2022 The Kanister Authors.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we are introducing this file in #1526 and removing it here, would it make more sense to merge these two PRs and then it would be easier to review only one version of these changes?

@shlokc9 shlokc9 merged commit ef6367c into kopia-wrappers Jul 28, 2022
@shlokc9 shlokc9 deleted the kopia-wrappers-c branch July 28, 2022 11:36
mergify bot pushed a commit that referenced this pull request Sep 7, 2022
* Add kopia wrappers

* Add logsafe module

* Modify utils package

* Add errors package

* Add apis/config package

* Refactor kopia wrapper module

* Remove downstream user reference

* Address reviewer comments

* Separate constant files in Kopia package

* Add command logsafe

* Add utility functions

* Created sub-packages for repository and snapshot wrapper methods

* Add license info in constant files

* Move helper functions out of the kopia.go file

* Rename kopia.go to commands.go

* Rename OpenRepository, DeleteSnapshot and reportSnapshotStatus methods

* Convert constants and functions from local to global

* Fix constant in pkg/kopia/snapshot/stream.go

* Fix const description in pkg/kopia/utils.go

* Added some more utils functions

* Update maintenance info command and add maintenance utils

* Add Client keyword in constants and rename kankopia import alias in pkg/stream/stream.go

* Rename kopiaArgs to commonArgs

* Resolve cyclic import statements

* Rename cmd package to command

* Resolve cyclic commit

* Refactor separate log_output_utils.go

* Fix command utility import

* Remove nested loop

* Change log level to Debug

* [Kopia wrappers - C] Separate out kopia commands from a single file (#1552)

* Separate out kopia commands from a single file

* Combine wrapper functions

* Fix policyChanges in PolicySetGlobal command wrapper

* Move command wrapper arguments

* Add CommandArgs struct to pass args to command wrappers

* Convert local arguments to exportable arguments

* Change log level to Debug

* Remove unused const

* Fix for make gomod in CI

* Move RegEx as a const

* Rename pkg/kopia/command/kopia.go to pkg/kopia/command/common.go

* Rename log_output_utils.go to parse_command_output.go and Move output parsing functions from helpers.go to parse_command_output.go

* Group 'kopia blob' commands in single file

* Group 'kopia maintenance' commands in single file

* Group 'kopia server' commands in single file

* Move parent command functions closer in pkg/kopia/command/server.go

* Group 'kopia snapshot' commands in single file

* Group 'kopia snapshot' commands in single file

* rename commandArgs in all commands

* Simplify nil check in if statements

* Fix golang issues

* Fix golint issues

* Add recent changes to snapshot create stats parsed from the 'kopia snapshot create' command

* Fix go.mod issue in golint
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