You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/06/30 20:05:07 UTC
[GitHub] [tvm] driazati opened a new pull request, #11974: [ci] Override Request in pytests
driazati opened a new pull request, #11974:
URL: https://github.com/apache/tvm/pull/11974
This follows on #11839 to apply it outside of docs and to tests running under pytest instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] driazati commented on a diff in pull request #11974: [ci] Override `Request` in pytests
Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #11974:
URL: https://github.com/apache/tvm/pull/11974#discussion_r919290823
##########
conftest.py:
##########
@@ -96,3 +100,12 @@ def pytest_collection_modifyitems(config, items):
reason=f"Test running on shard {item_shard_index} of {num_shards}",
)
)
+
+
+def pytest_sessionstart():
+ if IS_IN_CI:
+ hook_script_dir = REPO_ROOT / "tests" / "scripts" / "request_hook"
+ sys.path.append(str(hook_script_dir))
+ import request_hook # pylint: disable=import-outside-toplevel
+
+ request_hook.init()
Review Comment:
the hook already logs a message any time its used + whenever it redirects a URL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] areusch commented on a diff in pull request #11974: [ci] Override `Request` in pytests
Posted by GitBox <gi...@apache.org>.
areusch commented on code in PR #11974:
URL: https://github.com/apache/tvm/pull/11974#discussion_r919225338
##########
conftest.py:
##########
@@ -96,3 +100,12 @@ def pytest_collection_modifyitems(config, items):
reason=f"Test running on shard {item_shard_index} of {num_shards}",
)
)
+
+
+def pytest_sessionstart():
+ if IS_IN_CI:
+ hook_script_dir = REPO_ROOT / "tests" / "scripts" / "request_hook"
+ sys.path.append(str(hook_script_dir))
+ import request_hook # pylint: disable=import-outside-toplevel
+
+ request_hook.init()
Review Comment:
maybe print a warning here?
##########
conftest.py:
##########
@@ -16,10 +16,14 @@
# under the License.
import hashlib
import pytest
+import sys
import os
-from collections import OrderedDict
+
+from pathlib import Path
pytest_plugins = ["tvm.testing.plugin"]
+IS_IN_CI = os.getenv("CI", "") == "true"
Review Comment:
should this be "CI" in os.environ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] github-actions[bot] commented on pull request #11974: [ci] Override `Request` in pytests
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #11974:
URL: https://github.com/apache/tvm/pull/11974#issuecomment-1179119304
It has been a while since this PR was updated, @areusch @Mousius please leave a review or address the outstanding comments. @driazati if this PR is still a work in progress, please [convert it to a draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft) until it is ready for review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] areusch merged pull request #11974: [ci] Override `Request` in pytests
Posted by GitBox <gi...@apache.org>.
areusch merged PR #11974:
URL: https://github.com/apache/tvm/pull/11974
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] github-actions[bot] commented on pull request #11974: [ci] Override `Request` in pytests
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #11974:
URL: https://github.com/apache/tvm/pull/11974#issuecomment-1171711722
<!---docs-bot-comment-->
Built docs for commit 06c1e66b1b80c097966225b8705eb27f26c78bb0 can be found [here](https://pr-docs.tlcpack.ai/PR-11974/1/docs/index.html).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] driazati commented on a diff in pull request #11974: [ci] Override `Request` in pytests
Posted by GitBox <gi...@apache.org>.
driazati commented on code in PR #11974:
URL: https://github.com/apache/tvm/pull/11974#discussion_r919292294
##########
conftest.py:
##########
@@ -16,10 +16,14 @@
# under the License.
import hashlib
import pytest
+import sys
import os
-from collections import OrderedDict
+
+from pathlib import Path
pytest_plugins = ["tvm.testing.plugin"]
+IS_IN_CI = os.getenv("CI", "") == "true"
Review Comment:
resolved offline, Jenkins sets it to `true`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org