Skip to content

1375 compute or cache project meta data on program start#1388

Merged
aharwood2 merged 16 commits into
devfrom
1375-compute-or-cache-project-meta-data-on-program-start
Jul 2, 2026
Merged

1375 compute or cache project meta data on program start#1388
aharwood2 merged 16 commits into
devfrom
1375-compute-or-cache-project-meta-data-on-program-start

Conversation

@aharwood2

Copy link
Copy Markdown
Member

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:

  • Added a new UpdateAllProjectMetaData method to ProjectService that iterates over all projects in the database, updating their metadata and logging the results. Errors during updates are caught and logged as warnings.
  • Modified the ProjectService constructor to require FinancialReferenceService and a logger, supporting the new batch update logic.

Application startup and initialization:

  • Moved the default culture initialization to the top of Program.cs to ensure it is set before other operations.
  • Reorganized the order of initialization in Program.cs so 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:

  • Added an exception documentation comment to UpdateProjectMetaData in Project.cs, clarifying that an exception is thrown if no financial references are available.

@aharwood2 aharwood2 added this to the v1.14.1 milestone Jun 23, 2026
@aharwood2 aharwood2 self-assigned this Jun 23, 2026
@aharwood2 aharwood2 linked an issue Jun 23, 2026 that may be closed by this pull request
2 tasks
…project-meta-data-on-program-start

# Conflicts:
#	PPMTool/Services/ProjectService.cs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.UpdateAllProjectMetaData to iterate projects and recompute metadata at startup.
  • Reordered startup initialization in Program.cs to set default culture earlier and run settings/feature cache initialization before batch project metadata updates.
  • Documented that Project.UpdateProjectMetaData throws 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.

Comment thread PPMTool/Services/ProjectService.cs Outdated
Comment thread PPMTool/Services/ProjectService.cs Outdated
Comment thread PPMTool/Services/ProjectService.cs Outdated
Comment thread PPMTool/Services/ProjectService.cs
Comment thread PPMTool/Services/ProjectService.cs Outdated
aharwood2 and others added 6 commits July 1, 2026 09:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@aharwood2 aharwood2 merged commit 89ed81d into dev Jul 2, 2026
11 checks passed
@aharwood2 aharwood2 deleted the 1375-compute-or-cache-project-meta-data-on-program-start branch July 2, 2026 08:06
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.

Compute or cache project meta data on program start

3 participants