-
Notifications
You must be signed in to change notification settings - Fork 307
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-33710 Add k8s engine Sasha access support #19649
base: candidate-9.8.x
Are you sure you want to change the base?
HPCC-33710 Add k8s engine Sasha access support #19649
Conversation
bb02c5e
to
7ab193a
Compare
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.
Pull Request Overview
This PR adds engine Sasha access support by introducing a new label "accessSasha" into the Helm templates used for Thor and EclAgent deployments.
- Added a static "accessSasha: "yes"" label in metadata sections in both thor.yaml and eclagent.yaml.
- Introduced conditional logic for "accessSasha" in spec sections based on child process settings in thor.yaml and eclagent.yaml.
Reviewed Changes
Copilot reviewed 2 out of 7 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
helm/hpcc/templates/thor.yaml | Added "accessSasha" label in metadata and dynamic label in spec to control access based on child process configuration |
helm/hpcc/templates/eclagent.yaml | Added "accessSasha" label in metadata and dynamic label in spec for conditional access |
Files not reviewed (5)
- common/thorhelper/enginecontext.hpp: Language not supported
- ecl/eclagent/eclagent.ipp: Language not supported
- plugins/workunitservices/workunitservices.cpp: Language not supported
- roxie/ccd/ccdcontext.cpp: Language not supported
- thorlcr/graph/thgraphslave.cpp: Language not supported
Comments suppressed due to low confidence (1)
helm/hpcc/templates/thor.yaml:221
- This static assignment of 'accessSasha: "yes"' in another metadata block may lead to inconsistencies with the dynamic label set later. Align this with the conditional logic used in the spec if applicable.
accessSasha: "yes"
@@ -87,6 +87,7 @@ data: | |||
metadata: | |||
labels: | |||
accessDali: "yes" | |||
accessSasha: "yes" |
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.
The static assignment of 'accessSasha: "yes"' in the metadata block is inconsistent with the dynamic conditional assignment used in the spec. Consider using a similar conditional expression to ensure consistent behavior.
accessSasha: "yes" | |
accessSasha: {{ if .Values.accessSasha }} "yes" {{ else }} "no" {{ end }} |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -61,6 +61,7 @@ data: | |||
labels: | |||
{{- include "hpcc.addStandardLabels" (dict "root" $ "component" $apptype "name" "eclagent" "instance" $appJobName "instanceOf" (printf "%s-job" .me.name)) | indent 12 }} | |||
accessDali: "yes" | |||
accessSasha: "yes" |
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.
The static 'accessSasha: "yes"' label in the metadata section contrasts with the dynamic assignment later in the file. Consider using a consistent approach (static or conditional) throughout to avoid configuration mismatches.
accessSasha: "yes" | |
accessSasha: {{ .me.accessSasha | default "yes" | quote }} |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33710 Jirabot Action Result: |
Signed-off-by: Jake Smith <[email protected]>
7ab193a
to
edd85d5
Compare
@@ -43,6 +43,7 @@ interface IEngineContext | |||
virtual StringBuffer &getQueryId(StringBuffer &result, bool isShared) const = 0; | |||
virtual void onTermination(QueryTermCallback callback, const char *key, bool isShared) const = 0; | |||
virtual void getManifestFiles(const char *type, StringArray &files) const = 0; | |||
virtual bool allowSashaAccess() const = 0; |
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 - any concerns re. adding this to IEngineContext, and/or does it need to be and end like this?
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 think there are no problems modifying this interface.
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.
A question and minor comment
@@ -43,6 +43,7 @@ interface IEngineContext | |||
virtual StringBuffer &getQueryId(StringBuffer &result, bool isShared) const = 0; | |||
virtual void onTermination(QueryTermCallback callback, const char *key, bool isShared) const = 0; | |||
virtual void getManifestFiles(const char *type, StringArray &files) const = 0; | |||
virtual bool allowSashaAccess() const = 0; |
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 think there are no problems modifying this interface.
@@ -94,8 +94,8 @@ | |||
hpcc:tooltip="Verify that a read file's CRC matches the published meta data CRC"/> | |||
<xs:attribute name="crcWriteEnabled" type="xs:boolean" hpcc:displayName="CRC Write Enabled" hpcc:presetValue="true" | |||
hpcc:tooltip="Calculate and publish a CRC per published disk output file"/> | |||
<xs:attribute name="slaveDaliClient" type="xs:boolean" hpcc:displayName="Slave Dali Client" hpcc:presetValue="false" | |||
hpcc:tooltip="Set to true if thor slaves require dali connectivity"/> | |||
<xs:attribute name="allowDaliAccess" type="xs:boolean" hpcc:displayName="Worker Dali Client" hpcc:presetValue="false" |
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.
Should there be similar entries for the new sasha options?
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.
it's "documentation" only, all Debug options will be copied regardless by thor.xsl. But guess should add (even though don't want to encourage).
thorlcr/slave/slavmain.cpp
Outdated
if (!getExpertOptBool("slaveDaliClient") && workUnitInfo->getPropBool("Debug/slavedaliclient", false)) | ||
// slaveDaliClient option deprecated, but maintained for compatibility | ||
if ((!getExpertOptBool("allowDaliAccess") && workUnitInfo->getPropBool("Debug/allowdaliaccess", false)) || | ||
(!getExpertOptBool("slaveDaliClient") && workUnitInfo->getPropBool("Debug/slavedaliclient", false))) |
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 doubt it will cause a problem in practice, but this condition isn't quite right. It should be
if ((!getExpertOptBool("allowDaliAccess") && !getExpertOptBool("slaveDaliClient") &&
(workUnitInfo->getPropBool("Debug/allowdaliaccess", false)) || (workUnitInfo->getPropBool("Debug/slavedaliclient", false)))
similar for the other tests.
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.
needs to be this actually I think (brackets enclosing the || terms):
if (!getExpertOptBool("allowDaliAccess") && !getExpertOptBool("slaveDaliClient") &&
(workUnitInfo->getPropBool("Debug/allowdaliaccess", false) || workUnitInfo->getPropBool("Debug/slavedaliclient", false)))
Signed-off-by: Jake Smith <[email protected]>
Signed-off-by: Jake Smith <[email protected]>
71875f1
to
090e053
Compare
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.
Please squash
Type of change:
Checklist:
Smoketest:
Testing: