Skip to content

fix: possible recursion issue with not found instances #137

fix: possible recursion issue with not found instances

fix: possible recursion issue with not found instances #137

Workflow file for this run

name: CI 👷
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup OpenTofu
uses: opentofu/setup-opentofu@main
- name: Tofu init
run: tofu init
- name: Tofu fmt
run: tofu fmt --recursive --check
- name: Validate Lifecycle Manager
run: |
# If the ./lifecycle_manager/main.py file has been modified, make sure the zip file was rebuilt
if git diff --name-only origin/${{ github.base_ref }}..HEAD | grep -q "lifecycle_manager/main.py"; then
echo "Lifecycle Manager main.py has been modified, checking zip file..."
cd lifecycle_manager
./build_lifecycle_manager.sh
# Check if rebuilding the zip creates any changes (indicating the committed zip is outdated)
if git diff --exit-code lifecycle_manager/ec2-workerpool-lifecycle-manager.zip; then
echo "Lifecycle Manager zip file is up to date with main.py changes."
else
echo "ERROR: Lifecycle Manager zip file is not up to date!"
echo "The zip file in the repository doesn't match what would be generated from the current main.py."
echo "Please rebuild the zip file using './lifecycle_manager/build_lifecycle_manager.sh' and commit the updated zip."
exit 1
fi
else
echo "Lifecycle Manager main.py has not been modified, skipping zip file check."
fi