Skip to content

Acceptance: Handle numerical version names in version comparison helpers#2764

Merged
EmilienM merged 2 commits intogophercloud:masterfrom
shiftstack:fix-IsReleasesAbove
Sep 22, 2023
Merged

Acceptance: Handle numerical version names in version comparison helpers#2764
EmilienM merged 2 commits intogophercloud:masterfrom
shiftstack:fix-IsReleasesAbove

Conversation

@mandre
Copy link
Copy Markdown
Contributor

@mandre mandre commented Sep 7, 2023

There are two changes here:

  • rename the IsReleasesBelow() and IsReleasesAbove() functions to IsCurrentBelow() and IsCurrentAbove() respectively.
  • fix their behavior to account for numerical release names, after zed, and ensure that
    comparing the same version always yields false. Also fixing bugs when comparing to master and add comprehensive tests.

@github-actions github-actions bot added the semver:major Breaking change label Sep 7, 2023
@EmilienM EmilienM added semver:patch No API change and removed semver:major Breaking change labels Sep 7, 2023
@EmilienM
Copy link
Copy Markdown
Contributor

EmilienM commented Sep 7, 2023

I changed the label manually before our workflow doesn't know (yet) that it's acceptance and that API is not maintained here.
I also fixed the failure via #2765 .

@@ -0,0 +1,66 @@
//go:build acceptance
// +build acceptance
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please put that file into a testing directory or this will be skipped by the unittest (in fact coverage) job. See

for testpkg in $(go list ./testing ./.../testing); do

@mandre mandre force-pushed the fix-IsReleasesAbove branch from c157f91 to 69d9d05 Compare September 8, 2023 05:49
@github-actions github-actions bot added semver:major Breaking change and removed semver:patch No API change semver:major Breaking change labels Sep 8, 2023
@mandre mandre added semver:patch No API change and removed semver:major Breaking change labels Sep 8, 2023
@mandre
Copy link
Copy Markdown
Contributor Author

mandre commented Sep 8, 2023

The go-apidiff failure should be fixed with joelanford/go-apidiff@0511785. Waiting for a new release.

@EmilienM
Copy link
Copy Markdown
Contributor

EmilienM commented Sep 8, 2023

The go-apidiff failure should be fixed with joelanford/go-apidiff@0511785. Waiting for a new release.

no, you'll need to rebase your PR on top of #2773 once merged, and the job will be happy. However the job will set the label to semver:major because again we don't make a difference of API chances in the directories, for now.

@mandre
Copy link
Copy Markdown
Contributor Author

mandre commented Sep 11, 2023

the job will set the label to semver:major because again we don't make a difference of API chances in the directories, for now.

joelanford/go-apidiff#36 will help.

Rename to IsCurrentBelow() and IsCurrentAbove() respectively.
@mandre mandre force-pushed the fix-IsReleasesAbove branch from 69d9d05 to 8de831b Compare September 22, 2023 12:09
@github-actions github-actions bot added semver:major Breaking change and removed semver:patch No API change labels Sep 22, 2023
Take into account numerical release names, after zed, and ensure that
comparing the same version always yields false.
@mandre mandre force-pushed the fix-IsReleasesAbove branch from 8de831b to 5819dc0 Compare September 22, 2023 12:15
@github-actions github-actions bot added semver:major Breaking change and removed semver:major Breaking change labels Sep 22, 2023
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 77.415% (-1.7%) from 79.112% when pulling 5819dc0 on shiftstack:fix-IsReleasesAbove into 5aa45b6 on gophercloud:master.

@mandre mandre added semver:patch No API change and removed semver:major Breaking change labels Sep 22, 2023
@EmilienM EmilienM added the backport-v1 This PR will be backported to v1 label Sep 22, 2023
@EmilienM EmilienM merged commit d6e2741 into gophercloud:master Sep 22, 2023
@EmilienM EmilienM deleted the fix-IsReleasesAbove branch September 22, 2023 13:19
@EmilienM EmilienM added backport-v1 This PR will be backported to v1 and removed backport-v1 This PR will be backported to v1 labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v1 This PR will be backported to v1 semver:patch No API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants