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

Change imagestreamtag sorting #17430

Merged

Conversation

miminar
Copy link

@miminar miminar commented Nov 22, 2017

  • Sort istags alphabetically during schema conversion
  • Version prefix matters when sorting tags names

Forward-port of openshift/ose#932

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 22, 2017
@miminar
Copy link
Author

miminar commented Nov 22, 2017

/test

@bparees
Copy link
Contributor

bparees commented Nov 22, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 22, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2017
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@miminar miminar force-pushed the sort-istags-alphabetically branch from 3708d5b to 5ba167d Compare November 23, 2017 05:35
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 23, 2017
@miminar miminar force-pushed the sort-istags-alphabetically branch 2 times, most recently from a6d7721 to 74aa730 Compare November 23, 2017 11:24
@soltysh
Copy link
Contributor

soltysh commented Nov 23, 2017

The error from test is valid:

test/cmd/images.sh:286: executing 'oc get is perl --template '{{(index .status.tags 0).tag}}'' expecting success and text 'latest'
FAILURE after 0.218s: test/cmd/images.sh:286: executing 'oc get is perl --template '{{(index .status.tags 0).tag}}'' expecting success and text 'latest': the output content test failed
Standard output from the command:
5.16

Latest has to go first always.

Michal Minář added 2 commits November 23, 2017 13:55
Make sure that 'v' prefix is taken into account.

Sort identical tag names with 'v' prefix at the end.

Signed-off-by: Michal Minář <[email protected]>
@miminar miminar force-pushed the sort-istags-alphabetically branch from 74aa730 to 691009b Compare November 23, 2017 12:55
@miminar
Copy link
Author

miminar commented Nov 23, 2017

@soltysh this list is a result of conversion from internal to v1 scheme, right? Why the latest has to be first here?

The oc describe is <isname> and importer still sort the tags in expected way.

@mfojtik
Copy link
Contributor

mfojtik commented Nov 23, 2017

not having :latest in the list of imported tags (when the # of tags we import is limited) will likely cause problems :-) I would pickup :latest as first and then every other tags.

@soltysh
Copy link
Contributor

soltysh commented Nov 23, 2017

@soltysh this list is a result of conversion from internal to v1 scheme, right? Why the latest has to be first here?

That conversion also does sorting, iirc. I had a discussion with @smarterclayton about it long time ago. We need to provide stable output, both from our CLI and API.

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 23, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bparees, miminar, soltysh

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@miminar
Copy link
Author

miminar commented Nov 23, 2017

not having :latest in the list of imported tags (when the # of tags we import is limited) will likely cause problems :-) I would pickup :latest as first and then every other tags.

As I said before, the change doesn't affect which tags the importer picks up. It affects the order of tags in a serialized image stream though. I don't see it as very important but you may know better. @smarterclayton suggested to start sorting the tags in conversions alphabetically to have a stable sort algorithm without bugs :-).

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 16538, 17430, 17432, 17433, 17442).

@openshift-merge-robot openshift-merge-robot merged commit 2f437b0 into openshift:master Nov 23, 2017
@openshift-ci-robot
Copy link

@miminar: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_install_update 691009b link /test extended_conformance_install_update
ci/openshift-jenkins/extended_conformance_install 691009b link /test extended_conformance_install

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@miminar miminar mentioned this pull request Nov 24, 2017
openshift-merge-robot added a commit that referenced this pull request Nov 30, 2017
Automatic merge from submit-queue (batch tested with PRs 17451, 17501).

Fix tag prioritization

"v" tag prefix has the least priority.

A follow-up for #17430
@miminar
Copy link
Author

miminar commented Dec 6, 2017

/cherry-pick release-3.7

@miminar miminar deleted the sort-istags-alphabetically branch February 22, 2018 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants