Skip to content

Commit

Permalink
Add -oss_excluded to TF build/test tag filters
Browse files Browse the repository at this point in the history
Currently, `no_oss` is used to exclude a test from running in the official TF OSS test infrastructure. However, it is difficult to distinguish between temporary and permanent exclusions. For example, a test may be disabled temporarily if it is broken, or it may be designed to not run on OSS permanently. To address this issue, we introduce a new tag `oss_excluded` for platform exclusion design. `no_oss` will now be considered to disable broken tests, while `oss_excluded` will be used to permanently exclude a test from running on OSS.

PiperOrigin-RevId: 514847796
  • Loading branch information
kanglant authored and tensorflower-gardener committed Mar 13, 2023
1 parent 9f1b18a commit 6257020
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kokoro/github/ubuntu/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST_ROOT=$(pwd)/${PIP_TEST_PREFIX}
rm -rf "$TEST_ROOT"
mkdir -p "$TEST_ROOT"
ln -s "$(pwd)"/tensorflow_gnn "$TEST_ROOT"/tensorflow_gnn
tag_filters="-no_oss"
tag_filters="-no_oss,-oss_excluded"

bazel clean
pip install -r requirements-dev.txt --progress-bar off
Expand Down
2 changes: 1 addition & 1 deletion kokoro/github/ubuntu/cpu/build_versioned.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ln -s "$(pwd)"/tensorflow_gnn "$TEST_ROOT"/tensorflow_gnn
# Prepend common tag filters to a defined env_var
# For example, tests for TF 2.8 shouldn't run RNG-dependent tests
# These tag filters are enforced to start with a comma for separation
tag_filters="-no_oss${TAG_FILTERS}"
tag_filters="-no_oss,-oss_excluded${TAG_FILTERS}"

bazel clean
pip install -r requirements-dev.txt --progress-bar off
Expand Down
7 changes: 4 additions & 3 deletions tensorflow_gnn/docs/guide/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ After setting up the test directory, you can run all tests locally by running
the following command in the repo root directory.

```
bazel test --build_tag_filters=-no_oss --test_tag_filters=-no_oss --test_output=errors --verbose_failures=true --build_tests_only --define=no_tfgnn_py_deps=true --keep_going --experimental_repo_remote_exec //bazel_pip/tensorflow_gnn/...
bazel test --build_tag_filters=-no_oss,-oss_excluded --test_tag_filters=-no_oss,-oss_excluded --test_output=errors --verbose_failures=true --build_tests_only --define=no_tfgnn_py_deps=true --keep_going --experimental_repo_remote_exec //bazel_pip/tensorflow_gnn/...
```

The `--define=no_tfgnn_py_deps=true` flag directs bazel to assume that all
dependencies are provided in the environment (where we just installed the .whl)

The flags `--build_tag_filters=-no_oss` and `--test_tag_filters=-no_oss` disable
tests that pass in the internal production environment but fail on GitHub.
The flags `--build_tag_filters=-no_oss,-oss_excluded` and
`--test_tag_filters=-no_oss,-oss_excluded` disable tests that pass in the
internal production environment but fail on GitHub.

### Run a single test file

Expand Down

0 comments on commit 6257020

Please sign in to comment.