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

fix(ruff): resolve linting errors detected by Ruff #5140

Merged
merged 12 commits into from
Mar 8, 2025

Conversation

johubertj
Copy link
Contributor

@johubertj johubertj commented Feb 20, 2025

Resolved Issues:

Partially addresses #5027

Description of Changes:

This pull request fixes manual linting errors identified by Ruff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@johubertj johubertj self-assigned this Feb 20, 2025
@johubertj johubertj marked this pull request as ready for review February 20, 2025 22:35
@github-actions github-actions bot added the s2n-core team label Feb 20, 2025
Copy link
Contributor

@jmayclin jmayclin left a comment

Choose a reason for hiding this comment

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

I wonder if it might be best to take #5138 through PR first?

That can set up ruff, and then this PR can modify the CI to also start running the linter.

@johubertj johubertj closed this Feb 20, 2025
@johubertj
Copy link
Contributor Author

Closing until #5138 is merged in

@johubertj johubertj mentioned this pull request Feb 25, 2025
9 tasks
@johubertj johubertj reopened this Feb 26, 2025
@jmayclin
Copy link
Contributor

What are the next steps to get the linter running in CI?

@johubertj johubertj changed the title Fix Linting Errors Detected by Ruff chore(git-blame): add Ruff formatting commit to .git-blame-ignore-revs Feb 27, 2025
@johubertj johubertj changed the title chore(git-blame): add Ruff formatting commit to .git-blame-ignore-revs fix(ruff): resolve linting errors detected by Ruff Feb 27, 2025
@johubertj johubertj force-pushed the test/integv2-linting-ruff branch from 9ca9943 to 73987ea Compare March 1, 2025 00:23
@johubertj johubertj requested a review from jmayclin March 6, 2025 18:59
cmd_line.extend(
["-cipher", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"]
)
elif self.options.cipher == Ciphersuites.TLS_AES_128_GCM_256:
Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly is happening here? Don't we need to be skipping these tests still?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These lines are causing linting errors because Ciphersuites doesn't exist as a class anymore. My theory is that someone deleted the Ciphersuites class but didn't fully clean all references of it. Also TLS_AES_256_GCM_384 and TLS_AES_128_GCM_256 are not referenced anywhere in the codebase.

Discussed with James, and we thought the best path forward was to clean this up and remove these checks~

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm yeah it seems like what these were supposed to be was TLS_AES_256_GCM_SHA384 and TLS_AES_256_GCM_SHA256? This mistake has been with us since the very beginning of integv2. Minimally it doesn't seem like this change alters our test coverage at all.

@johubertj johubertj added this pull request to the merge queue Mar 7, 2025
Merged via the queue into aws:main with commit 9d02146 Mar 8, 2025
46 checks passed
@johubertj johubertj deleted the test/integv2-linting-ruff branch March 8, 2025 00:06
dougch pushed a commit to dougch/s2n-tls that referenced this pull request Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants