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

#4247 - Create application versioning (Part 1) #4314

Merged
merged 9 commits into from
Feb 5, 2025

Conversation

sh16011993
Copy link
Collaborator

@sh16011993 sh16011993 commented Feb 3, 2025

As a part of this PR, the following were completed:

  • Created migrations for the 2 columns: parent_application_id and preceding_application_id.
  • Added the above columns to the database entity models.
  • Created the DB migration to have the new columns populated for the existing entries.
  • Adjusted the code logic to save the parent-application-id and the preceding-application-id for the application created for the first time (as draft) and then again, these columns to be updated when the application is edited and submitted again.
  • Adjusted the e2e tests for workers, queue-consumers and api to adapt to the change in logic.

Screenshot:

Rollback evidence:

image

@sh16011993 sh16011993 added the DB DB migration involved label Feb 3, 2025
@sh16011993 sh16011993 self-assigned this Feb 3, 2025
@dheepak-aot dheepak-aot self-requested a review February 3, 2025 18:23
@dheepak-aot
Copy link
Collaborator

Please have a look at the comments @sh16011993

@lewischen-aot lewischen-aot self-requested a review February 5, 2025 00:10
ADD
CONSTRAINT parent_application_id_contraint CHECK(
parent_application_id IS NOT NULL
OR application_status IN ('Draft', 'Cancelled')
Copy link
Collaborator

Choose a reason for hiding this comment

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

As per our discussion, the NOT NULL is allowed only for draft status.

ALTER TABLE
  sims.applications
ADD
  CONSTRAINT parent_application_id_constraint CHECK(
    parent_application_id IS NOT NULL
    OR application_status = 'Draft'
  ),
ADD
  CONSTRAINT preceding_application_id_constraint CHECK(
    preceding_application_id IS NOT NULL
    OR application_status = 'Draft'
  );

Copy link

sonarqubecloud bot commented Feb 5, 2025

Copy link

github-actions bot commented Feb 5, 2025

Backend Unit Tests Coverage Report

Totals Coverage
Statements: 22.23% ( 3902 / 17551 )
Methods: 10.14% ( 226 / 2229 )
Lines: 25.57% ( 3368 / 13173 )
Branches: 14.33% ( 308 / 2149 )

Copy link

github-actions bot commented Feb 5, 2025

E2E Workflow Workers Coverage Report

Totals Coverage
Statements: 65.59% ( 589 / 898 )
Methods: 59.63% ( 65 / 109 )
Lines: 68.72% ( 468 / 681 )
Branches: 51.85% ( 56 / 108 )

Copy link

github-actions bot commented Feb 5, 2025

E2E SIMS API Coverage Report

Totals Coverage
Statements: 67.8% ( 6063 / 8943 )
Methods: 65.24% ( 745 / 1142 )
Lines: 71.64% ( 4751 / 6632 )
Branches: 48.5% ( 567 / 1169 )

Copy link
Collaborator

@dheepak-aot dheepak-aot left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes. Looks good 👍

Copy link

github-actions bot commented Feb 5, 2025

E2E Queue Consumers Coverage Report

Totals Coverage
Statements: 87.15% ( 1404 / 1611 )
Methods: 84.66% ( 160 / 189 )
Lines: 89.38% ( 1161 / 1299 )
Branches: 67.48% ( 83 / 123 )

Copy link
Collaborator

@lewischen-aot lewischen-aot left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Nice work

@sh16011993 sh16011993 added this pull request to the merge queue Feb 5, 2025
Merged via the queue into main with commit 80f75b9 Feb 5, 2025
21 checks passed
@sh16011993 sh16011993 deleted the 4247_create_application_versioning branch February 5, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB DB migration involved E2E/Unit tests SIMS-Api SIMS-Api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants