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

gradle: re-enable spotbugs everywhere, print output to console #36605

Merged
merged 1 commit into from Apr 4, 2024

Conversation

postamar
Copy link
Contributor

@postamar postamar commented Mar 28, 2024

It turns out that disabling spotbugs in the gradle.yml CI workflow interferes with the java CDK publish workflow. Since we've committed to continue to use spotbugs (it turns out that it is useful on occasion) this PR re-enables it.

This PR also improves the useability of spotbugs by printing its findings to the console instead of hiding them away in an inaccessible report file. I checked and the console output is perfectly usable:

> Task :airbyte-cdk:java:airbyte-cdk:db-sources:spotbugsTestFixtures
H D NP: checkStatusMap must be non-null but is marked as nullable  At AbstractSourcePerformanceTest.kt:[lines 85-100]
H C NP: io.airbyte.cdk.integrations.debezium.CdcSourceTest.getTestdb() may return null, but is declared @Nonnull  At CdcSourceTest.kt:[line 28]
H D NP: m must be non-null but is marked as nullable  At AbstractSourceDatabaseTypeTest.kt:[line 151]
H C NP: io.airbyte.cdk.integrations.standardtest.source.PythonSourceAcceptanceTest$Companion.getIMAGE_NAME() may return null, but is declared @Nonnull  At PythonSourceAcceptanceTest.kt:[line 158]
H D NP: m must be non-null but is marked as nullable  At SourceAcceptanceTest.kt:[line 452]
H D NP: obj must be non-null but is marked as nullable  At SourceAcceptanceTest.kt:[line 453]
H D NP: obj must be non-null but is marked as nullable  At SourceAcceptanceTest.kt:[line 252]
H D NP: m must be non-null but is marked as nullable  At SourceAcceptanceTest.kt:[line 251]
H D NP: messages must be non-null but is marked as nullable  At SourceAcceptanceTest.kt:[line 450]
H D NP: schemaName must be non-null but is marked as nullable  At JdbcSourceAcceptanceTest.kt:[line 318]
H C NP: io.airbyte.cdk.integrations.source.jdbc.test.JdbcSourceAcceptanceTest.getTestdb() may return null, but is declared @Nonnull  At JdbcSourceAcceptanceTest.kt:[line 42]

FYI @alafanechere this will cause a slight CI cost increase.

Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 0:11am

build.gradle Outdated
// Reports can be found under each subproject in build/spotbugs/
reports {
xml.required = false
html.required = true
Copy link
Contributor

Choose a reason for hiding this comment

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

can we keep the html? I found it useful when fixing those

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've struggled to find a way to also print the console output, in addition to the HTML output. I'll try again next week.

@postamar postamar force-pushed the postamar/gradle-dont-skip-spotbugs branch from 1079ed9 to 45451ef Compare April 4, 2024 00:11
@postamar postamar merged commit bd40181 into master Apr 4, 2024
29 checks passed
@postamar postamar deleted the postamar/gradle-dont-skip-spotbugs branch April 4, 2024 00:20
markcusack pushed a commit to markcusack/airbyte that referenced this pull request Apr 9, 2024
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