Skip to content

Commit

Permalink
fix: avoid setting limit unless set in values (#194)
Browse files Browse the repository at this point in the history
The default value for --limit configured in our typer.Option is
None; however, users cannot explicitly set the value to None:
tiangolo/typer#530

Closes: #192
  • Loading branch information
jawnsy committed Jul 3, 2023
1 parent 5a55a14 commit d421c7d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/prefect-agent/README.md
Expand Up @@ -38,7 +38,7 @@ Prefect Agent application bundle
| agent.cloudApiConfig.workspaceId | string | `""` | prefect workspace ID |
| agent.clusterUid | string | `""` | unique cluster identifier, if none is provided this value will be infered at time of helm install |
| agent.config.http2 | bool | `true` | connect using HTTP/2 if the server supports it (experimental) |
| agent.config.limit | string | `"None"` | Maximum number of flow runs to start simultaneously (default: unlimited) |
| agent.config.limit | string | `nil` | Maximum number of flow runs to start simultaneously (default: unlimited) |
| agent.config.prefetchSeconds | int | `10` | when querying for runs, how many seconds in the future can they be scheduled |
| agent.config.queryInterval | int | `5` | how often the agent will query for runs |
| agent.config.workPool | string | `""` | name of prefect workpool the agent will poll; if workpool or workqueues is not provided, we use the default queue |
Expand Down
2 changes: 2 additions & 0 deletions charts/prefect-agent/templates/deployment.yaml
Expand Up @@ -77,8 +77,10 @@ spec:
- --work-queue
- "default"
{{- end }}
{{- if .Values.agent.config.limit }}
- --limit
- {{ .Values.agent.config.limit | quote }}
{{- end }}
workingDir: /home/prefect
env:
- name: HOME
Expand Down
2 changes: 1 addition & 1 deletion charts/prefect-agent/values.yaml
Expand Up @@ -50,7 +50,7 @@ agent:
# -- connect using HTTP/2 if the server supports it (experimental)
http2: true
# -- Maximum number of flow runs to start simultaneously (default: unlimited)
limit: None
limit: null

## connection settings
# -- one of 'cloud' or 'server'
Expand Down
2 changes: 1 addition & 1 deletion charts/prefect-worker/README.md
Expand Up @@ -51,7 +51,7 @@ Prefect Worker application bundle
| worker.cloudApiConfig.workspaceId | string | `""` | prefect workspace ID |
| worker.clusterUid | string | `""` | unique cluster identifier, if none is provided this value will be infered at time of helm install |
| worker.config.http2 | bool | `true` | connect using HTTP/2 if the server supports it (experimental) |
| worker.config.limit | string | `"None"` | Maximum number of flow runs to start simultaneously (default: unlimited) |
| worker.config.limit | string | `nil` | Maximum number of flow runs to start simultaneously (default: unlimited) |
| worker.config.prefetchSeconds | int | `10` | when querying for runs, how many seconds in the future can they be scheduled |
| worker.config.queryInterval | int | `5` | how often the worker will query for runs |
| worker.config.workPool | string | `""` | name of prefect work pool the worker will poll |
Expand Down
2 changes: 2 additions & 0 deletions charts/prefect-worker/templates/deployment.yaml
Expand Up @@ -68,8 +68,10 @@ spec:
- kubernetes
- --pool
- {{ .Values.worker.config.workPool | quote }}
{{- if .Values.worker.config.limit }}
- --limit
- {{ .Values.worker.config.limit | quote }}
{{- end }}
{{- if .Values.worker.livenessProbe.enabled }}
- --with-healthcheck
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/prefect-worker/values.yaml
Expand Up @@ -46,7 +46,7 @@ worker:
# -- connect using HTTP/2 if the server supports it (experimental)
http2: true
# -- Maximum number of flow runs to start simultaneously (default: unlimited)
limit: None
limit: null

## connection settings
# -- one of 'cloud' or 'server'
Expand Down

0 comments on commit d421c7d

Please sign in to comment.