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

Support remote sync policy #146

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Support remote sync policy #146

wants to merge 3 commits into from

Conversation

bhou-crto
Copy link
Contributor

This feature allows developer to control the frequency of syncing with the remote repository

As a first step, developer needs to modify the configuration file manually to setup up the sync policy of the extra remote registry.
Ex.

{
            "name": "test",
            "remote_base_url": "https://url-to/test-registry",
            "repository_dir": "/Users/b.hou/.cdt/test",
            "sync_policy": "weekly"
}

By default, the sync_policy is set to 'always'. The possible values are:

  • always
  • never
  • hourly
  • daily
  • weekly
  • monthly

Updater will take the sync_policy into consideration before executing the update.

Note

the built-in update command cl update --package ignores the sync_policy, which "always" performs the update


Caveats and Follow-up

Follow up improves

  • check the sync_policy in the "preRun" phase, to improve the performance when there are too many remote registry.
  • extract the constants of the sync_policy and use it in different modules
  • provide command interface in the built-in remote command to change the sync policy

This PR closes #106

@bhou-crto bhou-crto assigned zeralight and unassigned zeralight Jan 2, 2025
@bhou-crto bhou-crto requested a review from zeralight January 2, 2025 14:50
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.

Support different sync policy for extra remotes
2 participants