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

MLCOMPUTE-967 | Spark config calculation should result in failure if srv-configs can't be read #142

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

CaptainSame
Copy link
Contributor

  • Spark config generation is leading to failures like KeyError in runtime in cases where srv-configs are not present. We should actively fail fast in such cases rather than wait for KeyError failures in runtime
  • Remove obsolete no_aws_credentials arg from get_aws_credentials function

@@ -397,6 +395,8 @@ def __init__(self):
) = utils.load_spark_srv_conf()
except Exception as e:
log.error(f'Failed to load Spark srv configs: {e}')
# should fail because Spark config calculation depends on values in srv-configs
sys.exit(1)
Copy link
Member

Choose a reason for hiding this comment

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

might be a little cleaner to throw an exception - sys.exit() outside of something like the driver for a script can be a little unexpected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes good point

),
)
except Exception:
ui_port = utils.ephemeral_port_reserve_range()
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a warning log stating the error and back-up option.

@88manpreet 88manpreet self-requested a review February 28, 2024 15:13
@CaptainSame CaptainSame merged commit e427503 into master Feb 28, 2024
1 check passed
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

4 participants