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

feat: Backend support and tests for refresh runs from previous at version #1320

Closed
wants to merge 21 commits into from

Conversation

stalgiag
Copy link
Contributor

@stalgiag stalgiag commented Feb 13, 2025

This pull request adds backend support and testing for the refresh feature.

To keep this in a semi-reviewable state, I am going to open additional PRs targeting this one. This should be reviewed first but I will target this branch with subsequent related work.

Remaining related tasks (follow-up)

Notes

  • In order to untangle circular dependencies, I broke up AtService into AtService and AtVersionService. Apologies for the noise in the PR
  • I opted to extend the testing db dump to provide the necessary data for testing

Can be reviewed but should not be merged since I want to aggregate additional changes here.

Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

@stalgiag thanks for doing all this prep work. I'm sure it'll certainly go a long way so as to not have overly huge PRs for this incoming and exciting change!

The direction of things here makes sense to me. I left a question inline though that makes me wonder if I'm testing existing functionality as intended, so would love clarification on that.

Copy link
Contributor

Choose a reason for hiding this comment

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

A welcome change!

removeAtVersionById,
findOrCreateAtVersion,
getUniqueAtVersionsForReport,
getRefreshableTestPlanReports: getRefreshableTestPlanReportsForVersion
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Is there a reason for not exporting with the function name. Or should the function name be renamed to getRefreshableTestPlanReports?

Just wondering if it's because of the sole import location and that context why the rename happened here. If so, I personally would rather the rename happen where the function is being imported because this just causes a tiny bit of initial confusion when looking at these exports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good callout! No this is just due to me renaming the function using my IDE's "auto-rename" feature and the feature making a choice to keep the name the same in the export. Can fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 5c01031

@@ -585,13 +592,6 @@ const scheduleCollectionJob = async (
transaction
});

const atVersion = await getAtVersionWithRequirements(
Copy link
Contributor

Choose a reason for hiding this comment

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

Given this removal, doesn't the scheduleCollectionJobResolver#L17 now need to also pass atVersion? Assigning a bot now immediately fails or is that intended as part of the follow-up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't finish addressing the changes on the frontend and that is part of why I didn't want to merge this work until more had aggregated here. So, yes, it is meant to be a follow-up but the work shouldn't be merged without it

But, the point you have here raises a really good question that makes me wonder why the scheduleCollectionJob gql mutation in the integration test is still working. Will look into it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was still working because of the way that the test version of a collection job is initialized. Luckily no eerie mysteries this time.

I took the resolver to a slightly more logical stopping point for the frontend work with 5c01031

@@ -27,11 +27,28 @@ BEGIN
END;
$$;

CREATE OR REPLACE FUNCTION get_at_version_id(atId integer, p_name text) RETURNS integer
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat!

stalgiag added 2 commits March 4, 2025 09:14
…automatable version (#1325)

* Working verdict copying

* Correct auto finalization behavior on refresh

* Also test that report is not finalized when not all output is the same
@stalgiag
Copy link
Contributor Author

superceded by #1348

@stalgiag stalgiag closed this Mar 21, 2025
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.

2 participants