question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Updater: Way to disable hash prefix for consistent_snapshot

See original GitHub issue

Currently if the repository is consistent_snapshot, Updater will prefix the target filename with the hash when constructing the download URL. In the Warehouse case this is not wanted (warehouse target file paths are “consistent”, even if the filenames are not).

This is an example of a working URL:

https://files.pythonhosted.org/packages/ca/ab/5e004afa025a6fb640c6e983d4983e6507421ff01be224da79ab7de7a21f/Django-3.0.8-py3-none-any.whl

But currently Updater will try to download

https://files.pythonhosted.org/packages/ca/ab/5e004afa025a6fb640c6e983d4983e6507421ff01be224da79ab7de7a21f/caab5e004afa025a6fb640c6e983d4983e6507421ff01be224da79ab7de7a21f.Django-3.0.8-py3-none-any.whl

If there is no way to figure this out automatically, then there should probably be a way to tell Updater that I Know What I’m Doing, don’t prefix filenames.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jkucommented, Aug 4, 2020

I guess modifying targetinfo between get_one_valid_targetinfo() and download_target() is not a great idea: the use of schemas for input data is actively trying to prevent this sort of thing.

That leaves us with the last option: Add a boolean argument to Updater API (either Updater __init__() or download_target()). It’s ugly but I don’t have better ideas ATM.

0reactions
jkucommented, Sep 7, 2020

Implemented in #1102

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Update Framework Specification
HASHES is OPTIONAL and can be omitted to reduce the snapshot metadata file size. In that case the repository MUST guarantee that VERSION...
Read more >
Disaster recovery - etcd
If the snapshot is copied from the data directory, there is no integrity hash and it will only restore by using --skip-hash-check ....
Read more >
Create a Snapshot policy - Product documentation - NetApp
A Snapshot policy specifies when to create Snapshot copies, how many copies to retain, and how to name them. For example, a system...
Read more >
Debezium connector for MySQL
Snapshots. When a Debezium MySQL connector is first started, it performs an initial consistent snapshot of your database. The following flow describes how...
Read more >
14.15 InnoDB Startup Options and System Variables
Disabling the adaptive hash index empties the hash table immediately. Normal operations can continue while the hash table is emptied, and executing queries...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found