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

Add E2E tests #13

Merged
merged 6 commits into from
Dec 2, 2024
Merged

Add E2E tests #13

merged 6 commits into from
Dec 2, 2024

Conversation

nevillelyh
Copy link
Contributor

  • Remove redundant coglet/_compat from PYTHONPATH
  • Remove --working-dir from cog-server.sh
  • Log await-explicit-shutdown
  • Use any instead of interface{}
  • Reset ctx_pid before logging on prediction cancel or failure
  • Add tests

@nevillelyh nevillelyh requested a review from a team as a code owner December 2, 2024 19:59
func TestPredictionCrash(t *testing.T) {
e := NewCogTest(t, "sleep")
e.AppendArgs("--await-explicit-shutdown")
e.AppendEnvs("PREDICTION_CRASH=1")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes predict() call sys.exit(1) simulating a Python process hard crash, e.g. OOM or CUDA issue. Legacy Cog just returns an HTTP 503 with no error/log, while Coggo preserves per prediction ID logging plus error, so this is actually an improvement.

@nevillelyh nevillelyh merged commit da71619 into main Dec 2, 2024
11 checks passed
@nevillelyh nevillelyh deleted the neville/e2e branch December 2, 2024 20:10
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.

1 participant