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

Store PDF documents in db table #371

Merged
merged 21 commits into from
Nov 27, 2024
Merged

Store PDF documents in db table #371

merged 21 commits into from
Nov 27, 2024

Conversation

danielnaab
Copy link
Contributor

@danielnaab danielnaab commented Oct 31, 2024

Finishing up #222, this PR:

  • Adds PDF document storage to the database, removing it from the form definition
  • Adds initializeForm service for creating new forms
  • Gets attachment download working
  • Adds validation of form blueprint at the service and database levels

@danielnaab danielnaab changed the base branch from main to fix-circular-imports October 31, 2024 21:23
Copy link

github-actions bot commented Oct 31, 2024

Terraform plan for tts-10x-atj-dev

Plan: 0 to add, 2 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place

Terraform will perform the following actions:

  # cloudfoundry_app.tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029 will be updated in-place
!~  resource "cloudfoundry_app" "tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029" {
!~      docker_image                    = "ghcr.io/gsa-tts/atj-platform/server-doj:8a7f9827a9a861a7ad510878dbd7faaffbf1b401" -> "ghcr.io/gsa-tts/atj-platform/server-doj:ee92f5067a544089bbb0563ef3bf0d4ff739c8ec"
        id                              = "6246c063-6cf4-423d-812a-4bfdeb62bcae"
        name                            = "tts-10x-atj-dev-server-doj-app"
#        (17 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # cloudfoundry_app.tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1 will be updated in-place
!~  resource "cloudfoundry_app" "tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1" {
!~      docker_image                    = "ghcr.io/gsa-tts/atj-platform/server-kansas:8a7f9827a9a861a7ad510878dbd7faaffbf1b401" -> "ghcr.io/gsa-tts/atj-platform/server-kansas:ee92f5067a544089bbb0563ef3bf0d4ff739c8ec"
        id                              = "f7c60971-bffd-4a6e-a0bb-af1191079918"
        name                            = "tts-10x-atj-dev-server-kansas-app"
#        (17 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

📝 Plan generated in Post Terraform plan to PR comment #380

@danielnaab danielnaab force-pushed the fix-circular-imports branch from f0c1074 to b427fba Compare November 1, 2024 17:48
@danielnaab danielnaab force-pushed the fix-circular-imports branch from b427fba to efa9235 Compare November 1, 2024 18:21
Base automatically changed from fix-circular-imports to main November 1, 2024 18:36
Copy link

github-actions bot commented Nov 5, 2024

Terraform plan for tts-10x-atj-dev

Plan: 0 to add, 2 to change, 0 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
!~  update in-place

Terraform will perform the following actions:

  # cloudfoundry_app.tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029 will be updated in-place
!~  resource "cloudfoundry_app" "tts-10x-atj-dev-server-doj_tts-10x-atj-dev-server-doj-app_380DB029" {
!~      docker_image                    = "ghcr.io/gsa-tts/forms/server-doj:47ec6d40203616c3765992b4bc1ed451dda9a63d" -> "ghcr.io/gsa-tts/forms/server-doj:8e6d0a34db54c46c69e2d4098c10fdca6d1e8d4d"
        id                              = "8a9fc8b6-af5e-45a2-abb6-2c24ecbcdfaa"
        name                            = "tts-10x-atj-dev-server-doj-app"
#        (17 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

  # cloudfoundry_app.tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1 will be updated in-place
!~  resource "cloudfoundry_app" "tts-10x-atj-dev-server-kansas_tts-10x-atj-dev-server-kansas-app_337A9CF1" {
!~      docker_image                    = "ghcr.io/gsa-tts/forms/server-kansas:47ec6d40203616c3765992b4bc1ed451dda9a63d" -> "ghcr.io/gsa-tts/forms/server-kansas:8e6d0a34db54c46c69e2d4098c10fdca6d1e8d4d"
        id                              = "e885e531-11b7-4906-9cc3-0ddf483868f5"
        name                            = "tts-10x-atj-dev-server-kansas-app"
#        (17 unchanged attributes hidden)

#        (3 unchanged blocks hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.

📝 Plan generated in Post Terraform plan to PR comment #447

@danielnaab danielnaab marked this pull request as ready for review November 8, 2024 00:37
Copy link
Contributor

@ethangardner ethangardner left a comment

Choose a reason for hiding this comment

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

Overall this looks really good. There are some small things I noticed, but it should be good to go once they're addressed, as there's not any major refactoring concerns I see.

I'll give it conditional approval as long as these are addressed.

packages/forms/src/builder/index.ts Outdated Show resolved Hide resolved
packages/forms/src/builder/index.ts Outdated Show resolved Hide resolved
packages/forms/src/services/initialize-form.test.ts Outdated Show resolved Hide resolved
packages/server/src/lib/api-client.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@ethangardner ethangardner 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 addressing the items from the previous code review. I think this looks great!

@danielnaab danielnaab merged commit 47ea8ce into main Nov 27, 2024
4 checks passed
@danielnaab danielnaab deleted the documents-table branch November 27, 2024 12:13
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