-
Notifications
You must be signed in to change notification settings - Fork 166
feat: implement REST API for program-model component #142
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
Open
evandowning
wants to merge
7
commits into
main
Choose a base branch
from
claude/issue-116-20250708_133034
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
783d64b
feat: implement REST API for program-model component
claude[bot] 7929b29
just reformat
evandowning e06c444
Update patcher unit tests
evandowning b1abd33
Update deployment
evandowning 79ee8b5
Update challenge.sh with new urls
evandowning bf9d27a
Update unit tests
evandowning 8d14be1
Add harness REST API for seed-gen
evandowning File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
deployment/k8s/charts/program-model/templates/api-deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| {{- if .Values.api.enabled }} | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ .Release.Name }}-program-model-api | ||
| labels: | ||
| app: program-model-api | ||
| spec: | ||
| selector: | ||
| matchLabels: | ||
| app: program-model-api | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: program-model-api | ||
| spec: | ||
| {{- include "buttercup.imagePullSecrets" . | nindent 6 }} | ||
| enableServiceLinks: false | ||
| initContainers: | ||
| {{- include "buttercup.waitForRedis" . | nindent 6 }} | ||
| {{- include "buttercup.waitForDocker" . | nindent 6 }} | ||
| containers: | ||
| - name: program-model-api | ||
| image: "{{ .Values.global.programModelImage.repository }}:{{ .Values.global.programModelImage.tag }}" | ||
| imagePullPolicy: {{ .Values.global.programModelImage.pullPolicy }} | ||
| command: ["buttercup-program-model-api", "--host", "0.0.0.0", "--port", "8000"] | ||
| ports: | ||
| - containerPort: 8123 | ||
| targetPort: 8000 | ||
| name: http | ||
| resources: | ||
| {{- toYaml .Values.api.resources | nindent 10 }} | ||
| env: | ||
| {{- include "buttercup.commonEnv" . | nindent 8 }} | ||
| {{- include "buttercup.programModelEnv" . | nindent 8 }} | ||
| {{- include "buttercup.env.dockerSocket" . | nindent 8 }} | ||
| volumeMounts: | ||
| {{- include "buttercup.standardVolumeMounts" (dict "usesTasksStorage" true) | nindent 8 }} | ||
| {{- include "buttercup.nodeLocalVolumeMount" . | nindent 8 }} | ||
| {{- include "buttercup.dockerSocketVolumeMount" . | nindent 8 }} | ||
| volumes: | ||
| {{- include "buttercup.volumes.scratch" . | nindent 6 }} | ||
| {{- include "buttercup.volumes.tasks" . | nindent 6 }} | ||
| {{- include "buttercup.dockerSocketVolume" . | nindent 6 }} | ||
| {{- include "buttercup.nodeLocalVolume" . | nindent 6 }} | ||
| {{- end }} | ||
20 changes: 20 additions & 0 deletions
20
deployment/k8s/charts/program-model/templates/service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ .Release.Name }}-program-model-api | ||
| labels: | ||
| app: program-model-api | ||
| {{- with .Values.service.annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| # Set type based on environment | ||
| type: ClusterIP | ||
| ports: | ||
| - port: {{ .Values.service.port | default 8123 }} | ||
| targetPort: 8000 | ||
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| app: program-model-api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Might need to scale the API for a production deployment? The production deployment has 4 program model replicas and each replica has 1 API pod with 1 uvicorn worker. However the prod deployment has 20 seed-gen workers and 28 patchers. It seems like they could saturate the API workers