Skip to content
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

Fix Product/Version references for TestRun / TestExecution in multiple pages #3439

Merged
merged 5 commits into from
Dec 3, 2023

Conversation

atodorov
Copy link
Member

@atodorov atodorov commented Dec 1, 2023

the main issue being that TestRun->Plan->Product may change over time b/c plans evolve and that will leads to inaccurate queries/display of historical data. This is addressed by using the information stored in TestRun->Build and TestExecution->Build which is much more stable over time and represents values at the time of test execution.

the root cause of the bug is that the correct relationship here is
TR -> Build -> Version which is independent of the relationship
TP -> Product -> Version.

WARNING: this is an API change which requires more patches!

- Method ``TestRun.filter()`` no longer returns the field ``plan__product_version``
- Method ``TestRun.filter()`` no longer returns the field ``plan__product_version__value``
- Method ``TestRun.filter()`` now returns the new field ``build__version``
- Method ``TestRun.filter()`` now returns the new field ``build__version__value``
@atodorov atodorov force-pushed the fix_wrong_version_for_testrun_search_page branch 2 times, most recently from 4ef2028 to 042e9a6 Compare December 3, 2023 19:24
the root cause of the bug is that the correct relationship here is
TR -> Build -> Version -> Product which is independent of the relationship
TP -> Product.

WARNING: this is an API change which requires more patches!

- Method ``TestRun.filter()`` no longer returns the field ``plan__product``
- Method ``TestRun.filter()`` now returns the new field ``build__version__product`
following the previous 2 patches for the Search Test Run page this
commit applies similar changes to RPC queries used on Telemetry pages.

All of these underlying queries operate on TestExecution and
Product/Version information should be matched against what was stored in
TestExecution->Build because it is more accurate over time, while
TE->TR->TP->Product/Version is more likely to change in the future!
use the relationship TR->Build as the starting point because TR->Plan
is much more likely to update its Product/Version values in the future.

NOTE: the field `product_version` which is removed from tests doesn't
make sense because neither the underlying forms, not the underlying
models have such a field.
@atodorov atodorov force-pushed the fix_wrong_version_for_testrun_search_page branch from 042e9a6 to 97821d2 Compare December 3, 2023 19:35
similar to previous commits use Product/Version values based on the
Build a specific TestExecution status was recorded against instead
of using values coming from TestRun->TestPlan which can change in the
future.

NOTE: execution.build is initialized with run.build and then may change
its value if we're recording results against multiple builds inside the
same TestRun.

(For example mark some executions as PASS, others as FAIL;
then update TR to a newer Build; retest and mark the FAIL results as
PASS)
@atodorov atodorov force-pushed the fix_wrong_version_for_testrun_search_page branch from 97821d2 to 31932c8 Compare December 3, 2023 19:36
@atodorov atodorov marked this pull request as ready for review December 3, 2023 20:00
@atodorov atodorov merged commit 48a33a7 into master Dec 3, 2023
40 of 46 checks passed
@atodorov atodorov deleted the fix_wrong_version_for_testrun_search_page branch December 3, 2023 20:08
atodorov added a commit to kiwitcms/trackers-integration that referenced this pull request Jan 13, 2024
atodorov added a commit to kiwitcms/trackers-integration that referenced this pull request Jan 13, 2024
atodorov added a commit to kiwitcms/trackers-integration that referenced this pull request Jan 13, 2024
atodorov added a commit to kiwitcms/github-app that referenced this pull request Jan 14, 2024
atodorov added a commit to kiwitcms/github-app that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant