Skip to content

bug / update review app restore db step#396

Open
naomitodd wants to merge 3 commits into
mainfrom
bug/fix-review-app-db-restore
Open

bug / update review app restore db step#396
naomitodd wants to merge 3 commits into
mainfrom
bug/fix-review-app-db-restore

Conversation

@naomitodd

@naomitodd naomitodd commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Update review app workflow when using backup restore db:

  • updates to only run on labelling (shouldn't need updating with further commits as data hasn't changed)
  • only run on labelling means if it does fail/break - you no longer have to run 'delete review app' manually, remove + re-add 'deploy' label will trigger redeployment and other changes should prevent errors
  • fails step if it doesn't work so it's obvious & visible
  • add retries so it hopefully doesn't fail
  • and add --clean flag to dump so tables/views are dropped if it is manually or accidentally re-run on an existing review app (this isn't tested as would require down time to re-run data pipeline but is more a safety net as the db shouldn't run twice now anyway)

Ticket

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

review app actions:

successful run (Worked first time but i have seen retries in other attempts 🙃) - https://github.com/DFE-Digital/sap-public/actions/runs/27831293420

example where it didn't run on synchronize as db populated on first run - https://github.com/DFE-Digital/sap-public/actions/runs/27832055990

obvious unsuccessul run - https://github.com/DFE-Digital/sap-public/actions/runs/27832869252/job/82374872323

…doesn't work, retry and add --clean flag to dump so tables are dropped if it is re-run on an existing review app
@naomitodd naomitodd added the deploy A Review App will be created for PRs with this label label Jun 19, 2026
@github-actions

Copy link
Copy Markdown

Deployments

Review app is available at these URLs:
https://sap-public-pr-396.test.teacherservices.cloud

@naomitodd naomitodd added deploy A Review App will be created for PRs with this label and removed deploy A Review App will be created for PRs with this label labels Jun 19, 2026
@naomitodd naomitodd removed the deploy A Review App will be created for PRs with this label label Jun 19, 2026
@naomitodd naomitodd added the deploy A Review App will be created for PRs with this label label Jun 19, 2026
@naomitodd naomitodd added deploy A Review App will be created for PRs with this label and removed deploy A Review App will be created for PRs with this label labels Jun 22, 2026
@naomitodd naomitodd added deploy A Review App will be created for PRs with this label and removed deploy A Review App will be created for PRs with this label labels Jun 22, 2026
@github-actions

Copy link
Copy Markdown

Summary

Summary
Generated on: 06/22/2026 - 09:08:45
Parser: Cobertura
Assemblies: 4
Classes: 120
Files: 117
Line coverage: 79.4% (2352 of 2961)
Covered lines: 2352
Uncovered lines: 609
Coverable lines: 2961
Total lines: 7693
Branch coverage: 70% (342 of 488)
Covered branches: 342
Total branches: 488
Method coverage: Feature is only available for sponsors

Coverage

