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

false positive outdated response #2

Closed
lalyos opened this issue Sep 3, 2014 · 3 comments
Closed

false positive outdated response #2

lalyos opened this issue Sep 3, 2014 · 3 comments

Comments

@lalyos
Copy link
Contributor

lalyos commented Sep 3, 2014

I was testing the latest consul v0.4.0rc, and got a strange message

==> Newer Consul version available: 0.3.1

which is caused by the response from checkpoint-server:

curl -s https://checkpoint-api.hashicorp.com/v1/check/consul?version=0.4.0rc|jq .

{
  "product": "consul",
  "current_version": "0.3.1",
  "current_release": 1409692701,
  "current_download_url": "https://bintray.com/mitchellh/consul/consul/0.3.1/view/files",
  "current_changelog_url": "https://github.com/hashicorp/consul/blob/v0.3.1/CHANGELOG.md",
  "outdated": true,
  "project_website": "http://www.consul.io",
  "alerts": []
}

Tests

Looks like the rc VersionPrerelease attached to Version makes the server think its outtaded.

  • version: 0.3.1rc outdated: true
  • version: 0.3.1 outdated: false
  • version: 0.4.0 outdated: false
  • version: 0.4.0rc outdated: true

So actually its not an issue with the checkpoint-client, but rather the checkpoint-server but its not opensourced.

Btw I really like the concept of the checkpoint-service, is it planned to put it on github?

@pearkes
Copy link

pearkes commented Sep 3, 2014

Thanks @lalyos!

You're right, this is an issue with the server. It currently doesn't support pre-release fields, though that should come really soon.

@ryanuber
Copy link
Member

ryanuber commented Feb 6, 2015

@lalyos sorry for the delay. This does looks wrong, it seems like each part of the version is just compared lexically. Part of the problem is that our RC's should really be labeled x.x.x-rcx (with the dash). I'll circle back to this soon and get it fixed. Thanks!

@lalyos
Copy link
Contributor Author

lalyos commented Feb 7, 2015

Thanks @ryanuber. You are right when, the x.x.x-rcx pattern is used, than the checkpoint api returns the correct answer:

$ curl -s "https://checkpoint-api.hashicorp.com/v1/check/terraform?version=0.3.7-x"|jq .outdated                                                                            
null

 $ curl -s "https://checkpoint-api.hashicorp.com/v1/check/terraform?version=0.3.7.x"|jq .outdated
true

I created a PR for terraform, with a local build i dont't get the false positive outdated anymore:

$ terraform version
Terraform v0.3.7-dev

# no outdated message anymore

@lalyos lalyos closed this as completed Feb 8, 2015
lalyos added a commit to sequenceiq/packer that referenced this issue Feb 8, 2015
lalyos added a commit to sequenceiq/packer that referenced this issue Feb 8, 2015
lalyos added a commit to sequenceiq/consul that referenced this issue Feb 9, 2015
yahyapo pushed a commit to yahyapo/terraform that referenced this issue Mar 13, 2015
KFishner pushed a commit to KFishner/packer that referenced this issue Jul 28, 2015
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

No branches or pull requests

3 participants