Commit d091eea
authored
Implement
## Problem
Backups and restore jobs for serverless indexes have been supported in
the `go-pinecone` SDK for a while, but they haven't been brought to the
CLI.
## Solution
- Implement backup command: create, list, describe, delete.
- Implement backup restore command: list, describe - backup restore
supports restoring indexes from backups as well. - Add unit tests for
`backup` and `restore` commands.
- Update `--json` flags to support shorthand `-j` across all commands.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)
## Test Plan
CI - unit & integration tests
There were new unit tests added for the backup commands. I've also
tested the flow of index -> backup -> restore job -> index manually.
```bash
pc backup create --index-name my-index --name my-index-backup --description "backup of my-index"
# list all backups for a project
pc backup list
# list backups for a specific index
pc backup list --index-name my-index
# describe backup and restore an index from that backup
pc backup describe --id backup-id-123-456
pc backup restore --id backup-id-123-456 --name my-index-restored
# list restore jobs
pc backup restore list
```
---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
- https://app.asana.com/0/0/1210811533821769backup command (serverless index backups / restore jobs) (#62)1 parent 254adb4 commit d091eea
File tree
516 files changed
+1420
-32
lines changed- .cache
- go-build
- 00
- 01
- 02
- 03
- 04
- 05
- 07
- 09
- 0d
- 0e
- 0f
- 11
- 12
- 13
- 16
- 17
- 18
- 19
- 1a
- 1b
- 1c
- 1e
- 1f
- 20
- 22
- 23
- 24
- 26
- 27
- 28
- 2a
- 2b
- 2c
- 2d
- 2e
- 2f
- 30
- 31
- 32
- 33
- 35
- 36
- 37
- 38
- 39
- 3a
- 3b
- 3c
- 3d
- 3e
- 40
- 41
- 42
- 43
- 44
- 45
- 47
- 48
- 4a
- 4c
- 4e
- 4f
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 58
- 59
- 5a
- 5b
- 5c
- 5d
- 5e
- 5f
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 6a
- 6b
- 6c
- 6d
- 6e
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 7c
- 7d
- 7f
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 8a
- 8b
- 8d
- 8e
- 8f
- 91
- 92
- 93
- 94
- 95
- 97
- 98
- 99
- 9a
- 9b
- 9c
- 9d
- 9e
- 9f
- a0
- a1
- a3
- a4
- a5
- a6
- a7
- a8
- a9
- aa
- ab
- ad
- ae
- af
- b0
- b1
- b2
- b3
- b4
- b5
- b9
- ba
- bb
- bc
- bd
- be
- c0
- c1
- c2
- c3
- c4
- c7
- c9
- ca
- cb
- cc
- cd
- ce
- cf
- d0
- d1
- d2
- d3
- d4
- d6
- d8
- da
- db
- dc
- dd
- df
- e0
- e1
- e3
- e4
- e5
- e6
- e7
- e8
- e9
- ea
- eb
- ec
- ed
- ee
- ef
- f0
- f2
- f3
- f4
- f5
- f6
- f8
- f9
- fa
- fb
- fc
- fd
- fe
- ff
- go-mod/cache/download
- github.com
- !make!now!just/heredoc/@v
- briandowns/spinner/@v
- charmbracelet
- bubbles/@v
- bubbletea/@v
- lipgloss/@v
- fatih/color/@v
- golang-jwt/jwt/v5/@v
- pinecone-io/go-pinecone/v5/@v
- rs/zerolog/@v
- spf13
- cobra/@v
- viper/@v
- stretchr/testify/@v
- golang.org/x
- oauth2/@v
- term/@v
- internal/pkg
- cli/command
- apiKey
- auth
- backup
- restore
- collection
- index
- namespace
- vector
- organization
- project
- root
- target
- utils/presenters
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
516 files changed
+1420
-32
lines changedBinary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Binary file not shown.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments