Skip to content

Conversation

mikeland73
Copy link
Contributor

Summary

Renames devbox cache copy to devbox cache upload. Also changes the interface to use --to flag for cache URI. This allows easier use if cache is provided by jetpack API.

e.g.

# upload project packages to jetpack provided cache
devbox cache upload

# upload installable to jetpack provided cache
devbox cache upload <installable>

If user wishes to specify cache URI, they can do:

# upload project
devbox cache upload --to 's3://mike-test-nix-cache?region=us-west-2'

# upload single installable
devbox cache upload --to 's3://mike-test-nix-cache?region=us-west-2' nixpkgs#php

How was it tested?

devbox cache upload --to 's3://mike-test-nix-cache?region=us-west-2'
devbox cache upload --to 's3://mike-test-nix-cache?region=us-west-2' nixpkgs#php

Inspected cache on aws.

@mikeland73 mikeland73 requested review from gcurtis and savil March 28, 2024 21:36
uploadCommand := &cobra.Command{
Use: "upload [installable]",
Aliases: []string{"copy"}, // This mimics the nix command
Short: "upload specified or nix packages in current project to cache",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't follow this description at all!

Copy link
Collaborator

Choose a reason for hiding this comment

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

upload specified nix installable or nix packages in current project to cache

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will improve

@mikeland73 mikeland73 force-pushed the landau/upload-command branch from b9fa69d to 455647b Compare March 29, 2024 16:25
Base automatically changed from landau/get-cache-config to main March 29, 2024 18:04
@mikeland73 mikeland73 force-pushed the landau/upload-command branch from 633a18c to 1b54264 Compare March 29, 2024 18:05
@mikeland73 mikeland73 merged commit 8bf4dfa into main Mar 29, 2024
@mikeland73 mikeland73 deleted the landau/upload-command branch March 29, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants