-
Notifications
You must be signed in to change notification settings - Fork 158
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
upgrade/extended: Get latest release from update server #2626
upgrade/extended: Get latest release from update server #2626
Conversation
tests/kola/upgrade/extended/test.sh
Outdated
curl -L "https://updates.coreos.fedoraproject.org/v1/graph?basearch=$(arch)&stream=${stream}" > /srv/releases.json | ||
last_release=$(jq -r .nodes[-1].version /srv/releases.json) | ||
last_release_index=$(jq -r '.nodes[-1].metadata."org.fedoraproject.coreos.releases.age_index"' /srv/releases.json) | ||
latest_edge=$(jq -r .edges[0][1] /srv/releases.json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if the order of the edges was guaranteed, but we can probbably go with this for now until it proves to be a bad assumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw other streams json files, assumption's been true so far. Will keep an eye though.
tests/kola/upgrade/extended/test.sh
Outdated
@@ -75,10 +75,19 @@ get_booted_deployment_json() { | |||
version=$(get_booted_deployment_json | jq -r '.version') | |||
stream=$(get_booted_deployment_json | jq -r '.["base-commit-meta"]["fedora-coreos.stream"]') | |||
|
|||
# Pick up the last release for the current stream | |||
# Pick up the last release for the current stream from the update server | |||
test -f /srv/releases.json || \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think make let's not call this releases.json
any longer since we're pulling the information from somewhere else. Maybe updateinfo.json
or similar?
This test fails when it is run during the time period between the stream build and the release. Updated the test to get the last_release from update server and check if there's an edge pointing to it.
c4f9f49
to
d040188
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This test fails when it is run during the time period between the stream build and the release. Updated the test to get the
last_release
from update server and check if there's an edge pointing to it. If there is no pointing edge to ourlast_release
, we would just pick up the second last release from the json.