generated from AMRC-FactoryPlus/acs-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Pull schemas from external Git repo #572
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
Merged
Merged
Conversation
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
f36fc5c to
f765ed7
Compare
This is pulled in by service-api and we don't want a version conflict.
I want to implement notify/v2 for the git server and that requires synchronising with the API.
The path-matching syntax has changed. It's no longer possible to match all the tail of the URL.
890ee60 to
ad1ba81
Compare
These are equivalent to the native git-hooks mechanism but configurable through the ConfigDB. For now at least hooks must be implemented within the git server.
This gives a force-rerun strategy: remove and recreate the hook.
Update our config schema.
Immutable comparisons were failing because we were getting plain JS objects included instead of immutable Records.
Hooks should not need to perform this step themselves.
We need this to set the schema source, but it isn't entirely reliable. An auto-pull branch can still be pushed to, and in that case the information will not have come from the remote. But I am assuming that in such a case an admin has done this for a good reason.
Unlike the load-schemas image we don't chdir to the schemas directory. This would affect the whole process.
I think previously we were not matching the full name, but a partial match will cause problems. We are now matching only aganst the schema path itself.
ad1ba81 to
dd7f83d
Compare
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 implements pulling schema definitions from an external Git repo. It does this by adding a branch hooks facility to the Git server, meaning the schema loading logic must be implemented inside that service.
The alternative would be to make this a separate service, tracking the repos using change-notify. Such a service would have to track its own state in the ConfigDB and seems a bit overkill for this use case.