Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

spec/discovery.md: URL substitution example is wrong #680

Closed
mcluseau opened this issue Jan 4, 2017 · 3 comments
Closed

spec/discovery.md: URL substitution example is wrong #680

mcluseau opened this issue Jan 4, 2017 · 3 comments

Comments

@mcluseau
Copy link
Contributor

mcluseau commented Jan 4, 2017

spec/discovery.md says

The template for the discovery URL is:
https://{name}?ac-discovery=1

and

the effective equivalent of:
urltmpl="https://{name}-{version}-{os}-{arch}.{ext}"
curl $(echo "$urltmpl" | sed -e "s/{name}/$name/" -e "s/{version}/$version/" -e "s/{os}/$os/" -e "s/{arch}/$arch/" -e "s/{ext}/$ext/")

Since name=example.com/reduce-worker, the example result should be

Signature:  https://storage.example.com/linux/amd64/example.com/reduce-worker-1.0.0.aci.asc
ACI:        https://storage.example.com/linux/amd64/example.com/reduce-worker-1.0.0.aci

instead of

Signature:  https://storage.example.com/linux/amd64/reduce-worker-1.0.0.aci.asc
ACI:        https://storage.example.com/linux/amd64/reduce-worker-1.0.0.aci

This is at least what rkt does in my tests.

@jonboulle
Copy link
Contributor

Good catch! I thought this had been noted a while ago but can't seem to find a reference. Would you mind putting up a PR to fix it?

@mcluseau
Copy link
Contributor Author

mcluseau commented Jan 4, 2017

looked weird to me too but, well, just happens :) I'll PR in a few minutes.

@mcluseau
Copy link
Contributor Author

mcluseau commented Jan 4, 2017

Here you are.

jonboulle added a commit that referenced this issue Jan 4, 2017
fix(#680): spec/discovery.md: URL substitution example is wrong
indradhanush pushed a commit to kinvolk-archives/appc-spec that referenced this issue Jan 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants