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

Prevent InstantJobRegistry from altering the content of JobRegistry #131

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

nulltoken
Copy link
Collaborator

@nulltoken nulltoken commented Nov 4, 2024

Pull request description

InstantJobRegistry role is to trigger jobs not to mess with the registry.
It's not its responsibility and may potentially generate issue in the context of #108 and job definition unicity.

This PR:

  • removes the update of the registry storage when a previously unregistered job is triggered and add a unit test to protect us from reappearing later.
  • includes as a free bonus track the removal of an unused JobRegistry method.

PR meta checklist

  • Pull request is targeted at main branch for code
  • Pull request is linked to all related issues, if any.

Code PR specific checklist

  • My code follows the code style of this project and AspNetCore coding guidelines.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have updated the appropriate sub section in the CHANGELOG.md.
  • I have added, updated or removed tests to according to my changes.
    • All tests passed.

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/NCronJob/Registry/IInstantJobRegistry.cs 90.56% <100.00%> (-0.18%) ⬇️
src/NCronJob/Registry/JobRegistry.cs 91.20% <ø> (+0.88%) ⬆️

@nulltoken nulltoken requested a review from linkdotnet November 4, 2024 17:09
@nulltoken nulltoken force-pushed the ntk/instantregistry_does_not_persist branch from ca5a975 to c265714 Compare November 4, 2024 17:10
@nulltoken nulltoken force-pushed the ntk/instantregistry_does_not_persist branch from c265714 to 9f3c578 Compare November 4, 2024 17:36
@nulltoken nulltoken force-pushed the ntk/instantregistry_does_not_persist branch from 9f3c578 to 261de0f Compare November 4, 2024 17:42
@nulltoken
Copy link
Collaborator Author

@linkdotnet Changelog has been updated

@linkdotnet
Copy link
Member

Awesome - feel free to merge.

@nulltoken nulltoken merged commit 9bbb452 into main Nov 4, 2024
4 checks passed
@nulltoken nulltoken deleted the ntk/instantregistry_does_not_persist branch November 4, 2024 18:14
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