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

Enh add snapshot feature WIP #900

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Conversation

gst
Copy link

@gst gst commented Jun 20, 2022

Would solve #897

@gst
Copy link
Author

gst commented Jun 20, 2022

@fschulze wdyt of this ?

@gst gst changed the title Enh add snapshot feature Enh add snapshot feature WIP Jun 21, 2022
.gitignore Outdated Show resolved Hide resolved
server/devpi_server/keyfs_sqlite_fs.py Outdated Show resolved Hide resolved
@@ -462,6 +462,10 @@ def create_app(self):
pyramid_config.add_view_deriver(self.view_deriver, under=INGRESS)
pyramid_config.add_view_predicate('content_type', ContentTypePredicate)

# snapshoting
pyramid_config.add_route("/+snapshot/{user}/{index}", "/+snapshot/{user}/{index}")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer the COPY HTTP method, if you have good arguments against that, then I would like /{user}/{index}/+copy. Snapshotting should be an option selected with ?snapshot.

server/devpi_server/model.py Outdated Show resolved Hide resolved
server/devpi_server/views.py Outdated Show resolved Hide resolved
server/devpi_server/views.py Outdated Show resolved Hide resolved
server/devpi_server/views.py Outdated Show resolved Hide resolved
server/devpi_server/views.py Outdated Show resolved Hide resolved
@fschulze
Copy link
Contributor

As a summary:

  • I wanted to add copy anyway
  • snapshot should be an option, on the server side with a query string, on the client side there should be copy and snapshot.
  • Try to use the pointers I gave to reuse existing functionality

I'm undecided whether we should allow this for mirror indexes. I currently lean towards forbidding it.

@gst gst force-pushed the enh-add-snapshot-feature branch from 55f3acf to 4f42341 Compare June 23, 2022 12:42
@fschulze
Copy link
Contributor

FYI, I rebased and squashed your branch at https://github.com/fschulze/devpi/tree/enh-add-snapshot-feature. I cherry picked some changes like the __repr__ stuff with some minor changes into main. I still didn't have time to take a deeper look.

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.

None yet

2 participants