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

HPCC-33710 Add k8s engine Sasha access support #19649

Open
wants to merge 3 commits into
base: candidate-9.8.x
Choose a base branch
from

Conversation

jakesmith
Copy link
Member

@jakesmith jakesmith commented Mar 20, 2025

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Cloud-compatibility
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Smoketest:

  • Send notifications about my Pull Request position in Smoketest queue.
  • Test my draft Pull Request.

Testing:

@jakesmith jakesmith requested a review from Copilot March 20, 2025 12:18
@jakesmith jakesmith force-pushed the HPCC-33710-allowSashaAccess branch from bb02c5e to 7ab193a Compare March 20, 2025 12:19
@jakesmith jakesmith changed the title HPCC-33710 Add engine Sasha access support HPCC-33710 Add k8s engine Sasha access support Mar 20, 2025
Copy link

@Copilot Copilot AI left a 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"
Copy link
Preview

Copilot AI Mar 20, 2025

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.

Suggested change
accessSasha: "yes"
accessSasha: {{ if .Values.accessSasha }} "yes" {{ else }} "no" {{ end }}

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@@ -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"
Copy link
Preview

Copilot AI Mar 20, 2025

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.

Suggested change
accessSasha: "yes"
accessSasha: {{ .me.accessSasha | default "yes" | quote }}

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link

Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33710

Jirabot Action Result:
Assigning user: [email protected]
Workflow Transition To: Merge Pending
Updated PR

@jakesmith jakesmith force-pushed the HPCC-33710-allowSashaAccess branch from 7ab193a to edd85d5 Compare March 20, 2025 15:34
@jakesmith jakesmith requested a review from ghalliday March 20, 2025 15:35
@@ -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;
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member

@ghalliday ghalliday left a 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;
Copy link
Member

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"
Copy link
Member

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?

Copy link
Member Author

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).

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)))
Copy link
Member

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.

Copy link
Member Author

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)))

@jakesmith jakesmith force-pushed the HPCC-33710-allowSashaAccess branch from 71875f1 to 090e053 Compare March 21, 2025 17:23
@jakesmith jakesmith requested a review from ghalliday March 21, 2025 17:23
Copy link
Member

@ghalliday ghalliday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash

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

Successfully merging this pull request may close these issues.

2 participants