Skip to content

CI: Fix warnings in serverless tests #1316

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

Lorak-mmk
Copy link
Collaborator

@Lorak-mmk Lorak-mmk commented Apr 7, 2025

When serverless tests are executed, some test that are not compatible with serverless are skipped. Skipping was done by cfg-ing them out. This caused some imports to be unused which of course resulted in warnings. Github, in coordination with setup-rust-toolchain action, "helpfully" attached info about those warnings in EVERY COMMIT OF EVERY PR in a section "Unchanged files with check annotations" which despite being a "preview" feature has no good way of being disabled.

This commit fixes that by changing #[cfg(not(scylla_cloud_tests))] to #[cfg_attr(scylla_cloud_tests, ignore)]. This causes those tests to still be compiled, just not executed.

The above uncovered two real warnings about unused imports, which I also fixed.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • !I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

@Lorak-mmk Lorak-mmk added this to the 1.2.0 milestone Apr 7, 2025
@Lorak-mmk Lorak-mmk requested a review from wprzytula April 7, 2025 10:43
@Lorak-mmk Lorak-mmk self-assigned this Apr 7, 2025
Copy link

github-actions bot commented Apr 7, 2025

cargo semver-checks found no API-breaking changes in this PR.
Checked commit: 7159433

@Lorak-mmk Lorak-mmk force-pushed the scylla_cloud_tests_no_warnings branch 2 times, most recently from 2bf5b5f to 7159433 Compare April 7, 2025 11:00
When serverless tests are executed, some test that are not compatible
with serverless are skipped. Skipping was done by cfg-ing them out. This
caused some imports to be unused which of course resulted in warnings.
Github, in coordination with `setup-rust-toolchain` action, "helpfully"
attached info about those warnings in EVERY COMMIT OF EVERY PR in a
section "Unchanged files with check annotations" which despite being a
"preview" feature has no good way of being disabled.

This commit fixes that by changing `#[cfg(not(scylla_cloud_tests))]` to
`#[cfg_attr(scylla_cloud_tests, ignore)]`. This causes those tests to
still be compiled, just not executed.

The above uncovered two real warnings about unused imports, which I also
fixed.
@muzarski muzarski self-requested a review April 7, 2025 11:15
@wprzytula wprzytula merged commit 685f6f4 into scylladb:main Apr 7, 2025
12 checks passed
@Lorak-mmk Lorak-mmk deleted the scylla_cloud_tests_no_warnings branch April 10, 2025 12:56
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.

None yet

2 participants