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

MINOR - Create Test Case Resolution ts entry & delete resolution when… #14541

Merged
merged 14 commits into from
Jan 5, 2024

Conversation

pmbrull
Copy link
Collaborator

@pmbrull pmbrull commented Jan 2, 2024

… Test Case is deleted

Describe your changes:

  • When a test failed, we added the testCaseResolutionStatusReference field, but it did not add the entry on test_case_resolution_status_time_series time series table
  • When deleting a test case, we were not cleaning up the test_case_resolution_status_time_series entries

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@pmbrull pmbrull requested a review from a team as a code owner January 2, 2024 11:20
@github-actions github-actions bot added backend Ingestion safe to test Add this label to run secure Github workflows on PRs labels Jan 2, 2024
@pmbrull pmbrull requested a review from TeddyCr January 2, 2024 13:34
Copy link
Contributor

github-actions bot commented Jan 3, 2024

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

Copy link
Contributor

github-actions bot commented Jan 4, 2024

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.


@ConnectionAwareSqlQuery(
value =
"SELECT json FROM data_quality_data_time_series where entityFQNHash = :testCaseFQNHash "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its worth promoting incidentId as field at top level and add a index insted of doing JSON_EXTRACT

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, will change that

String jsonThread =
Entity.getCollectionDAO()
.feedDAO()
.fetchThreadByTestCaseResolutionStatusId(incident.getStateId());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we are encoding this in entityLink such that we can retrieve all the incidents(tasks) that belong to a test case along with a particular incident

/**
* Check all the test case results that have an ongoing incident and get the stateId of the incident
*/
private List<UUID> getIncidentIds(TestCase test) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is going to be an expensive call

harshach
harshach previously approved these changes Jan 4, 2024
@pmbrull pmbrull requested a review from a team as a code owner January 5, 2024 06:42
Copy link

sonarqubecloud bot commented Jan 5, 2024

Quality Gate Passed Quality Gate passed for 'open-metadata-ingestion'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
75.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@pmbrull pmbrull merged commit 0255171 into open-metadata:main Jan 5, 2024
17 checks passed
@pmbrull pmbrull deleted the dq-inc-fix branch January 5, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Ingestion safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants