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

API, Spark 3.3: Remove all usages of deprecated AssertHelpers #10500

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

findepi
Copy link
Member

@findepi findepi commented Jun 15, 2024

No description provided.

@findepi findepi requested a review from nastra June 15, 2024 12:04
@github-actions github-actions bot added the API label Jun 15, 2024
Copy link
Contributor

@nastra nastra left a comment

Choose a reason for hiding this comment

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

This might still be used in older Spark versions that haven't been converted over to using AssertJ assertions

@findepi findepi marked this pull request as draft June 15, 2024 12:13
@findepi
Copy link
Member Author

findepi commented Jun 15, 2024

you're right, just intellij didn't see them.

@findepi findepi closed this Jun 15, 2024
@findepi findepi reopened this Jun 15, 2024
@github-actions github-actions bot added the spark label Jun 15, 2024
@findepi findepi changed the title Tests: Remove deprecated and unused test helper Remove all usages of deprecated AssertHelpers Jun 15, 2024
@findepi findepi force-pushed the findepi/ah branch 2 times, most recently from 2c1a684 to d7069b8 Compare June 15, 2024 12:57
@findepi findepi marked this pull request as ready for review June 15, 2024 12:58
@findepi findepi requested a review from nastra June 15, 2024 12:58
scalarSql(
"CALL %s.system.add_files('%s', '`parquet`.`%s`')",
catalogName, tableName, fileTableDir.getAbsolutePath()));
Assertions.assertThatThrownBy(
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be fine to statically import the method here, similar to how assertThat is already statically imported in this class.

Copy link
Member Author

Choose a reason for hiding this comment

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

The code was changed mechanically, so thanks for catching that.
I know that static imports are generally discouraged in the project, so is this comment about this source file in particular, or more broadly about Assertions.*?

Copy link
Contributor

Choose a reason for hiding this comment

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

the comment is only about statically importing methods from Assertions, but I guess it would be too much work now to statically import assertThatThrownBy, so let's leave it as-is

Copy link
Member Author

Choose a reason for hiding this comment

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

If we have consensu that Assertions should be used with static imports, do you think it could be helpful to support this with static code analysis?

Copy link
Contributor

Choose a reason for hiding this comment

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

we could eventually support this via static code analysis but atm we have a mix of static vs non-static usage wrt Assertions

Copy link
Member Author

Choose a reason for hiding this comment

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

so if we cleaned up the non-static imports, we would want to have static code analysis?
let's give it a try -- #10517

@findepi
Copy link
Member Author

findepi commented Jun 15, 2024

flink-scala-2-12-tests (8, 1.17) looks like a flake. on a subsequent run flink-scala-2-12-tests (8, 1.17) it passed.

Copy link
Contributor

@nastra nastra left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this

@nastra nastra changed the title Remove all usages of deprecated AssertHelpers API, Spark 3.3: Remove all usages of deprecated AssertHelpers Jun 17, 2024
@nastra nastra merged commit 52d82f9 into apache:main Jun 17, 2024
42 checks passed
@findepi findepi deleted the findepi/ah branch June 17, 2024 15:02
@findepi
Copy link
Member Author

findepi commented Jun 17, 2024

thanks for the merge!

jasonf20 pushed a commit to jasonf20/iceberg that referenced this pull request Aug 4, 2024
sasankpagolu pushed a commit to sasankpagolu/iceberg that referenced this pull request Oct 27, 2024
zachdisc pushed a commit to zachdisc/iceberg that referenced this pull request Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants