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

Move submission creation from local CI subsystem to local VC subsystem #6700

Open
frederik-kt opened this issue Jun 13, 2023 · 0 comments
Open
Labels

Comments

@frederik-kt
Copy link
Contributor

frederik-kt commented Jun 13, 2023

Is your feature request related to a problem?

Currently, the local VC subsystem calls the processNewPush() method of the LocalCIConnectorService to process a new submission and trigger a new build. However, the processing of the submission belongs to the version control domain. For the external VC systems, after registering the push, the external VC calls the ProgrammingSubmissionResource independent from the external CI system.

Describe the solution you'd like

The logic for processing a new Submission should be moved into the local VC subsystem. You can use the processNewPush() method in the LocalVCServletService for this. This method is called from the LocalVCPostPushHook and thus runs after the user was authenticated and authorized and after the pushed files were written to disk. Make sure to process the submission before triggering the build. If processnewProgrammingSubmission() throws a VersionControlException, it means that the commit does not belong to the default branch of the participation and you should not trigger a build in that case.
This might potentially allow you to remove the LocalCIConnectorService entirely and call triggerBuild() in the LocalCITriggerService directly from the LocalVCServletService. For this, you would have to move all the remaining logic in the LocalCIConnectorService (triggering template and solution repository for a push to the test repository) into the LocalCITriggerService. This could lead to circular depency issues however, so this might be big enough for a follow-up.

Note: When movine the submission creation out of the local CI subsystem, you need to find a good way to make sure submissions are still created when submitting via the online editor (currently the processNewPush() method is called from RepositoryResource#commitChanges() to ensure this.

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant