Skip to content

[Feature][Customize] Customize Plugin: Non-incremental for qa_test_cases.csv Should Cascade Deletes to qa_apis and qa_test_case_executions #8444

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

Closed
3 tasks done
narrowizard opened this issue May 21, 2025 · 0 comments · Fixed by #8445
Assignees
Labels
component/plugins This issue or PR relates to plugins improvement type/feature-request This issue is a proposal for something new

Comments

@narrowizard
Copy link
Collaborator

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Use case

As a DevLake user leveraging the customize plugin to manage Quality Assurance (QA) data, I need to perform full updates of our test case inventory using qa_test_cases.csv. When doing so, I expect all associated QA data, including related API information (qa_apis) and test case execution history (qa_test_case_executions), to be refreshed consistently. This is crucial for maintaining data integrity and ensuring that our QA dashboards and metrics reflect only the current and relevant test case landscape, preventing analysis based on stale or orphaned data.

Description

Currently, when importing qa_test_cases.csv via the customize plugin's API in "non-incremental" mode, only the qa_test_cases domain layer table is cleared before the new data is ingested.
The associated tables, qa_apis and qa_test_case_executions, are not cleared during this process. This behavior can lead to data integrity issues:

  • If a test case that previously had associated API entries in qa_apis is removed from qa_test_cases.csv, those API entries remain in the qa_apis table as orphaned records.
  • Similarly, old execution records in qa_test_case_executions might persist for test cases that no longer exist.
    This results in "dirty data" in qa_apis (and potentially qa_test_case_executions), where records exist for test cases that are no longer part of the current dataset.

Requested Change:
We request that the "non-incremental" mode for qa_test_cases.csv import via the customize plugin be enhanced. When qa_test_cases.csv is imported in this mode, the qa_apis and qa_test_case_executions tables should also be cleared (truncated) before new data related to the imported test cases is populated.
This will ensure that a "non-incremental" truly refreshes the entire relevant QA data model, preventing the accumulation of stale or orphaned records in these dependent tables and maintaining data consistency across the QA domain.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@narrowizard narrowizard added the type/feature-request This issue is a proposal for something new label May 21, 2025
@narrowizard narrowizard self-assigned this May 21, 2025
@dosubot dosubot bot added component/plugins This issue or PR relates to plugins improvement labels May 21, 2025
narrowizard added a commit that referenced this issue May 21, 2025
…n-incremental import qa_test_cases

- Implement new e2e test case for QA data cleanup functionality
- Add test data files for QA test cases, APIs, and test case executions
- Update ImportQaTestCases method to delete old data for non-incremental imports
- Verify that API data, test cases, and test case executions are properly cleaned up

#8444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugins This issue or PR relates to plugins improvement type/feature-request This issue is a proposal for something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant