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

wrapdb server static v1 api mirror and nginx config update #1772

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tp-m
Copy link
Member

@tp-m tp-m commented Nov 4, 2024

See #1768 for background.

Content of this MR is basically from https://github.com/tp-m/wrapdb-v1-api-mirror/, seems better to have it right here in the repo next to the nginx config.

Closes #1768

@eli-schwartz
Copy link
Member

I'd prefer to avoid having all these files directly checked into git, though. e.g. we use GitHub Releases to store the ZIP files for all current releases because checking them into git tends to be rather suboptimal usage of git's object storage design.

@tp-m
Copy link
Member Author

tp-m commented Nov 4, 2024

Understood, but I'm just trying to document what's deployed right now on the server, so that it's easily possible to replicate the setup on a new machine if ever needed.

The size of the .zip files here is 977kB and that will not change going forward, since the v1 archive is frozen now.

If someone wants to make sure that all v1 zips (incl. sqlite) are available on github, so we can add redirects for them a la this be my guest.

In the meantime I'm just documenting what's what, and seeing the fairly small size I don't think it's worth worrying about too much.

@bgilbert
Copy link
Contributor

bgilbert commented Nov 4, 2024

Since these are derived artifacts of this repo, and not intended to change, it does seem awkward to commit them here as though they're the canonical editable copy. Keeping them in a separate Git repo seems to make sense - maybe we should just add some documentation pointing to https://github.com/tp-m/wrapdb-v1-api-mirror/?

@tp-m
Copy link
Member Author

tp-m commented Nov 4, 2024

Since these are derived artifacts of this repo, and not intended to change, it does seem awkward to commit them here as though they're the canonical editable copy. Keeping them in a separate Git repo seems to make sense - maybe we should just add some documentation pointing to https://github.com/tp-m/wrapdb-v1-api-mirror/?

Sure I can do that, just thought we might want to have everything together in one place.

@tp-m
Copy link
Member Author

tp-m commented Nov 9, 2024

Attaching it here as well then for posterity: v1-static.tar.gz

@tp-m
Copy link
Member Author

tp-m commented Nov 9, 2024

Updated.

@@ -19,7 +16,8 @@ server {
}

# Redirect legacy v1 patch URLs.
# FIXME: This breaks download of sqlite that has not been imported to v2 because it is replaced by sqlite3
# FIXME: This breaks download of sqlite that has not been imported to v2 because it is replaced by sqlite3 (xclaesse)
# NOTE: no longer needed, we now serve v1 patch URLs directly from a static files mirror (in /var/www/v1-static, see below) (Tim, Nov 2024)
Copy link
Member

Choose a reason for hiding this comment

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

If it's no longer needed, just remove it :)

Copy link
Member

Choose a reason for hiding this comment

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

OTOH, why not just use that redirect? Files are already hosted on github, we don't need another static mirror, do we?

Copy link
Member Author

Choose a reason for hiding this comment

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

As per my previous comment, if you want to make sure the files are all there including the old sqlite things I'm all for it, I'm just not planning to do that work, and I also suspect there might be some discussions otherwise surely you'd have just done it back when you added the comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we should break things is what I'm saying, so if you want to enable the redirect make sure it won't break anything.

Copy link
Member

Choose a reason for hiding this comment

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

I ran this test script inside wrapdb-v1-api-mirror repo:

import glob
import requests

for i in glob.glob('**/get_zip', recursive=True):
    parts = i.split('/')
    name = parts[2]
    version = parts[3]
    revision = parts[4]
    url = f'https://github.com/mesonbuild/wrapdb/releases/download/{name}_{version}-{revision}/{name}_{version}-{revision}_patch.zip'
    response = requests.get(url)
    if response.status_code == 200:
        print(url, 'OK')
    else:
        print(url, 'not found')

Missing URLs are:
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9c-4/libjpeg_9c-4_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9c-2/libjpeg_9c-2_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9c-3/libjpeg_9c-3_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9c-1/libjpeg_9c-1_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9a-4/libjpeg_9a-4_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9a-2/libjpeg_9a-2_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/libjpeg_9a-5/libjpeg_9a-5_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3310100-1/sqlite_3310100-1_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3320300-4/sqlite_3320300-4_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3320300-3/sqlite_3320300-3_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3320300-5/sqlite_3320300-5_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3250100-2/sqlite_3250100-2_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3250100-1/sqlite_3250100-1_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3230100-1/sqlite_3230100-1_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3080802-4/sqlite_3080802-4_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3080802-2/sqlite_3080802-2_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3080802-5/sqlite_3080802-5_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3140200-2/sqlite_3140200-2_patch.zip
https://github.com/mesonbuild/wrapdb/releases/download/sqlite_3140200-1/sqlite_3140200-1_patch.zip

IMHO it's fine to break queries and download of wraps, we just need to keep patch zips. Those 2 deps are trivial to update to v2, I don't think it's a big deal to break them, it's been deprecated for years.

Copy link
Member Author

Choose a reason for hiding this comment

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

If you want to break it, break it, just leave me out of it please.

I don't think we should break it if there's no need and there isn't really any need since it work just fine as it is now.

Just leave the v1 alone as-is I'd say. You're now breaking something that works for no good reason other than to make the config a bit tidier.

libjpeg and sqlite are common wraps and breaking wrapdb stuff even if old will leave a bad taste imho.

Anyway, this ticket is a docs update updating the nginx config to the status quo.

Perhaps other changes you want to make should be tracked separately 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

Re. "trivial to update" that's beside the point because people will be consuming third party source repositories/branches/tags that they can't easily update without switching to their own modified copies or overwriting the checkouts manually.

Copy link
Member

Choose a reason for hiding this comment

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

I now uploaded missing assets, the redirect URL should be enough.

@xclaesse
Copy link
Member

xclaesse commented Nov 13, 2024

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.

wrapdb.mesonbuild.com v1 API support
4 participants