From de4e80bdb60669ddf0e2f87945d1453349384069 Mon Sep 17 00:00:00 2001 From: Luis Ibarra Date: Tue, 21 Apr 2026 21:42:22 -0500 Subject: [PATCH 1/2] chore: update GitHub Actions workflow for file processing - Upgraded actions/checkout from v4 to v6 for improved performance. - Modified curl command to use HTTP/1.1 for file upload to OpenAI. - Enhanced logging messages for better clarity during file ingestion and vector store processing. --- .github/workflows/generate-file-for-ai.yaml | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/generate-file-for-ai.yaml b/.github/workflows/generate-file-for-ai.yaml index c0e1fb1ffe..e92866e9cb 100644 --- a/.github/workflows/generate-file-for-ai.yaml +++ b/.github/workflows/generate-file-for-ai.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Merge markdown files run: | @@ -41,7 +41,7 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} run: | echo "Uploading file to OpenAI..." - upload_response=$(curl -sS -X POST \ + upload_response=$(curl -sS --http1.1 -X POST \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -F "purpose=assistants" \ -F "file=@appsmith-docs.md" \ @@ -89,26 +89,26 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} VECTOR_STORE_ID: ${{ secrets.OPENAI_VECTOR_STORE_ID }} run: | - echo "Waiting for vector store to finish processing..." + echo "Waiting for file $FILE_ID to finish processing in vector store..." for i in $(seq 1 60); do - vs_response=$(curl -sS \ + file_response=$(curl -sS \ -H "Authorization: Bearer $OPENAI_API_KEY" \ - "https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID") + "https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files/$FILE_ID") - vs_status=$(echo "$vs_response" | jq -r '.status') - echo "Attempt $i: status=$vs_status" + file_status=$(echo "$file_response" | jq -r '.status') + echo "Attempt $i: status=$file_status" - if [ "$vs_status" = "completed" ]; then - echo "Vector store processing complete" + if [ "$file_status" = "completed" ]; then + echo "File ingestion complete" exit 0 - elif [ "$vs_status" = "failed" ]; then - echo "ERROR: Vector store processing failed" - echo "$vs_response" + elif [ "$file_status" = "failed" ] || [ "$file_status" = "cancelled" ]; then + echo "ERROR: File ingestion $file_status" + echo "$file_response" exit 1 fi sleep 10 done - echo "ERROR: Timed out waiting for vector store processing" + echo "ERROR: Timed out waiting for file ingestion" exit 1 From 7fbf2b6eccf8bab208a62f33a700a0adaa5264b4 Mon Sep 17 00:00:00 2001 From: Luis Ibarra Date: Wed, 22 Apr 2026 09:34:48 -0500 Subject: [PATCH 2/2] chore: enforce HTTP/1.1 for curl commands in vector store workflow - Updated curl commands in the GitHub Actions workflow to explicitly use HTTP/1.1 for improved compatibility during file validation and attachment processes. - Ensured consistent protocol usage across all relevant API calls. --- .github/workflows/generate-file-for-ai.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-file-for-ai.yaml b/.github/workflows/generate-file-for-ai.yaml index e92866e9cb..b442d161f8 100644 --- a/.github/workflows/generate-file-for-ai.yaml +++ b/.github/workflows/generate-file-for-ai.yaml @@ -62,12 +62,12 @@ jobs: VECTOR_STORE_ID: ${{ secrets.OPENAI_VECTOR_STORE_ID }} run: | echo "Validating vector store..." - vs_validate=$(curl -fsS "https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID" \ + vs_validate=$(curl -fsS --http1.1 "https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID" \ -H "Authorization: Bearer $OPENAI_API_KEY") echo "$vs_validate" | jq . echo "Attaching file to vector store..." - attach_response=$(curl -sS -X POST \ + attach_response=$(curl -sS --http1.1 -X POST \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"file_id\":\"$FILE_ID\"}" \ @@ -91,7 +91,7 @@ jobs: run: | echo "Waiting for file $FILE_ID to finish processing in vector store..." for i in $(seq 1 60); do - file_response=$(curl -sS \ + file_response=$(curl -sS --http1.1 \ -H "Authorization: Bearer $OPENAI_API_KEY" \ "https://api.openai.com/v1/vector_stores/$VECTOR_STORE_ID/files/$FILE_ID")