Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions .github/workflows/chatbot_refresh_vector_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
- add missing static

schedule:
- cron: '0 22 * * *' # Run daily at 10:00 PM UTC (11:00 PM CEST) to refresh the index in prod
- cron: '*/5 * * * *' # Run every 5 minutes # Run daily at 10:00 PM UTC (11:00 PM CEST) to refresh the index in prod

permissions:
id-token: write
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
scheduled_refresh:
name: Chatbot Refresh All Docs Vector Index (scheduled on prod)
if: github.event_name == 'schedule'
runs-on: codebuild-prod-github-runner-${{ github.run_id }}-${{ github.run_attempt }}
runs-on: ubuntu-24.04
outputs:
environment: 'prod'
environment: 'prod'
Expand All @@ -89,7 +89,28 @@ jobs:
aws_region: eu-south-1
role_to_assume: ${{ secrets.IAM_ROLE_CHATBOT_REINDEX }}

- name: Refresh All Docs Vector Index
uses: ./.github/actions/refresh-all-docs-vector-index
with:
chatbot_lambda_name: ${{ vars.CHATBOT_LAMBDA_NAME }}
- name: Test bash
run: |
echo "Scheduled refresh job running..."
# - name: Refresh All Docs Vector Index
# uses: ./.github/actions/refresh-all-docs-vector-index
# with:
# chatbot_lambda_name: ${{ vars.CHATBOT_LAMBDA_NAME }}

scheduled_test:
name: Test
runs-on: ubuntu-24.04
outputs:
environment: 'prod'
environment: 'prod'
env:
SITEMAP_URL: https://developer.pagopa.it/sitemap.xml

steps:
- name: Test bash
run: |
echo "github.event_name ${{ github.event_name }} is equal to schedule ${{ github.event_name == 'schedule' }}"
echo "environment ${{ environment }} should be equal to prod"
echo "CHATBOT_LAMBDA_NAME ${{ vars.CHATBOT_LAMBDA_NAME }}"
echo "IAM_ROLE_CHATBOT_REINDEX ${{ secrets.IAM_ROLE_CHATBOT_REINDEX != '' }}"