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 bug with truss push with non-draft. #697

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Conversation

squidarth
Copy link
Collaborator

Summary

There is an issue right now, where if you do:

$ truss push --publish

with a model that already exists, the log link returned is borked. This is because the create_model_from_truss, and create_model_version_from_truss GraphQL mutations have different return values.

This PR fixes that.

Testing

Ran truss push --publish from command line, with brand new model, and with one that already exists:

 $ poetry run truss push examples/truss-public-gh-repo-test/ --publish
? 🎮 Which remote do you want to connect to? sid-prod
Compressing... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Uploading... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
✨ Model test-200 was successfully pushed ✨
🪵  View logs for your deployment at https://app.baseten.co/models/WB56bb0/versions/qrjoo93/logs
? 🗂  Open logs in a new tab? No

is_trusted=is_trusted,
)
model_version_id = model_version_json["id"]
model_version = api.get_model_version_by_id(model_version_id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you don't need to do this. You already have model_id on line 152

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point

@squidarth squidarth merged commit 1ff6d6e into main Oct 10, 2023
@squidarth squidarth deleted the sshanker/fix-bad-log-link branch October 10, 2023 21:51
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