This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix flyio org option not working #662
Fix flyio org option not working #662
Changes from all commits
dc3888d
6443f9b
af83bae
054ca10
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find any tests for flyio
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, looks like we didn't add them 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something you might be interested in? As a first step I think we should add a test for
_create_app
, asserting that resultingfly.toml
looks right. This test can also help us pin down the root cause of #657The second step would be to add a real e2e deploy to fly. I can create a test account there and set up GHA workflow to make it work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah sounds good. Do you want to add the tests in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this PR is the right place :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aguschin Any idea how this can be tested?
I'm doing
But the
get_state()
fails because ofmlem.core.errors.MlemObjectNotSavedError: Not saved object has no location
.even if I create the app with a default state, while updating the state the issue happens again. I think I'm missing a step before the the call to create_app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aminalaee! Sure, let me help you out 🙌🏻
It needs to be dumped first:
If you run this test, it will fail still (on the last line though), because creating flyio app requires Dockerfile present (
...Could not find a Dockerfile, nor detect a runtime or framework from source code. Continuing with a blank app.\x1b
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You either need to bypass this, or maybe call
mlem.api.deploy
directly onflyio_app
while mocking some actual deployment mechanisms. Then, until the temp dir withfly.toml
and stuff is removed, you can read it in the test to make some checks. Hope that makes it clearer! If confused, please ping me, I'll help with that.