-
Notifications
You must be signed in to change notification settings - Fork 415
fix/3165 Athena LakeFormation permissions are required even tho Lakeformation is not used #3271
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/3165 Athena LakeFormation permissions are required even tho Lakeformation is not used #3271
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 62eed5d | Commit Preview URL Branch Preview URL |
Nov 06 2025, 02:47 PM |
e78bbf6 to
bdaa57f
Compare
sh-rp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks good, small changes to the tests are needed
tests/load/pipeline/test_athena.py
Outdated
| def test_athena_lakeformation_config_gating( | ||
| destination_config: DestinationTestConfiguration, mocker | ||
| ) -> None: | ||
| pytest.importorskip("pyathena") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be needed. This test is only selected when the athena destination is active(see destination_config setup above) and in that case, the athena extra will also be present.
| destinations_configs(default_sql_configs=True, subset=["athena"]), | ||
| ids=lambda x: x.name, | ||
| ) | ||
| def test_athena_lakeformation_config_gating( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these kind of tests are "more secure" if you parametrize them to have one run with lf enabled and check that the mocked function is called and then one run where it is not and thus the mocked function is not called
rudolfix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! this type of test is sufficient - clearly we deal with configuration problem, not edge behavior of athena
…d on configuration. Add tests to ensure tags are not applied when Lake Formation config is not set. This fixes the bug of lakeformation GetResourceLFTags bug
…rmation gating configuration. Update test to ensure proper mocking of connection methods.
… tests for Athena Lake Formation configuration.
bdaa57f to
62eed5d
Compare
sh-rp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Related Issues
Changes: