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

add new internal worker + worker/temporal validations #129

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

avimoondra
Copy link
Contributor

@avimoondra avimoondra commented Oct 23, 2023

workflows worker on based on version, internal worker off. ✅

$ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="5.6.10" --set internalWorker.enabled=false | grep "worker"
# Source: retool/templates/deployment_workflows_worker.yaml
  name: foo-retool-workflow-worker
    retoolService: foo-retool-workflow-worker
# Source: retool/templates/deployment_workflows_worker.yaml
  name: foo-retool-workflow-worker
    retoolService: foo-retool-workflow-worker
      retoolService: foo-retool-workflow-worker
        prometheus.io/job: foo-retool-workflow-worker
        retoolService: foo-retool-workflow-worker

workflows worker on version, internalWorker on ✅

$ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="5.6.10" --set internalWorker.enabled=true | grep "worker"
# Source: retool/templates/deployment_internal_worker.yaml
  name: foo-retool-internal-worker
    retoolService: foo-retool-internal-worker
# Source: retool/templates/deployment_workflows_worker.yaml
  name: foo-retool-workflow-worker
    retoolService: foo-retool-workflow-worker
# Source: retool/templates/deployment_internal_worker.yaml
  name: foo-retool-internal-worker
    retoolService: foo-retool-internal-worker
      retoolService: foo-retool-internal-worker
        prometheus.io/job: foo-retool-internal-worker
        retoolService: foo-retool-internal-worker
# Source: retool/templates/deployment_workflows_worker.yaml
  name: foo-retool-workflow-worker
    retoolService: foo-retool-workflow-worker
      retoolService: foo-retool-workflow-worker
        prometheus.io/job: foo-retool-workflow-worker
        retoolService: foo-retool-workflow-worker

workflows worker off based on version, internalWorker on -- validation error! ❌

➜  $ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="2.6.10" --set internalWorker.enabled=true | grep "worker"
Error: execution error at (retool/templates/NOTES.txt:34:4):
VALUES VALIDATION:
internalWorker:
  Internal worker is enabled (via internalWorker.enabled), but Temporal is not enabled via retool-temporal-services-helm.enabled or workflows.temporal.enabled or via Retool's Managed Temporal for Retool Workflows (via workflows.enabled explicitly, or workflows.enabled implicitly based on image.tag > 3.6.11)

Use --debug flag to render out invalid YAML

workflows worker off based on version, internalWorker on + temporal configured ✅

➜  $ helm template -f ~/retool-helm/charts/retool/values.yaml foo ~/retool-helm/charts/retool --set config.encryptionKey="foo" --set image.tag="2.6.10" --set internalWorker.enabled=true --set workflows.temporal.enabled=true | grep "worker"
# Source: retool/templates/deployment_internal_worker.yaml
  name: foo-retool-internal-worker
    retoolService: foo-retool-internal-worker
# Source: retool/templates/deployment_internal_worker.yaml
  name: foo-retool-internal-worker
    retoolService: foo-retool-internal-worker
      retoolService: foo-retool-internal-worker
        prometheus.io/job: foo-retool-internal-worker
        retoolService: foo-retool-internal-worker

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mostly same as

But based on https://github.com/tryretool/retool_development/pull/35620

updating env vars

          - name: SERVICE_TYPE
            value: INTERNAL_TEMPORAL_WORKER

and ports open on 3015 for health checks. https://github.com/tryretool/retool-helm/blob/main/charts/retool/templates/deployment_workflows_worker.yaml

@avimoondra avimoondra force-pushed the avimoondra/new-internal-worker branch from 3e1daf4 to e4d1452 Compare October 23, 2023 21:34
@avimoondra avimoondra marked this pull request as ready for review October 23, 2023 21:43
{{- if not (or (not (.Values.internalWorker.enabled)) (and (.Values.internalWorker.enabled) (or (include "retool.temporal.enabled" .) (include "retool.workflows.enabled" .)))) -}}
internalWorker:
Internal worker is enabled (via internalWorker.enabled), but Temporal is not enabled via retool-temporal-services-helm.enabled or workflows.temporal.enabled or via Retool's Managed Temporal for Retool Workflows (via workflows.enabled explicitly, or workflows.enabled implicitly based on image.tag > 3.6.11)
{{- end -}}
Copy link
Contributor Author

@avimoondra avimoondra Oct 23, 2023

Choose a reason for hiding this comment

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

if internalWorker is NOT enabled - validation ✅

if internalWork is enabled AND (some temporal is enabled OR workflows is enabled, with potential of using retool-managed temporal configured in-app) - validation ✅

charts/retool/values.yaml Outdated Show resolved Hide resolved
@Ayoakala
Copy link

will take this on

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.

3 participants