Skip to content

Conversation

stephenfin
Copy link
Contributor

@stephenfin stephenfin commented May 31, 2024

A couple of somewhat generally "CI-related" changes that I'm too lazy to propose as separate PRs.

  • make: Add 'format' target
  • script: Remove unused bootstrap script
  • trivial: Consistent file extensions
  • script: Address shellcheck warnings
  • tests: Consist use of th alias
  • tests: Add AssertTypeOf helper
  • testing: Set test case names
  • tests: Be consistent in our generation of credentials
  • tests: Add missing RequireAdmin calls
  • scripts: Add getenvvar tool

@github-actions github-actions bot added the semver:minor Backwards-compatible change label May 31, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels May 31, 2024
@stephenfin
Copy link
Contributor Author

I'm not sure what's going on with the unit test failures. They're not reproducible locally.

@EmilienM
Copy link
Contributor

EmilienM commented Jun 7, 2024

I'm not sure what's going on with the unit test failures. They're not reproducible locally.

2024-05-31T12:30:50.2424888Z --- FAIL: TestCreate (0.00s)
2024-05-31T12:30:50.2425466Z === RUN   TestCreateMicroversion
2024-05-31T12:30:50.2426450Z --- PASS: TestCreateMicroversion (0.00s)
2024-05-31T12:30:50.2427073Z === RUN   TestGet
2024-05-31T12:30:50.2428913Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2431956Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2433622Z --- FAIL: TestGet (0.00s)
2024-05-31T12:30:50.2434126Z === RUN   TestGetMicroversion
2024-05-31T12:30:50.2434775Z --- PASS: TestGetMicroversion (0.00s)
2024-05-31T12:30:50.2435335Z === RUN   TestDelete
2024-05-31T12:30:50.2435846Z --- PASS: TestDelete (0.00s)
2024-05-31T12:30:50.2436595Z === RUN   TestList
2024-05-31T12:30:50.2437088Z --- PASS: TestList (0.00s)
2024-05-31T12:30:50.2437549Z === RUN   TestCreate
2024-05-31T12:30:50.2439414Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 41: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2442508Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 41: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2444211Z --- FAIL: TestCreate (0.00s)
2024-05-31T12:30:50.2444734Z === RUN   TestCreateMicroversion
2024-05-31T12:30:50.2445387Z --- PASS: TestCreateMicroversion (0.00s)
2024-05-31T12:30:50.2445959Z === RUN   TestGet
2024-05-31T12:30:50.2447728Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2451070Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2452748Z --- FAIL: TestGet (0.00s)
2024-05-31T12:30:50.2453245Z === RUN   TestGetMicroversion
2024-05-31T12:30:50.2453851Z --- PASS: TestGetMicroversion (0.00s)
2024-05-31T12:30:50.2454383Z === RUN   TestDelete
2024-05-31T12:30:50.2454893Z --- PASS: TestDelete (0.00s)
2024-05-31T12:30:50.2455394Z === RUN   TestList
2024-05-31T12:30:50.2455899Z --- PASS: TestList (0.00s)
2024-05-31T12:30:50.2456381Z === RUN   TestCreate
2024-05-31T12:30:50.2458222Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 41: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2461328Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 41: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2463049Z --- FAIL: TestCreate (0.00s)
2024-05-31T12:30:50.2463585Z === RUN   TestCreateMicroversion
2024-05-31T12:30:50.2464250Z --- PASS: TestCreateMicroversion (0.00s)
2024-05-31T12:30:50.2464809Z === RUN   TestGet
2024-05-31T12:30:50.2466823Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2469935Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2471624Z --- FAIL: TestGet (0.00s)
2024-05-31T12:30:50.2472153Z === RUN   TestGetMicroversion
2024-05-31T12:30:50.2472803Z --- PASS: TestGetMicroversion (0.00s)
2024-05-31T12:30:50.2473385Z === RUN   TestDelete
2024-05-31T12:30:50.2473904Z --- PASS: TestDelete (0.00s)
2024-05-31T12:30:50.2474380Z === RUN   TestList
2024-05-31T12:30:50.2474868Z --- PASS: TestList (0.00s)
2024-05-31T12:30:50.2475341Z === RUN   TestCreate
2024-05-31T12:30:50.2477176Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 41: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2480185Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 41: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2481826Z --- FAIL: TestCreate (0.00s)
2024-05-31T12:30:50.2482373Z === RUN   TestCreateMicroversion
2024-05-31T12:30:50.2483035Z --- PASS: TestCreateMicroversion (0.00s)
2024-05-31T12:30:50.2483612Z === RUN   TestGet
2024-05-31T12:30:50.2485423Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Policy expected �[0m�[1;32m"anti-affinity"�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2488766Z     convenience.go:273: �[1;31mFailure in requests_test.go, line 75: at .Rules expected �[0m�[1;32mservergroups.Rules{MaxServerPerHost:3}�[0m�[1;31m, but got �[0m�[1;33m<nil>�[0m�[1;31m�[0m
2024-05-31T12:30:50.2490504Z --- FAIL: TestGet (0.00s)
2024-05-31T12:30:50.2491016Z === RUN   TestGetMicroversion
2024-05-31T12:30:50.2491639Z --- PASS: TestGetMicroversion (0.00s)
2024-05-31T12:30:50.2492214Z === RUN   TestDelete
2024-05-31T12:30:50.2492734Z --- PASS: TestDelete (0.00s)
2024-05-31T12:30:50.2493194Z FAIL
2024-05-31T12:30:50.2494071Z FAIL	github.com/gophercloud/gophercloud/v2/openstack/compute/v2/servergroups/testing	0.046s
2024-05-31T12:30:50.5664618Z ?   	github.com/gophercloud/gophercloud/v2/openstack/compute/v2/usage	[no test files]
2024-05-31T12:30:51.2404607Z ?   	github.com/gophercloud/gophercloud/v2/openstack/compute/v2/volumeattach	[no test files]
2024-05-31T12:30:51.6588384Z ?   	github.com/gophercloud/gophercloud/v2/openstack/config	[no test files]

@EmilienM
Copy link
Contributor

EmilienM commented Jun 7, 2024

failed locally for me

@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Jul 5, 2024
@stephenfin
Copy link
Contributor Author

stephenfin commented Jul 17, 2024

failed locally for me

I dropped the patch that was causing this for now, in order to keep this morning along. Will re-propose separately once I've worked out the kinks.

(fwiw, I think the -shuffle on series is highlighting many of the same issues that the now-removed patch was)

@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Jul 17, 2024
@coveralls
Copy link

coveralls commented Jul 19, 2024

Coverage Status

coverage: 78.726%. remained the same
when pulling 7580d13 on stephenfin:ci-improvements
into e7fde53 on gophercloud:master.

Copy link
Member

@pierreprinetti pierreprinetti left a comment

Choose a reason for hiding this comment

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

I see a problem with the dependabot rename. If you revert that change, I think we can merge the rest of this very nice patch!

@pierreprinetti pierreprinetti self-assigned this Sep 27, 2024
@github-actions github-actions bot added edit:actions This PR updates GitHub Actions code edit:compute This PR updates compute code edit:utils This PR updates utils code edit:sharedfilesystems This PR updates sharedfilesystems code edit:baremetal This PR updates baremetal code edit:gophercloud This PR updates common Gophercloud code edit:blockstorage This PR updates blockstorage code edit:identity This PR updates identity code labels Nov 28, 2024
@github-actions github-actions bot added the edit:testinfra This PR updates testing infrastructure code label Nov 28, 2024
pierreprinetti
pierreprinetti previously approved these changes Nov 28, 2024
@stephenfin
Copy link
Contributor Author

@pierreprinetti Sorry, missed that there had been a few new tests added so I had another round of s/testhelper/th/ to do.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This is not referenced or documented anywhere and it has not been
touched in years. Remove it.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
testhelper is too long give how often these things are used.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Better errors messages since we see the different types.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Make this a little easier to understand failures when they occur.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We were not passing through user IDs, despite our test wrappers
indicating you could user either user IDs or usernames. Similarly, we
were not always setting scope, which could cause issues when using a
project ID. Correct all issues.

We should eventually move this to another test helper but that's a job
for a later change.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
We're clearly not testing with non-admin credentials. That would be a
good future test but for now we simply fix the issues.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Setting the necessary required environment variables has proven
relatively tricky to do. Add a tool that will start doing this for us.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@EmilienM
Copy link
Contributor

since Pierre already approved it, I'll go ahead and merge it as I'm satisfied by the CI results and the commits.
Thanks for this work!

@EmilienM EmilienM merged commit 24c9641 into gophercloud:master Nov 29, 2024
32 of 34 checks passed
@stephenfin stephenfin deleted the ci-improvements branch November 29, 2024 16:22
@pierreprinetti pierreprinetti added the backport-v2 This PR will be backported to v2 label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v2 This PR will be backported to v2 edit:actions This PR updates GitHub Actions code edit:baremetal This PR updates baremetal code edit:blockstorage This PR updates blockstorage code edit:compute This PR updates compute code edit:gophercloud This PR updates common Gophercloud code edit:identity This PR updates identity code edit:sharedfilesystems This PR updates sharedfilesystems code edit:testinfra This PR updates testing infrastructure code edit:utils This PR updates utils code semver:minor Backwards-compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants