Skip to content

Commit

Permalink
Merge branch 'main' into 20537-add-rpm-support
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmrod committed Sep 30, 2024
2 parents c12464b + 59160c2 commit 9514937
Show file tree
Hide file tree
Showing 90 changed files with 1,077 additions and 1,817 deletions.
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/digital-experience-request.md

This file was deleted.

59 changes: 30 additions & 29 deletions .github/workflows/test-db-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,6 @@ jobs:
with:
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'

- name: Start Infra Dependencies
# Use & to background this
run: docker compose up -d mysql_test &

- name: Wait for mysql
run: |
echo "waiting for mysql..."
until docker compose exec -T mysql_test sh -c "mysql -uroot -p\"\${MYSQL_ROOT_PASSWORD}\" -e \"SELECT 1=1\" fleet" &> /dev/null; do
echo "."
sleep 1
done
echo "mysql is ready"
- name: Verify test schema changes
run: |
make dump-test-schema
if [[ $(git diff server/datastore/mysql/schema.sql) ]]; then
echo "❌ fail: uncommited changes in schema.sql"
echo "please run `make dump-test-schema` and commit the changes"
exit 1
fi
# TODO: This doesn't cover all scenarios since other PRs might
# be merged into `main` after this check has passed.
#
Expand All @@ -84,8 +57,8 @@ jobs:
base_ref=$(git tag --list "fleet-v*" --sort=-creatordate | head -n 1)
fi
all_migrations=($(ls server/datastore/mysql/migrations/tables/20*_*.go | sort -r))
new_migrations=($(git diff --find-renames --name-only --diff-filter=A $base_ref -- server/datastore/mysql/migrations/tables/20\*_\*.go | sort -r))
all_migrations=($(ls server/datastore/mysql/migrations/tables/20*_*.go | sort -r | grep -v '_test.go'))
new_migrations=($(git diff --find-renames --name-only --diff-filter=A $base_ref -- server/datastore/mysql/migrations/tables/20\*_\*.go ':(exclude,glob)server/datastore/mysql/migrations/tables/20*_*_test.go' | sort -r))
index=0
for migration in "${new_migrations[@]}"; do
Expand All @@ -110,3 +83,31 @@ jobs:
echo "Ref: https://github.com/fleetdm/fleet/blob/main/handbook/engineering/scaling-fleet.md#foreign-keys-and-locking"
exit 1
fi
- name: Install Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'

- name: Start Infra Dependencies
# Use & to background this
run: docker compose up -d mysql_test &

- name: Wait for mysql
run: |
echo "waiting for mysql..."
until docker compose exec -T mysql_test sh -c "mysql -uroot -p\"\${MYSQL_ROOT_PASSWORD}\" -e \"SELECT 1=1\" fleet" &> /dev/null; do
echo "."
sleep 1
done
echo "mysql is ready"
- name: Verify test schema changes
run: |
make dump-test-schema
if [[ $(git diff server/datastore/mysql/schema.sql) ]]; then
echo "❌ fail: uncommited changes in schema.sql"
echo "please run `make dump-test-schema` and commit the changes"
exit 1
fi
Loading

0 comments on commit 9514937

Please sign in to comment.