SAPData - 79.8%
Name Line Branch
SAPData 79.8% 64.4%
SAPData.Filters.SqlViewFilterProvider 100% 100%
SAPData.GenerateIndexes 100% 100%
SAPData.GenerateRawTables 58.6% 39%
SAPData.GenerateViews 86.8% 83.7%
SAPData.Models.DataMapMapping 0%
SAPPub.Core - 76.9%
Name Line Branch
SAPPub.Core 76.9% 100%
SAPPub.Core.Enums.Progress8BandingExtensions 100% 100%
SAPPub.Core.Exceptions.NotFoundException 100%
SAPPub.Core.Extensions.DoubleExtensions 100%
SAPPub.Core.Extensions.EstablishmentExtensions 100%
SAPPub.Core.Extensions.EstablishmentStatusExtensions 94.7%
SAPPub.Core.Extensions.SchoolSearchDocumentExtensions 100%
SAPPub.Core.Extensions.StringExtensions 100% 100%
SAPPub.Core.Helpers.AcademicYearsHelper 100%
SAPPub.Core.Helpers.MappingHelper 88.8%
SAPPub.Core.Helpers.TextHelpers 86.6%
SAPPub.Core.ServiceModels.Common.Pager 75%
SAPPub.Core.ServiceModels.Search.InputModels.SearchQuery 100%
SAPPub.Core.Services.EmailService 100% 100%
SAPPub.Core.Services.EstablishmentService 100%
SAPPub.Core.Services.Gateway.GatewayLocalAuthorityService 0%
SAPPub.Core.Services.Gateway.GatewaySettingsService 0%
SAPPub.Core.Services.Gateway.GatewayUserAuditService 0%
SAPPub.Core.Services.Gateway.GatewayUserLAService 0%
SAPPub.Core.Services.Gateway.GatewayUserService 0%
SAPPub.Core.Services.KS4.Absence.EnglandAbsenceService 100%
SAPPub.Core.Services.KS4.Absence.EstablishmentAbsenceService 100%
SAPPub.Core.Services.KS4.Absence.LAAbsenceService 100%
SAPPub.Core.Services.KS4.Attendance.AttendanceService 100%
SAPPub.Core.Services.KS4.Destinations.EnglandDestinationsService 100%
SAPPub.Core.Services.KS4.Destinations.EstablishmentDestinationsService 100%
SAPPub.Core.Services.KS4.Destinations.LADestinationsService 100%
SAPPub.Core.Services.KS4.DestinationsService 0%
SAPPub.Core.Services.KS4.Performance.EnglandPerformanceService 100%
SAPPub.Core.Services.KS4.Performance.EnglishAndMathsResultsService 100%
SAPPub.Core.Services.KS4.Performance.EstablishmentPerformanceService 100%
SAPPub.Core.Services.KS4.Performance.LAPerformanceService 100%
SAPPub.Core.Services.KS4.SubjectEntries.EstablishmentSubjectEntriesService 100%
SAPPub.Core.Services.KS4.Workforce.EstablishmentWorkforceService 100%
SAPPub.Core.Services.MySchoolsListService 94.5% 100%
SAPPub.Core.Services.Search.FeatureFlagSearchVisibilityPolicy 0%
SAPPub.Core.ValueObjects.CodedDouble 0%
SAPPub.Infrastructure - 62.5%
Name Line Branch
SAPPub.Infrastructure 62.5% 31.8%
SAPPub.Infrastructure.Mapping.ValueCodes.CodedDoubleTypeHandler 9% 0%
SAPPub.Infrastructure.Mapping.ValueCodes.ReasonCodeLookup 50%
SAPPub.Infrastructure.Mapping.ValueCodes.ReflectionCodedValueMapper 0% 0%
SAPPub.Infrastructure.Mapping.ValueCodes.ValueCodeParser 0% 0%
SAPPub.Infrastructure.PostcodeLookup.PostcodeLookupService 100%
SAPPub.Infrastructure.PostgresSearch.PostgresSchoolSearchIndexReader 100%
SAPPub.Infrastructure.Repositories.EmailRepository 94.1%
SAPPub.Infrastructure.Repositories.EstablishmentRepository 100% 100%
SAPPub.Infrastructure.Repositories.Gateway.GatewayLocalAuthorityRepository 100% 100%
SAPPub.Infrastructure.Repositories.Gateway.GatewayUserAuditRepository 100%
SAPPub.Infrastructure.Repositories.Gateway.GatewayUserRepository 100%
SAPPub.Infrastructure.Repositories.Generic.DapperCommandBuilder 0% 0%
SAPPub.Infrastructure.Repositories.Generic.DapperRepository`1 90% 100%
SAPPub.Infrastructure.Repositories.Generic.JSONRepository`1 0% 0%
SAPPub.Infrastructure.Repositories.Helpers.DapperHelpers 70.8% 11.1%
SAPPub.Infrastructure.Repositories.KS4.Absence.EnglandAbsenceRepository 100%
SAPPub.Infrastructure.Repositories.KS4.Absence.EstablishmentAbsenceReposito
ry
100%
SAPPub.Infrastructure.Repositories.KS4.Absence.LAAbsenceRepository 100%
SAPPub.Infrastructure.Repositories.KS4.Destinations.EnglandDestinationsRepo
sitory
100%
SAPPub.Infrastructure.Repositories.KS4.Destinations.EstablishmentDestinatio
nsRepository
100%
SAPPub.Infrastructure.Repositories.KS4.Destinations.LADestinationsRepositor
y
100%
SAPPub.Infrastructure.Repositories.KS4.Performance.EnglandPerformanceReposi
tory
100%
SAPPub.Infrastructure.Repositories.KS4.Performance.EstablishmentPerformance
Repository
100%
SAPPub.Infrastructure.Repositories.KS4.Performance.LAPerformanceRepository 100%
SAPPub.Infrastructure.Repositories.KS4.SubjectEntries.EstablishmentSubjectE
ntriesRepository
100%
SAPPub.Infrastructure.Repositories.KS4.Workforce.EstablishmentWorkforceRepo
sitory
100%
SAPPub.Infrastructure.Repositories.LaUrlsRepository 100%
SAPPub.Web - 86.9%
Name Line Branch
SAPPub.Web 86.9% 88.6%
SAPPub.Web.Areas.Compare.Filters.SecondaryComparisonQueryValidationAttribut
e
100%
SAPPub.Web.Areas.Compare.ViewModels.Secondary.CompareSecondarySchoolBaseVie
wModel
100%
SAPPub.Web.Areas.Gateway.Controllers.GatewayController 53% 50%
SAPPub.Web.Constants.Constants 100%
SAPPub.Web.Controllers.CookiesController 90.4% 100%
SAPPub.Web.Controllers.ErrorController 82.3% 100%
SAPPub.Web.Controllers.HealthController 67.5% 100%
SAPPub.Web.Controllers.HelpController 100%
SAPPub.Web.Controllers.HomeController 100%
SAPPub.Web.Controllers.MySchoolsController 100% 100%
SAPPub.Web.Controllers.MySchoolsListController 100% 100%
SAPPub.Web.Controllers.SchoolController 0%
SAPPub.Web.Controllers.SearchController 100% 100%
SAPPub.Web.Controllers.SecondarySchoolController 100%
SAPPub.Web.Helpers.CommonHelper 100% 100%
SAPPub.Web.Helpers.DisplayField`1 93.7%
SAPPub.Web.Helpers.DisplayFieldExtensions 100% 100%
SAPPub.Web.Helpers.EnumHelper 100%
SAPPub.Web.Helpers.TempDataHelper 91.6% 100%
SAPPub.Web.Helpers.UrlHelper 100% 100%
SAPPub.Web.Middleware.DependenciesExtensions 100% 100%
SAPPub.Web.Middleware.GatewayMiddleware 100% 100%
SAPPub.Web.Middleware.GatewayMiddlewareExtensions 0%
SAPPub.Web.Middleware.NotFoundExceptionHandler 50% 50%
SAPPub.Web.Middleware.SecurityHeadersMiddleware 89.1%
SAPPub.Web.Middleware.SecurityHeadersMiddlewareExtensions 100%
SAPPub.Web.Models.Common.PagerViewModel 62% 100%
SAPPub.Web.Models.Common.PaginationItem 85.7%
SAPPub.Web.Models.ErrorViewModel 0%
SAPPub.Web.Models.MySchools.MySchoolModel 100%
SAPPub.Web.Models.MySchools.MySchoolsListViewModel 100%
SAPPub.Web.Models.Search.SearchResult 100% 100%
SAPPub.Web.Models.Search.SearchResultsViewModel 100% 100%
SAPPub.Web.Models.SecondarySchool.AboutSchoolViewModel 100% 100%
SAPPub.Web.Models.SecondarySchool.AcademicPerformanceAttainmentAndProgressV
iewModel
99% 100%
SAPPub.Web.Models.SecondarySchool.AcademicPerformanceEnglishAndMathsResults
ViewModel
100%
SAPPub.Web.Models.SecondarySchool.AcademicPerformanceSubjectsEnteredViewMod
el
100%
SAPPub.Web.Models.SecondarySchool.AdmissionsViewModel 100% 100%
SAPPub.Web.Models.SecondarySchool.AttendanceViewModel 100%
SAPPub.Web.Models.SecondarySchool.CurriculumAndExtraCurricularActivitiesVie
wModel
100%
SAPPub.Web.Models.SecondarySchool.DestinationsViewModel 100%
SAPPub.Web.Models.SecondarySchool.SecondarySchoolBaseViewModel 100%
SAPPub.Web.Models.SecondarySchool.SuccessorOrPredecessorDetailsModel 100%
SAPPub.Web.ViewComponents.Banner.Banner 100%
SAPPub.Web.ViewComponents.MySchools.AddSchoolButton 100%
SAPPub.Web.ViewComponents.Pagination.Pagination 100%
SAPPub.Web.ViewComponents.VerticalNavigation.VerticalNavigation 100%
SAPPub.Web.ViewComponents.VerticalNavigation.VerticalNavigationModel 100%
SAPPub.Web.ViewComponents.VerticalNavigationCompareSecondary.VerticalNaviga
tionCompareSecondary
100%
SAPPub.Web.ViewComponents.VerticalNavigationCompareSecondary.VerticalNaviga
tionCompareSecondaryModel
0% 0%
SAPPub.Web.ViewComponents.VerticalNavigationMySchools.VerticalNavigationMyS
chools
100%
SAPSec.Web.Setup.WebApplicationBuilderExtensions 33.8% 12.5%

@github-actions

Copy link
Copy Markdown

school/100273/saint-paul-roman-catholic-infant-school/secondary/destinations

https://127.0.0.1:41977/school/100273/saint-paul-roman-catholic-infant-school/secondary/destinations

Violations: 1

IMPACT: Critical


label: Form elements must have labels

Target: #current-view

Target: #data-overtime-view


school/100273/saint-paul-roman-catholic-infant-school/secondary/academic-performance-english-and-maths-results

https://127.0.0.1:41977/school/100273/saint-paul-roman-catholic-infant-school/secondary/academic-performance-english-and-maths-results

Violations: 1

IMPACT: Critical


label: Form elements must have labels

Target: #current-view

Target: #data-overtime-view


@naomitodd naomitodd marked this pull request as ready for review June 22, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy A Review App will be created for PRs with this label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant