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

upgrade/extended: Get latest release from update server #2626

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

gursewak1997
Copy link
Member

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 our last_release, we would just pick up the second last release from the json.

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)
Copy link
Member

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.

Copy link
Member Author

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.

@@ -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 || \
Copy link
Member

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.
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gursewak1997 gursewak1997 enabled auto-merge (rebase) September 21, 2023 20:20
@gursewak1997 gursewak1997 merged commit 235506b into coreos:testing-devel Sep 21, 2023
2 of 3 checks passed
@gursewak1997 gursewak1997 deleted the fix-upgradeext branch October 1, 2023 20:52
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

Successfully merging this pull request may close these issues.

kola-upgrade test failure when a stream build is built but not yet released
2 participants