Skip to content

Incorporate changes for restic standalone pkg#77

Merged
anisurrahman75 merged 4 commits intomasterfrom
rewrite-restic
Feb 16, 2026
Merged

Incorporate changes for restic standalone pkg#77
anisurrahman75 merged 4 commits intomasterfrom
rewrite-restic

Conversation

@arnab-baishnab
Copy link
Collaborator

No description provided.

Signed-off-by: Arnab Baishnab Nipun <nipun@appscode.com>
Copilot AI review requested due to automatic review settings February 9, 2026 13:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR vendors and switches the CLI to use the new standalone gomodules.xyz/restic package instead of kubestash.dev/apimachinery/pkg/restic, aiming to support “restic standalone pkg” integration.

Changes:

  • Added vendored gomodules.xyz/restic module and updated go.mod/go.sum/vendor/modules.txt.
  • Updated CLI commands to import gomodules.xyz/restic and adjusted setup to pass encryption secrets as *core.Secret.
  • Added a helper to fetch the encryption secret from the cluster.

Reviewed changes

Copilot reviewed 8 out of 28 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
go.mod / go.sum Adds dependency on gomodules.xyz/restic and updates module sums.
vendor/modules.txt Vendors gomodules.xyz/restic with explicit Go version info.
vendor/gomodules.xyz/restic/* Introduces the standalone restic wrapper implementation (commands, backend config, env setup, locking helpers, etc.).
pkg/view.go Switches restic import and updates wrapper setup for manifest viewing.
pkg/download.go Switches restic import and updates wrapper setup for snapshot download.
pkg/restore.go Switches restic import and updates wrapper setup for manifest restore flow.
pkg/unlock.go Switches restic import and updates wrapper setup for unlock flow.
pkg/add_key.go Switches restic import and updates wrapper setup for restic key management.
pkg/common/types.go Updates restic types in shared options to the new module.
pkg/util.go Adds getEncryptionSecret helper for retrieving core.Secret.
Comments suppressed due to low confidence (1)

pkg/add_key.go:146

  • gomodules.xyz/restic requires Backend.ConfigResolver (plus storage credentials in StorageSecret) to be present during wrapper configuration. The backend created here lacks those fields, so NewResticWrapper will fail before running the docker restic command. Add a resolver that loads the referenced BackupStorage + secret data into the backend.
	setupOptions := &restic.SetupOptions{
		Backends: []*restic.Backend{
			{
				Repository:       opt.repo.Name,
				EncryptionSecret: encryptSecret,
			},
		},
		ScratchDir: ScratchDir,
	}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Arnab Baishnab Nipun <nipun@appscode.com>
Signed-off-by: Arnab Baishnab Nipun <nipun@appscode.com>
Signed-off-by: Arnab Baishnab Nipun <nipun@appscode.com>
@anisurrahman75 anisurrahman75 merged commit 019b6ba into master Feb 16, 2026
4 checks passed
@anisurrahman75 anisurrahman75 deleted the rewrite-restic branch February 16, 2026 10:15
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.

3 participants