discovery: fix HasPrefix in matching app name#594
Conversation
The following meta: <meta name="ac-discovery" content="coreos.com/etcd https://github.com/coreos/etcd/releases/download/{version}/etcd-{version}-{os}-{arch}.{ext}"> Should make the following discoverable: actool discover coreos.com/etcd/fdfdsffds:v2.0.10 actool discover coreos.com/etcd:v2.0.10 But not the following: actool discover coreos.com/etcdxxxxxxx:v2.0.10 This is now fixed by checking the character '/' in addition to HasPrefix. Fixes appc#592
|
Interesting case. Now the spec just uses |
|
Hrm, I think this is unfortunate but expected. Once the client gets the image it would find the name doesn't match. |
|
I think we should just update #594 (comment) to clarify that it should be either be an exact or |
|
Actually it isn't really causing a problem (since in #592 rkt doesn't complain due to the But keeping |
|
@sgotti are you suggesting just leaving this as-is? |
|
@jonboulle I'm on the fence. On one side this isn't causing problems if the discovery url consumer checks the image manifest name with the provided name, on the other side doing a path matching instead of a prefix match makes more sense (in my previous sentence I tried to say that, if this is going to be changed, there's the need to find a better replacement for the |
The following meta:
Should make the following discoverable:
But not the following:
This is now fixed by checking the character '/' in addition to
HasPrefix.
Fixes #592