[#4670]Add bi-directional sync feature#4765
Open
Zahed-Riyaz wants to merge 25 commits intoCloud-CV:masterfrom
Open
[#4670]Add bi-directional sync feature#4765Zahed-Riyaz wants to merge 25 commits intoCloud-CV:masterfrom
Zahed-Riyaz wants to merge 25 commits intoCloud-CV:masterfrom
Conversation
Contributor
Author
|
Here is a video description of the feature : |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4765 +/- ##
==========================================
- Coverage 91.90% 90.09% -1.82%
==========================================
Files 85 88 +3
Lines 7142 7531 +389
==========================================
+ Hits 6564 6785 +221
- Misses 578 746 +168
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR in tackling issue #4760, enables syncing Challenge and Challenge Phase updates made via the EvalAI UI to the configured GitHub repository/branch. When a supported field changes in the UI, a corresponding commit is made to the repo to keep configuration in sync.
EvalAI-Starters side : Cloud-CV/EvalAI-Starters#129
How it works
apps/challenges/models.py:challenge_details_syncforChallengechallenge_phase_details_syncforChallengePhaseupdate_fieldsor infers it from the request payload keys to make a minimal, single-field commit.challenges.github_utilssync helpers to apply changes on GitHub.Safeguards
github_repository,github_branch, andgithub_tokento be set onChallenge.Configuration
Challenge:github_repository(e.g., org/repo)github_branch(defaults handled in code)github_token(PAT with repo access)Migrations
0113_add_github_branch_field_and_unique_constraint.pynow:github_branchif missing (SQL)github_repository,github_branch) when both are non-empty0116_challenge_github_branch.pyso there’s a single source of truth.Django signals
challenge_details_synconChallenge(post_save)challenge_phase_details_synconChallengePhase(post_save)github_repositoryandgithub_tokenare set.update_fieldsor inferred request payload keys.challenges.github_utils.GitHubSyncMiddleware
POST/PUT/PATCH, extracts JSON or form keys into a thread-local store.Dependencies
requirements/common.txtto support GitHub API calls used byapps/challenges/github_interface.pyand related utilities.