Skip to content

Update Orchestrator.cs #14

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ezzz37
Copy link

@ezzz37 ezzz37 commented Jun 25, 2025

  • New Activity Function CleanOldRepositoryData: This function removes Repository entities from the Repositories table that are older than a configurable number of days (defaulting to 90 days). It handles data deletion in batches for efficiency and to comply with Azure Table Storage limits.
  • New Orchestration Function CleanupOrchestrator: A dedicated orchestration to manage the cleanup process. It calls CleanOldRepositoryData.
  • New HTTP Trigger CleanupOrchestrator_HttpStart: Allows for manual triggering of the cleanup orchestration (useful for testing).
  • New Timer Trigger ScheduleDailyCleanup: Configured to run daily at 4:00 AM UTC, automatically initiating the CleanupOrchestrator to perform routine data hygiene.
  • Repository Class Update: Added a parameterless constructor to the Repository class, which is necessary for Azure Table Storage deserialization.
  • EnumerableExtensions.Chunk Helper: Included a Chunk extension method for batch processing, primarily for compatibility with .NET versions prior to .NET 6 (where Enumerable.Chunk is built-in).

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

- **New Activity Function `CleanOldRepositoryData`**: This function removes `Repository` entities from the `Repositories` table that are older than a configurable number of days (defaulting to 90 days). It handles data deletion in batches for efficiency and to comply with Azure Table Storage limits.
- **New Orchestration Function `CleanupOrchestrator`**: A dedicated orchestration to manage the cleanup process. It calls `CleanOldRepositoryData`.
- **New HTTP Trigger `CleanupOrchestrator_HttpStart`**: Allows for manual triggering of the cleanup orchestration (useful for testing).
- **New Timer Trigger `ScheduleDailyCleanup`**: Configured to run daily at 4:00 AM UTC, automatically initiating the `CleanupOrchestrator` to perform routine data hygiene.
- **`Repository` Class Update**: Added a parameterless constructor to the `Repository` class, which is necessary for Azure Table Storage deserialization.
- **`EnumerableExtensions.Chunk` Helper**: Included a `Chunk` extension method for batch processing, primarily for compatibility with .NET versions prior to .NET 6 (where `Enumerable.Chunk` is built-in).
@ezzz37
Copy link
Author

ezzz37 commented Jun 25, 2025

@microsoft-github-policy-service agree

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.

1 participant