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

Great Expectations errors out in attempting to write to read only file system #9911

Closed
javier5109 opened this issue May 9, 2024 · 1 comment · Fixed by #9977
Closed

Great Expectations errors out in attempting to write to read only file system #9911

javier5109 opened this issue May 9, 2024 · 1 comment · Fixed by #9977
Assignees
Labels
aws Related to GX usage with AWS

Comments

@javier5109
Copy link

javier5109 commented May 9, 2024

Describe the bug
When running a MWAA instance when the volume is read only. The current exception only allows permissions errors to continue

To Reproduce

  1. spin up mwaa runner https://github.com/aws/aws-mwaa-local-runner
  2. edit volume to be read only
  3. If there is going to be any update to great_expectations.yml it fails

Expected behavior
I expect it to continue just like when the system is not in read only. The code is already set to do it, just need to give it one more additional exception.

Additional context
I have fixed this issue by adding OSError to the exception. inline_store_backend.py

def _save_changes(self) -> None:
    context = self._data_context
    config_filepath = pathlib.Path(context.root_directory) / context.GX_YML

    try:
        with open(config_filepath, "w") as outfile:
            context.config.to_yaml(outfile)
    # In environments where wrting to disk is not allowed, it is impossible to
    # save changes. As such, we log a warning but do not raise.
    except (PermissionError, OSError) as e:
        logger.warning(f"Could not save project config to disk: {e}")
@Kilo59
Copy link
Member

Kilo59 commented May 29, 2024

@javier5109 This was added as part of the 0.18.15 release.
https://github.com/great-expectations/great_expectations/releases/tag/0.18.15

@Kilo59 Kilo59 closed this as completed May 29, 2024
@Kilo59 Kilo59 added the aws Related to GX usage with AWS label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Related to GX usage with AWS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants