-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-29768 Protect updates with a dali lock when fetching a git repo #18574
Conversation
@jakesmith for initial review. See the jira for details of the change. I will add some more changes in a different PR to i) pre-cache the repo and ii) delete old lock files. |
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-29768 Jirabot Action Result: |
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.
@ghalliday - looks good afaics, a few trivial comments.
helm/hpcc/values.schema.json
Outdated
@@ -1421,6 +1421,10 @@ | |||
"type": "string", | |||
"description": "The default repo version used if not supplied for the defaultRepo" | |||
}, | |||
"guardGitUpdates": { | |||
"type": "boolean", | |||
"description": "If enabled all updates of the git repositories is protected by holding a lock in dali" |
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.
trivial: .. 'are' protected?
helm/hpcc/templates/eclccserver.yaml
Outdated
@@ -27,6 +27,7 @@ Pass in dict with root and me | |||
*/}} | |||
{{- define "hpcc.eclccServerConfigMap" -}} | |||
{{- $compileJobName := printf "compile-job-_HPCC_JOBNAME_" }} | |||
{{- $gitPlane := .me.gitPlane | default (include "hpcc.getDefaultGitPlane" .root) -}} |
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.
trivial: I notice the pre-existing line above didn't/doesn't have a whitespace chomping char , but this new line ahead of the content does.. Don't think it's problematic, perhaps make both lines same.
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.
I will change to match
ecl/eclcc/eclcc.hpp
Outdated
@@ -96,6 +96,7 @@ const char * const helpText[] = { | |||
"?! --fastsyntax Delay expanding functions when parsing. May speed up processing for some queries", | |||
"? --fetchrepos Automatically download missing repositories associated with dependencies", | |||
"! --gituser=x Which user should be used for accessing git repositories (for servers)", | |||
"! --gitlock=key The dali key (e.g. plane name) that should be used to project updates to git repositories", |
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.
typo: project -> protect.
} | ||
|
||
if (!gitLockKey.isEmpty()) | ||
guardGitUpdates = true; |
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.
trivial: any point to non-empty gitLockKey and a boolean? i.e. could just test if (!gitLockKey.isEmpty()) below:
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.
Could do, but it is arguably slightly easier to read the code below. I'm not sure it is worth changing.
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.
@ghalliday - looks good, ready to squash.
Signed-off-by: Gavin Halliday <[email protected]>
Type of change:
Checklist:
Smoketest:
Testing: