Skip to content

Commit

Permalink
Merge pull request #2350 from skriss/allow-plugins-dir
Browse files Browse the repository at this point in the history
allow plugins/ as a valid directory in the BSL bucket
  • Loading branch information
ashish-amarnath committed Mar 17, 2020
2 parents d846b47 + 32ab45f commit 016df40
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/2350-skriss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow `plugins/` as a valid top-level directory within backup storage locations. This directory is a place for plugin authors to store arbitrary data as needed. It is recommended to create an additional subdirectory under `plugins/` specifically for your plugin, e.g. `plugins/my-plugin-data/`.
1 change: 1 addition & 0 deletions pkg/persistence/object_store_layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewObjectStoreLayout(prefix string) *ObjectStoreLayout {
"restores": path.Join(prefix, "restores") + "/",
"restic": path.Join(prefix, "restic") + "/",
"metadata": path.Join(prefix, "metadata") + "/",
"plugins": path.Join(prefix, "plugins") + "/",
}

return &ObjectStoreLayout{
Expand Down
7 changes: 7 additions & 0 deletions pkg/persistence/object_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ func TestIsValid(t *testing.T) {
},
expectErr: false,
},
{
name: "backup store with plugins directory is valid",
storageData: map[string][]byte{
"plugins/vsphere/foo": {},
},
expectErr: false,
},
}

for _, tc := range tests {
Expand Down

0 comments on commit 016df40

Please sign in to comment.