You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR registers a new skip_in_pr_check pytest marker and applies it to three hang-prone / long-running integ tests. The changes are small, correct, and follow the existing convention used for gpu_intensive / import_model.
Task list
Read PR diff (/tmp/pr.diff)
Check how markers are consumed by CI / tox
Verify pytest config precedence and strict-markers behavior
Post review
Findings
No blocking issues. The three decorator additions (test_ai_inference_recommender_integration.py:73, test_model_customization_deployment.py:110, test_optimize_integration.py:42) are all applied cleanly, and the goal — excluding these tests from PR checks via pytest -m "not skip_in_pr_check" — works regardless of registration.
1. tox.ini marker registration is effectively dead code (informational)
sagemaker-serve/pyproject.toml defines [tool.pytest.ini_options], and sagemaker-serve/tox.ini defines [pytest]. Pytest reads config from only the first file found in its precedence order (pytest.ini → pyproject.toml [tool.pytest.ini_options] → tox.ini [pytest] → setup.cfg). Since pyproject.toml already contains [tool.pytest.ini_options], the entire [pytest] section in tox.ini — including the newly added skip_in_pr_check line and all the pre-existing markers (slow_test, gpu_intensive, import_model, etc.) — is never read by pytest.
Practical consequences:
The tox.ini line (+1) is redundant; the marker is actually registered by the new pyproject.tomlmarkers = [...] block (pyproject.toml:76-78).
This is a pre-existing situation, not a regression from this PR — the other markers were already only declared in tox.ini and thus already unregistered from pytest's perspective. Because there is no --strict-markers or filterwarnings = error in the config, unregistered markers only emit PytestUnknownMarkWarning rather than failing.
If you'd like this to be robust (e.g., someone later enables --strict-markers), consider consolidating all markers into the pyproject.tomlmarkers list rather than splitting the source of truth across two files — or, at minimum, dropping the tox.ini addition since it has no effect.
2. Marker selection works either way
Even though registration lives in pyproject.toml, -m "not skip_in_pr_check" selection works whether or not the marker is registered, so the CI filtering (presumably in the CodeBuild buildspec, outside this repo) will behave as intended. Registration here just silences the warning — which is the right thing to do.
No security, correctness, or performance concerns. No missing tests (this is test infrastructure only).
Note: inline comments could not be posted (the inline-comment tool was unavailable in this run), so findings are consolidated here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.