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

Fix empty client behavior with app-attached sandboxes #2159

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

pawalt
Copy link
Member

@pawalt pawalt commented Aug 27, 2024

Describe your changes

Previously, if a clientless app was attached to a sandbox, it would error with NoneType. This commit checks app._client to make sure it exists before using it.

Backward/forward compatibility checks

Check these boxes or delete any item (or this section) if not relevant for this PR.

  • Client+Server: this change is compatible with old servers
  • Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.


Changelog

@pawalt pawalt force-pushed the pawalt/fix_sandboxes_with_apps branch from 48dbab0 to c936fbf Compare August 27, 2024 19:42
@pawalt pawalt requested a review from erikbern August 27, 2024 19:42
@pawalt
Copy link
Member Author

pawalt commented Aug 27, 2024

@prbot approve

Copy link

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

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

Approved 👍. @erikbern will follow-up review this.

Copy link
Contributor

@erikbern erikbern left a comment

Choose a reason for hiding this comment

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

It would be great to add a test if it's easy, but either way 👍

@pawalt
Copy link
Member Author

pawalt commented Aug 29, 2024

@erikbern this is actually a bit tricky to test because in our tests, we have to explicitly provide a client. So I'm not quite sure how to test client from env behavior. Not sure if you have any suggestions.

Previously, if a clientless app was attached to a sandbox, it would
error with NoneType. This commit checks app._client to make sure it
exists before using it.
@pawalt pawalt force-pushed the pawalt/fix_sandboxes_with_apps branch from c936fbf to bb54004 Compare September 3, 2024 19:32
@pawalt
Copy link
Member Author

pawalt commented Sep 3, 2024

I figured it out with set_env_client

@pawalt
Copy link
Member Author

pawalt commented Sep 3, 2024

@prbot automerge

Copy link

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

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

Some required workflows are pending. Will automerge once they complete successfully. Please bear with us in this difficult time.

@modal-pr-review-automation modal-pr-review-automation bot merged commit 60569ca into main Sep 3, 2024
22 checks passed
@modal-pr-review-automation modal-pr-review-automation bot deleted the pawalt/fix_sandboxes_with_apps branch September 3, 2024 19:45
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.

2 participants