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-24967 Add chart annotations based on chksum of configmap #14422

Conversation

jakesmith
Copy link
Member

@jakesmith jakesmith commented Dec 17, 2020

This will force the pods to recycle, if a config property
relevant to a deployment changes.

Signed-off-by: Jake Smith jake.smith@lexisnexisrisk.com

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:

@hpcc-jirabot
Copy link

@jakesmith jakesmith force-pushed the hpcc-24967-configmap-annotate-chksum branch from 94a73fe to aeefce0 Compare December 17, 2020 18:03
@jakesmith jakesmith marked this pull request as ready for review December 17, 2020 18:04
@jakesmith
Copy link
Member Author

@richardkchapman - if you could give this an initial review/feedback. Thanks.

@jakesmith jakesmith force-pushed the hpcc-24967-configmap-annotate-chksum branch 2 times, most recently from dec803e to 01f6e9d Compare December 18, 2020 01:33
@@ -406,6 +406,12 @@ Check that the storage and spill planes for a component exist
{{- end }}
{{- end -}}

{{/*
Copy link
Member

Choose a reason for hiding this comment

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

This seems (a) a bit small to be worth having a template for and (b) to be unused

Copy link
Member Author

Choose a reason for hiding this comment

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

agree, will remove.

@jakesmith jakesmith force-pushed the hpcc-24967-configmap-annotate-chksum branch from 01f6e9d to ecf5567 Compare January 4, 2021 17:19
@jakesmith
Copy link
Member Author

@richardkchapman - have squashed in the above change.

{{ range $.Values.esp -}}
{{- if not .disabled -}}
{{- $configSHA := include "hpcc.espConfigMap" (dict "root" $ "me" .) | sha256sum }}
Copy link
Member

Choose a reason for hiding this comment

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

I wonder whether a $scope "= dict "root" $ "me" . at the top of some of these would be helpful, as it's passed to a LOT of templates

{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .me) | indent 6 }}
{{ $apptype }}:
{{ toYaml (omit .me "logging") | indent 6 }}
{{- include "hpcc.generateLoggingConfig" (dict "root" .root "me" .me) | indent 6 }}
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this dict just "." ?

@jakesmith jakesmith force-pushed the hpcc-24967-configmap-annotate-chksum branch from c13c1fe to d866698 Compare January 7, 2021 12:45
@jakesmith jakesmith changed the base branch from candidate-7.12.x to master January 7, 2021 12:45
@jakesmith
Copy link
Member Author

@richardkchapman - have made changes to common up usages of root+me dict, and rebased/retargeted to master

richardkchapman
richardkchapman previously approved these changes Jan 7, 2021
Copy link
Member

@richardkchapman richardkchapman left a comment

Choose a reason for hiding this comment

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

Looks good - please squash

This will force the pods to recycle, if a config property
relevant to a deployment changes.

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
@HPCCSmoketest
Copy link
Contributor

Process of PR-14422, label: hpcc-24967-configmap-annotate-chksum is skipped.
The reason is: It is related to containerised environment only.
Commit ID: b673a0c
OS: centos 7.7.1908 (Linux 3.10.0-327.10.1.el7.x86_64)
GCC: gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Host: hpcc-platform-dev-el7-smoketest-2

@jakesmith
Copy link
Member Author

@richardkchapman - squashed.

Copy link
Member

@richardkchapman richardkchapman left a comment

Choose a reason for hiding this comment

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

Approved

@richardkchapman richardkchapman merged commit d290ada into hpcc-systems:master Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants