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

Fixes and adds configurability to test_spark_sql_s3_with_privileges.py regtest #1060

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

travis-bowen
Copy link

PR Achieves the following:
1.) Fixes tests that currently fail
2.) Makes the REGTEST_ROOT_BEARER_TOKEN able to be passed in vs. instantiated from root, which can be used for instance to execute this test on long standing instances
3.) Allows an optional AWS_BUCKET_BASE_LOCATION_PREFIX to be passed in as well. This can also be useful for running against a long standing instance.

Here's the failed output on main.
Screenshot 2025-02-24 at 1 48 30 PM

And the success after this PR:
Screenshot 2025-02-24 at 1 58 06 PM


rotate_credentials = rotate_api.rotate_credentials(principal_name=principal_name)
return rotate_credentials
except ApiException as e:
Copy link
Author

Choose a reason for hiding this comment

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

removed since the catch block logic relies on rotate_client and rotate_client is only set in the try block so will generally be unset in the catch.

Used to provide a path prefix between the port number and the standard polaris endpoint paths
:return:
"""
return os.getenv('POLARIS_PATH_PREFIX', '')
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this is expected to begin with / but to never end with it, while polaris_url_scheme and polaris_host are the opposite?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah - you're right - there's some inconsistencies.
Polaris_Host => no leading or trailing /
AWS_Bucket_Prefix = > No leading or trailing /
URL Schema => Updated to not have leading or trailing /
POLARIS_PATH_PREFIX => Now also updated to not have a leading or trailing / (the callsites that use it can determine whether to add those)

Copy link
Contributor

@eric-maynard eric-maynard left a comment

Choose a reason for hiding this comment

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

LGTM, left one question about the new env vars

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.

3 participants