-
Notifications
You must be signed in to change notification settings - Fork 17
Sagemaker e2e test #95
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
Conversation
… into sagemaker-e2e-test
… into sagemaker-e2e-test
… into sagemaker-e2e-test
… into sagemaker-e2e-test
| npx playwright install | ||
| SSO_USERNAME="$SSO_USERNAME" SSO_PASSWORD="$SSO_PASSWORD" DATAZONE_URL="$DATAZONE_URL" SPACE_NAME="$SAGEMAKER_SPACE_NAME" VSCODE_REMOTE_SERVER_PATH="sagemaker" npm run mocha -- --web --headless | ||
|
|
||
| SSO_USERNAME="$SSO_USERNAME" SSO_PASSWORD="$SSO_PASSWORD" DATAZONE_URL="$DATAZONE_URL" SPACE_NAME="$SAGEMAKER_SPACE_NAME" VSCODE_REMOTE_SERVER_PATH="sagemaker" npm run mocha -- --web --headless 2>&1 | tee test_output.log |
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.
For now, I think this fix is good. But we should later look into why npm run mocha doesn't exit with code 1 on tests failing.
A think a fix would be using the actual smoketest npm command (https://github.com/microsoft/vscode/blob/main/package.json#L43). As when I was working on the smoke testing I didn't notice it in the package.json.
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.
Yes, will look into it
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.
smoketest command will not be used as it rebuilds entire vscode src which makes space out of scope
|
Another improvement we can make: I noticed when we construct the DATAZONE_URL we hardcode the region, but we should instead use the AWS_REGION env variable. |
|
|
||
| - name: Download sagemaker build artifact | ||
| run: | | ||
| gh run download --name "$COMMIT_SHA-code-editor-sagemaker-server-build" |
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.
This should still have the commit sha
| - name: Fetch source artifact | ||
| run: | | ||
| gh run download --name "$COMMIT_SHA-code-editor-sagemaker-server-src" |
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.
This should still have the commit sha
… into sagemaker-e2e-test
… into sagemaker-e2e-test
… into sagemaker-e2e-test
… into sagemaker-e2e-test
… into sagemaker-e2e-test
… into sagemaker-e2e-test
Co-authored-by: Feiyang Liu <lfeiyang@amazon.nl>
Issue
D354258334
The workflow was completing successfully even when smoke tests failed because the mocha test runner returns exit code 0 regardless of test results.
Description of Changes
Fixes SageMaker smoke test workflow to properly fail when tests fail.
Capture mocha output and parse it for the "failing" keyword to detect test failures, then explicitly exit with code 1 to fail the workflow.
Testing
Verified with workflow run showing "2 failing" tests now properly fails the CI pipeline.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.