-
Notifications
You must be signed in to change notification settings - Fork 633
[MISC] Decommission prompt-service, old tools, SDK1 prompt module #1978
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
180297b
2e1bc54
7bdff5a
4774926
fd6e3e7
c3c729d
de78b7a
c1a42aa
a7a035a
0619756
093a6b4
13cfe5b
db834ba
55f873a
0b5508b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,12 +10,9 @@ on: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| service_name: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: "Tool to build" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: "tool-structure" # Provide a default value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| default: "tool-sidecar" # Provide a default value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: choice | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| options: # Define available options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - tool-classifier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - tool-structure | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - tool-text-extractor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - tool-sidecar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| add_latest_tag: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: "Also tag as 'latest'" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -58,16 +55,7 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Set build configuration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id: build-config | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "${{ github.event.inputs.service_name }}" == "tool-classifier" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "context=." >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "dockerfile=./tools/classifier/Dockerfile" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [ "${{ github.event.inputs.service_name }}" == "tool-structure" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "context=." >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "dockerfile=./tools/structure/Dockerfile" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [ "${{ github.event.inputs.service_name }}" == "tool-text-extractor" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "context=." >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "dockerfile=./tools/text_extractor/Dockerfile" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| elif [ "${{ github.event.inputs.service_name }}" == "tool-sidecar" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ "${{ github.event.inputs.service_name }}" == "tool-sidecar" ]; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "context=." >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "dockerfile=docker/dockerfiles/tool-sidecar.Dockerfile" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+60
to
69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify this workflow no longer embeds GitHub expression templates directly in shell conditionals.
rg -n -C2 '\$\{\{\s*github\.event\.inputs\.service_name\s*\}\}' .github/workflows/docker-tools-build-push.yaml
# Expected after fix: only appears in YAML fields (e.g., run-name/tags), not inside shell branching logic.Repository: Zipstack/unstract Length of output: 1382 🏁 Script executed: rg -n -C2 '\$\{\{\s*github\.event\.inputs\.service_name\s*\}\}' .github/workflows/docker-tools-build-push.yaml
# Expected: no occurrences inside the bash branching logic; `${{ github.event.inputs.service_name }}` should be assigned to an env var or used in non-branching YAML fields.Repository: Zipstack/unstract Length of output: 1382 Harden In Suggested patch - name: Set build configuration
id: build-config
+ env:
+ SERVICE_NAME: ${{ github.event.inputs.service_name }}
run: |
- if [ "${{ github.event.inputs.service_name }}" == "tool-sidecar" ]; then
- echo "context=." >> $GITHUB_OUTPUT
- echo "dockerfile=docker/dockerfiles/tool-sidecar.Dockerfile" >> $GITHUB_OUTPUT
- elif [ "${{ github.event.inputs.service_name }}" == "tool-text-extractor" ]; then
- echo "context=." >> $GITHUB_OUTPUT
- echo "dockerfile=./tools/text_extractor/Dockerfile" >> $GITHUB_OUTPUT
- fi
+ case "$SERVICE_NAME" in
+ tool-sidecar)
+ echo "context=." >> "$GITHUB_OUTPUT"
+ echo "dockerfile=docker/dockerfiles/tool-sidecar.Dockerfile" >> "$GITHUB_OUTPUT"
+ ;;
+ tool-text-extractor)
+ echo "context=." >> "$GITHUB_OUTPUT"
+ echo "dockerfile=./tools/text_extractor/Dockerfile" >> "$GITHUB_OUTPUT"
+ ;;
+ *)
+ echo "Unsupported service_name: $SERVICE_NAME" >&2
+ exit 1
+ ;;
+ esac📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.25.2)[error] 59-59: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) [error] 62-62: code injection via template expansion (template-injection): may expand into attacker-controllable code (template-injection) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,7 +101,6 @@ jobs: | |
| backend, | ||
| frontend, | ||
| platform-service, | ||
| prompt-service, | ||
| runner, | ||
| worker-unified, | ||
| x2text-service, | ||
|
|
@@ -225,7 +224,7 @@ jobs: | |
| id: summary | ||
| run: | | ||
| # Initialize variables | ||
| TOTAL_SERVICES=7 | ||
| TOTAL_SERVICES=6 | ||
| OVERALL_RESULT='${{ needs.build-and-push.result }}' | ||
| SUCCESS_COUNT=0 | ||
| FAILED_COUNT=0 | ||
|
|
@@ -316,7 +315,7 @@ jobs: | |
| echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| # Define services in order | ||
| for service in backend frontend platform-service prompt-service runner worker-unified x2text-service; do | ||
| for service in backend frontend platform-service runner worker-unified x2text-service; do | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are removing the tools, we should remove the runner as well |
||
| if [ -f "build-status/${service}.json" ]; then | ||
| STATUS=$(jq -r '.status' "build-status/${service}.json") | ||
| if [ "$STATUS" = "success" ]; then | ||
|
|
||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.