New issue
Advanced search Search tips

Issue 879896 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Support permalinks for packages

Project Member Reported by phosek@chromium.org, Sep 2

Issue description

The requirement is to being able to cURL the CIPD package via permanent URL that's handled by the CIPD service. The intended usage would look like:

curl -SL -o package.cipd https://chrome-infra-packages.appspot.com/p/path/to/package/linux-amd64?instance=<instance ID>

CIPD already allows downloading packages via signed GS URL, but these are valid only for limited period of time. We could support permalinks by implementing a handler that redirects to a signed GS URL. This is primarily intended for public packages (it will require Authorization header with an access token for private ones).
 
Cc: phosek@chromium.org
Labels: Pri-2 Type-Feature
Status: Available (was: Untriaged)
(I don't think this needs RVG?)
Owner: vadimsh@chromium.org
Status: Assigned (was: Available)
Labels: -Restrict-View-Google
How about https://chrome-infra-packages.appspot.com/d/<package>/+/<version> ? It will be slightly easier to implement  (/p/ prefix is already crowded). 'd' for 'download'.
That's fine with me, I don't have any particular preference for the URL. Another alternative might be 'dl' which is AFAIK also pretty common.
Ok. 'dl' indeed sounds cooler.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-go.git/+/dffd1081b775979aa1c5a8046d9a65adead1cee8

commit dffd1081b775979aa1c5a8046d9a65adead1cee8
Author: Vadim Shtayura <vadimsh@chromium.org>
Date: Tue Sep 18 22:28:59 2018

[cipd] Add '/dl/<package>/+/<version>' that redirects to a zip in GS.

It can be used by e.g. 'curl' to download packages (for users that for whatever
reason do not like using cipd client).

Also start putting X-Cipd-Instance header with resolved instance ID into redirect
responses. This may be useful when debugging fetches.

R=nodir@chromium.org, tandrii@chromium.org
BUG= 879896 

Change-Id: Ib93c7a5647f40458a5be87952a466be75ee673c0
Reviewed-on: https://chromium-review.googlesource.com/1231705
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/dffd1081b775979aa1c5a8046d9a65adead1cee8/cipd/appengine/impl/repo/repo.go
[modify] https://crrev.com/dffd1081b775979aa1c5a8046d9a65adead1cee8/cipd/appengine/impl/repo/repo_test.go
[modify] https://crrev.com/dffd1081b775979aa1c5a8046d9a65adead1cee8/cipd/appengine/ui/common.go
[modify] https://crrev.com/dffd1081b775979aa1c5a8046d9a65adead1cee8/cipd/common/common.go

Status: Fixed (was: Assigned)
This is deployed now.

For example: https://chrome-infra-packages.appspot.com/dl/infra/gsutil/+/latest

Sign in to add a comment