-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Dynamic repo registration #351
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this important update! Now it's extremely easy for anyone in ls1intum to install our Github App and start using Helios!
We did a testings session with @egekocabas and tried locally installing/removing our dummy Github App into our dummy repo. It works like a charm 🚀
Besides some minor issues we've talked, code also looks fantastic. Let's address them.
Also it would be great if we can add some documentation to guide repository owners to setup their repo in Helios. Here is a discussion for that.
Please also do not forget to mention how they should setup their deployment workflow!
Thanks for the efforts!
...cation-server/src/main/java/de/tum/cit/aet/helios/branch/github/GitHubBranchSyncService.java
Show resolved
Hide resolved
...de/tum/cit/aet/helios/deploymentprotection/GitHubDeploymentProtectionRuleMessageHandler.java
Outdated
Show resolved
Hide resolved
...lication-server/src/main/java/de/tum/cit/aet/helios/github/sync/GitHubDataSyncScheduler.java
Outdated
Show resolved
Hide resolved
...n-server/src/main/java/de/tum/cit/aet/helios/gitrepo/github/GitHubRepositorySyncService.java
Outdated
Show resolved
Hide resolved
server/application-server/src/main/java/de/tum/cit/aet/helios/nats/NatsConsumerService.java
Show resolved
Hide resolved
server/application-server/src/main/java/de/tum/cit/aet/helios/nats/NatsConsumerService.java
Outdated
Show resolved
Hide resolved
...pplication-server/src/main/java/de/tum/cit/aet/helios/user/github/GitHubUserSyncService.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job! Thanks for addressing al the points we've discussed 🚀
Warning
❗ ❗ ❗ This PR contains a migration script ❗ ❗ ❗
Motivation
Enable dynamic repository syncing by accurately tracking which repositories have the GitHub App installed. This ensures our system reflects real-time changes when repositories are added or removed.
Description
GitHubCustomMessageHandler
to deserialize events and delegate processing to extenders, following theorg.kohsuke:github-api
library implementation that we have.isGlobalEvent()
in bothGitHubCustomMessageHandler
andGitHubMessageHandler
to differentiate global events (likeinstallation_repositories
) from repository-specific ones.NatsConsumerService.getSubjects
to correctly subscribe to global events using the patterngithub.?.?.installation_repositories
.GitHubFacade
to fetch the list of repositories where the GitHub App is installed.repositoryNameWithOwner
andstatus
columns toDataSyncStatus
to maintain dedicated sync records.DataSyncStatus
since the repository record isn’t available during the initial sync. Also it is not that important forDataSyncStatus
.@Async
since it was causing so much errors related withUser
table. Further refactoring and making 'data syncing' async can be achieved if we addrepository_id
column toUser
table.process
methods to a new class calledGitHubDataSyncOrchestrator
. This change was necessary since we used to call these individualprocess
methods inside it's own bean (SyncService
) but this was causing self-invocation for the@Transactional
annotation.GitHubInstallationRepositoriesMessageHandler