You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the resource is used in a get at the very beginning (first check request) there is nothing passed into the version.version field of the payload so the value of $version becomes empty, which breaks all the downstream logic for determining which url to use etc.
version is a JSON object with string fields, used to uniquely identify an instance of the resource. For git this would be a commit SHA.
This will be omitted from the first request, in which case the resource should return the current version (not every version since the resource's inception).
I suppose the only way to get the "current" version would be to do a curl upfront to get the latest version of the artifact that is present in the repository, but I do see how it might be a little tricky if you specify both url and snapshot_url. The way I see it, either we could determine which artifact version to check for the first check depending on which url values are present in the resource, or we could have a param.snapshot field in the get which can be a boolean to explicitly fetch a snapshot version?
Thanks for all the quick responses btw!
The text was updated successfully, but these errors were encountered:
I ran into this as well. Looks like it would only be a problem when you only have a snapshot url (which is the case for me). I ended up building my own image that uses the snapshot url if release is not present as a temporary workaround.
When the resource is used in a
get
at the very beginning (firstcheck
request) there is nothing passed into theversion.version
field of thepayload
so the value of$version
becomes empty, which breaks all the downstream logic for determining whichurl
to use etc.https://github.com/patrickcrocker/maven-resource/blob/master/assets/check#L31
As per the docs on implementing a resource:
I suppose the only way to get the "current" version would be to do a
curl
upfront to get the latest version of the artifact that is present in the repository, but I do see how it might be a little tricky if you specify bothurl
andsnapshot_url
. The way I see it, either we could determine which artifact version to check for the first check depending on whichurl
values are present in the resource, or we could have aparam.snapshot
field in theget
which can be a boolean to explicitly fetch a snapshot version?Thanks for all the quick responses btw!
The text was updated successfully, but these errors were encountered: