1375 compute or cache project meta data on program start#1388
Merged
aharwood2 merged 16 commits intoJul 2, 2026
Conversation
2 tasks
…project-meta-data-on-program-start # Conflicts: # PPMTool/Services/ProjectService.cs
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a startup-time batch refresh of stored project metadata, sets a consistent default culture earlier in application startup, and improves documentation around Project.UpdateProjectMetaData error behavior.
Changes:
- Added
ProjectService.UpdateAllProjectMetaDatato iterate projects and recompute metadata at startup. - Reordered startup initialization in
Program.csto set default culture earlier and run settings/feature cache initialization before batch project metadata updates. - Documented that
Project.UpdateProjectMetaDatathrows when financial references are unavailable.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| PPMTool/Services/ProjectService.cs | Adds a new batch metadata update method and updates DI dependencies. |
| PPMTool/Program.cs | Moves culture initialization earlier and triggers the new batch project metadata update during startup. |
| PPMTool.Data/Entities/Project.cs | Adds XML documentation for an exception thrown by UpdateProjectMetaData. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…project-meta-data-on-program-start
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…t-1388 Optimize startup project metadata refresh without changing global `GetAll` loading behavior
…red for meta data update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new process for updating metadata for all projects at application startup, ensures consistent culture settings, and improves error handling and logging. The main changes include adding a batch metadata update for projects, refactoring service dependencies, and reorganizing initialization logic in
Program.cs.Project metadata update improvements:
UpdateAllProjectMetaDatamethod toProjectServicethat iterates over all projects in the database, updating their metadata and logging the results. Errors during updates are caught and logged as warnings.ProjectServiceconstructor to requireFinancialReferenceServiceand a logger, supporting the new batch update logic.Application startup and initialization:
Program.csto ensure it is set before other operations.Program.csso that the settings and feature service caches are initialized before the new batch project metadata update is triggered. The cleanup of the local file path now happens after these steps. [1] [2]Error handling and documentation:
UpdateProjectMetaDatainProject.cs, clarifying that an exception is thrown if no financial references are available.