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 fedora to version 40 in GHA CI #1502

Merged
merged 3 commits into from
May 22, 2024

Conversation

kgiusti
Copy link
Contributor

@kgiusti kgiusti commented May 20, 2024

No description provided.

@kgiusti kgiusti requested review from jiridanek and ganeshmurthy May 20, 2024 17:42
@@ -583,7 +583,7 @@ jobs:
# # unittest coverage
# - os: ubuntu-22.04
# container: 'fedora'
# containerTag: 39
# containerTag: 30
Copy link
Contributor

Choose a reason for hiding this comment

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

Although this has line has been commented out, containerTag must be 40 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

woopsie - good catch. Fix upcoming.

@@ -535,6 +535,8 @@ def on_message(self, event):
router = 'C'
elif event.receiver == self.routers['D']['mgmt_receiver']:
router = 'D'
else:
raise Exception("Unexpected event receiver")
Copy link
Contributor

Choose a reason for hiding this comment

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

which linter warning made you remove these raise Exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"router" may be used before initialization.
Which isn't true for the code as it stands now, but I'd rather not suppress the error in case we modify the test at some point and miss updating the if statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

router may be used before initialization

From the actual context this doesn't appear possible, but yeah there is a hole in the code where router is never set. Rather than suppress the warning I added the Exception as a "defensive coding" approach. This test has a history of being somewhat flaky so I'm sure we'll be hacking at it at some point in the future. Should we change the code in some way where we add a new event receiver then the existing if statement would fail silently and router would in fact be uninitialized. The exception would prevent that foot-gun.

Copy link
Contributor

@jiridanek jiridanek left a comment

Choose a reason for hiding this comment

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

(just in case you've actually decided to wait for second approval, approving too)

Comment on lines +45 to +48
hacking>=6.1.0
flake8>=6.1.0
pylint>=3.0.3
mypy>=1.8.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess you realize what this means (different people with different versions of these tools will get different linter warnings), so no need for me to point this out.

Besides, as things now stand, it is already true that sometimes the os versions and sometimes the pypi venv versions of these tools are used, depending on how one sets up their dev environment, so this is not actually something entirely new. What's now new is that this will be also seen in CI (new ci failures on python liner checks because pypi packages were updated, without any code changes in router)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah - this change is a bit heavy handed. I had to advance pylint (I think it was pylint) as the 3.0.3 version was actually failing on F40 (some type assertion).

Having newer linter versions catch new errors is a good thing... probably. If it introduces lots of noise then yeah we should set upper version bounds as necessary.

@kgiusti kgiusti merged commit 54f9953 into skupperproject:main May 22, 2024
35 of 39 checks passed
@kgiusti kgiusti deleted the UPGRADE-FEDORA-CI branch May 22, 2024 13:53
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.

3 participants