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
{{ message }}
Repository navigation
Commit 6d5eaa1
Browse filesBrowse the repository at this point in the historyBrowse files
docs(tck): point at Appendix F for the CI policy instead of restating it
"Running it in CI" was four paragraphs of reasoning about why a conformance
suite must not be a required gate, written here in this README's own words --
and written again, differently, in three other languages'. That is precisely
how the known-deviation and control-path decisions came to have three
answers, so the reasoning now lives once in Appendix F and this section
points at it.
What stays is the mechanism, which is Python's and belongs with Python: the
two poe tasks build.yml reaches, the --ignore that excludes the suite from
them, the test-tck task beside them, and the comment above them.
Two notes stay too, because they are facts about this repository rather than
restatements of the appendix:
- Docker is not what decides the exclusion here. tests/e2e needs Docker too,
has for years, and still runs in the default build on ubuntu-latest.
- --ignore does not import the suite, and mypy in these packages is
configured over src alone, so nothing in the default build would notice the
suite failing to import against the harness. The appendix asks that an
excluded suite keep compiling; pytest --collect-only is the form Python has
for that, and the adoption branches now run it.
The "Known gaps" entry for caching points at the appendix's list rather than
naming the gap and stopping, since that list now carries the constraint a
@caching scenario has to be written against.
Signed-off-by: Simon Schrottner <simon.schrottner@flagsmith.com>
Copy file name to clipboardExpand all lines: tools/openfeature-tck/README.md
+30-16Lines changed: 30 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,23 +96,35 @@ worst-case detection latency, or the suite reports timeouts that are really just
96
96
97
97
### Running it in CI
98
98
99
-
**A containerised adoption suite is excluded from the default build, and a maintainer runs it by
100
-
hand before merge.** That is the policy in all four languages' TCKs, and it is written down here
101
-
because an exclusion nobody wrote down is indistinguishable from an oversight.
99
+
**Keep the adoption suite out of the default build, give it a task of its own, and write down that
100
+
you did.** Why, and the two ways it goes wrong, are in Appendix F's ["Running the suite in
101
+
CI"][appendix-f]. It is not restated here: this section used to carry the reasoning in its own
102
+
words, in four languages, and that is where the same decisions came to have three different answers.
103
+
104
+
The part that is Python's, and so belongs here — two `poe` tasks and one that CI never calls:
105
+
106
+
```toml
107
+
[tool.poe.tasks]
108
+
test = "pytest tests --ignore=tests/tck"
109
+
test-cov = "coverage run -m pytest tests --ignore=tests/tck"
110
+
test-tck = "pytest tests/tck"
111
+
```
102
112
103
-
Two reasons, and the second is the one that actually decides it:
113
+
`--ignore` on both of the tasks `build.yml` reaches — it runs `poe cov`, which is `test-cov` plus a
114
+
coverage report — and a comment above them saying why, so the exclusion cannot read as an oversight.
115
+
Both adoptions in this repository are exactly that, and each records its current tally in its own
116
+
README so a reviewer running `poe test-tck` can tell a new failure from a known one.
104
117
105
-
- It needs Docker, so it cannot be the thing that fails first for a contributor or a runner that has
106
-
none.
107
-
- A conformance suite reports what is true of the stack under test, which includes failures that are
108
-
not the provider's — a canonical flag the backend does not seed yet, a backend that is behind the
109
-
spec revision. Those failures are the report. A gate that must be green cannot hold a suite whose
110
-
honest output is red, and an `xfail` to make it green would say the provider is at fault when the
111
-
backend is.
118
+
Two Python-specific notes on top of the appendix:
112
119
113
-
So keep it out of the default test task, give it a task of its own, and run that before you merge.
114
-
Both adoptions in this repository do exactly that — `poe test-tck` beside `poe test` — and each
115
-
records its current tally in its own README, so a reviewer can tell a new failure from a known one.
120
+
-**Docker is not what decides it here.**`tests/e2e` needs Docker too, has needed it for years, and
121
+
still runs in the default build on `ubuntu-latest`. The exclusion rests entirely on the second
122
+
reason, that the suite's honest output is red.
123
+
-**`--ignore` does not import the suite, so nothing checks that it still would.**`mypy` in these
124
+
packages is configured over `src` alone. So the default build also collects the excluded suite
125
+
without running it — `pytest tests/tck --collect-only` imports every test module, resolves the
126
+
feature files and starts no container — which is the appendix's "keep it compiling" in the form
127
+
Python has available.
116
128
117
129
## Adding your own scenarios
118
130
@@ -678,7 +690,7 @@ This mirrors what `openfeature-flagd-api-testkit` already does for the flagd tes
678
690
|`test_http_control`|`HttpControl`| the `/reset` fallback, the disconnect bookkeeping, the control API it reports and the absence of a `/restart` binding, against a stubbed control API |
679
691
680
692
```
681
-
190 passed, 35 skipped, 2 xfailed
693
+
194 passed, 35 skipped, 2 xfailed
682
694
```
683
695
684
696
No Docker and no network beyond loopback. The conformance suites take under a second;
@@ -704,7 +716,9 @@ both. Both declare `@variants`, since an in-memory flag set is keyed by variant
704
716
*whole* context arrives intact: a provider that forwards the targeting key and silently discards
705
717
every other attribute passes. That needs either an echo operation on the control API or a second
706
718
canonical flag whose rule keys on a custom attribute.
707
-
-**Caching, hooks and flag metadata** are not covered.
719
+
-**Caching, hooks and flag metadata** are not covered. Appendix F's ["Known gaps"][appendix-f] is
720
+
the list of record, and it now also carries the constraint a `@caching` scenario has to be written
0 commit comments