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

Update cron job #238

Merged
merged 193 commits into from
Oct 16, 2023
Merged

Update cron job #238

merged 193 commits into from
Oct 16, 2023

Conversation

candleindark
Copy link
Collaborator

@candleindark candleindark commented Sep 5, 2023

This PR is intended to provide the implementation of a periodic updater that fulfills that intended goal for a periodic updater described in issue #112, and it closes both #112 and #134.

In support of the main goal, this PR also modifies existing Celery tasks, process_dataset_url and extract_ds_meta, so that they appropriately lock the RepoUrl record they modify to avoid potential race conditions and handle situations in which the given dataset URL id argument no longer identifies a RepoUrl record in the database because of deletion before the execution of the tasks.

TODOs

  • add some tests to ensure at least identifying which repos are to be updated; unittest on actual update function

The `branches` fields is not JSONB type
and conversion to `str` is no longer needed
This have type hint support in IDEs
Podman-compose currently doesn't support healthcheck tests
specified as a list
To avoid issuing `chk_url` tasks that end up waiting
Using `repo_url_outdated_by_new_default_branch` fixture
Test the case that the clone of the dataset
in the local cache is up-to-date
To returns values of `repo_url_outdated_by_new_file`
and `repo_url_off_sync_by_new_default_branch`
Against the case that the default branch at the remote
has changed
Against the case that there is an update made available
in the remote
@candleindark candleindark marked this pull request as ready for review October 6, 2023 05:10
@candleindark
Copy link
Collaborator Author

FYI: A running instance of this version of Datalad-registry is available on Typhon

@yarikoptic yarikoptic merged commit 436f126 into datalad:master Oct 16, 2023
5 of 6 checks passed
@candleindark candleindark deleted the update branch October 17, 2023 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants