Skip to content

Small script fixes needed to run in gitlab environment#188

Open
misiugodfrey wants to merge 8 commits intomainfrom
misiug/fixgitlab2
Open

Small script fixes needed to run in gitlab environment#188
misiugodfrey wants to merge 8 commits intomainfrom
misiug/fixgitlab2

Conversation

@misiugodfrey
Copy link
Contributor

No description provided.

if not os.path.isdir(external_dir):
data_dir = get_abs_file_path("data")
raise Exception(f"external location '{external_dir}' referenced by table hive.{schema_name}.{table} \
does not exist in {get_abs_file_path("data")} or $PRESTO_DATA_DIR")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ARM currently has to use python3.10 when running this script, and it does not like this syntax. Changed it so that it is semantically equivalent but works with python3.10.

parser.addoption("--profile-script-path")


def pytest_sessionstart(session):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some runner environment were complaining that benchmark_results was unset.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please expand on this? Where was this error coming from?

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 think this was potentially related to another error. The problem is that the benchmark_results is only created in the teardown, which means if the tests were not run it will not be created; however, it is referenced in the terminal_summary regardless.

This was leading to misleading error messages that I needed to fix before I could find the actual problem. They may not occur anymore, but I think we should consider leaving this in place for the sake of future debugging.

Copy link
Contributor

Choose a reason for hiding this comment

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

which means if the tests were not run it will not be created;

I believe this is expected.

however, it is referenced in the terminal_summary regardless.

So we should probably update pytest_terminal_summary and pytest_sessionfinish to skip or do something different in this case?

Copy link
Contributor

@mattgara mattgara left a comment

Choose a reason for hiding this comment

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

LGTM

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