Skip to content

Commit

Permalink
Deprecated Site Replication in UI (#3469)
Browse files Browse the repository at this point in the history
* Deprecated Sire Replication in UI

Signed-off-by: Benjamin Perez <[email protected]>

* fix-workflow-issue

---------

Signed-off-by: Benjamin Perez <[email protected]>
Co-authored-by: Benjamin Perez <[email protected]>
  • Loading branch information
bexsoft and Benjamin Perez authored Nov 11, 2024
1 parent 18e5097 commit 4e5dcf0
Show file tree
Hide file tree
Showing 53 changed files with 15 additions and 6,455 deletions.
127 changes: 13 additions & 114 deletions .github/workflows/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
run: npm install [email protected]

- name: Run TestCafe Tests
run: npx testcafe "chrome:headless" web-app/tests/subpath-nginx/ -q --skip-js-errors -c 3
run: npx testcafe "firefox:headless" web-app/tests/subpath-nginx/ -q --skip-js-errors -c 3

- name: Clean up docker
if: always()
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
run: npm install [email protected]

- name: Run TestCafe Tests
run: npx testcafe "chrome:headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
run: npx testcafe "firefox:headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3

- name: Clean up users & policies
run: |
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
run: npm install [email protected]

- name: Run TestCafe Tests
run: npx testcafe "chrome:headless" web-app/tests/permissions-2/ -q --skip-js-errors -c 3
run: npx testcafe "firefox:headless" web-app/tests/permissions-2/ -q --skip-js-errors -c 3

- name: Clean up users & policies
run: |
Expand Down Expand Up @@ -386,7 +386,7 @@ jobs:
run: npm install [email protected]

- name: Run TestCafe Tests
run: npx testcafe "chrome:headless" web-app/tests/permissions-3/ -q --skip-js-errors -c 3
run: npx testcafe "firefox:headless" web-app/tests/permissions-3/ -q --skip-js-errors -c 3

- name: Clean up users & policies
run: |
Expand Down Expand Up @@ -439,7 +439,7 @@ jobs:

- name: Run TestCafe Tests
timeout-minutes: 10
run: npx testcafe "chrome:headless" web-app/tests/permissions-4/ --skip-js-errors
run: npx testcafe "firefox:headless" web-app/tests/permissions-4/ --skip-js-errors

all-permissions-5:
name: Permissions Tests Part 5
Expand Down Expand Up @@ -487,7 +487,7 @@ jobs:

- name: Run TestCafe Tests
timeout-minutes: 5
run: npx testcafe "chrome:headless" web-app/tests/permissions-5/ --skip-js-errors
run: npx testcafe "firefox:headless" web-app/tests/permissions-5/ --skip-js-errors

all-permissions-6:
name: Permissions Tests Part 6
Expand Down Expand Up @@ -535,7 +535,7 @@ jobs:

- name: Run TestCafe Tests
timeout-minutes: 5
run: npx testcafe "chrome:headless" web-app/tests/permissions-6/ --skip-js-errors
run: npx testcafe "firefox:headless" web-app/tests/permissions-6/ --skip-js-errors

all-permissions-7:
name: Permissions Tests Part 7
Expand Down Expand Up @@ -582,7 +582,7 @@ jobs:

- name: Run TestCafe Tests
timeout-minutes: 5
run: npx testcafe "chrome:headless" web-app/tests/permissions-7/ --skip-js-errors
run: npx testcafe "firefox:headless" web-app/tests/permissions-7/ --skip-js-errors

all-permissions-8:
name: Permissions Tests Part 8
Expand Down Expand Up @@ -630,7 +630,7 @@ jobs:

- name: Run TestCafe Tests
timeout-minutes: 5
run: npx testcafe "chrome:headless" web-app/tests/permissions-8/ --skip-js-errors
run: npx testcafe "firefox:headless" web-app/tests/permissions-8/ --skip-js-errors

all-permissions-A:
name: Permissions Tests Part A
Expand Down Expand Up @@ -677,7 +677,7 @@ jobs:
run: npm install [email protected]

- name: Run TestCafe Tests
run: npx testcafe "chrome:headless" web-app/tests/permissions-A/ --skip-js-errors -c 3
run: npx testcafe "firefox:headless" web-app/tests/permissions-A/ --skip-js-errors -c 3

- name: Clean up users & policies
run: |
Expand Down Expand Up @@ -728,7 +728,7 @@ jobs:
run: npm install [email protected]

- name: Run TestCafe Tests
run: npx testcafe "chrome:headless" web-app/tests/permissions-B/ --skip-js-errors -c 3
run: npx testcafe "firefox:headless" web-app/tests/permissions-B/ --skip-js-errors -c 3

- name: Clean up users & policies
run: |
Expand Down Expand Up @@ -900,88 +900,7 @@ jobs:
- name: Run tests
working-directory: ./web-app
run: yarn test
replication:
name: Site Replication Test
needs:
- lint-job
- ui-assets
- semgrep-static-code-analysis
- latest-minio
runs-on: [ubuntu-latest]

strategy:
matrix:
go-version: [1.22.x]

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Clone github.com/minio/minio
uses: actions/checkout@master
with:
repository: minio/minio
path: "minio_repository"
- name: Check-out matching MinIO branch
env:
GH_BRANCH: ${{ github.head_ref || github.ref_name }}
GH_PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
run: |
GH_PR_ACCOUNT=`echo $GH_PR_REPO | sed "s/\\/.*//"`
if [ ! -z "$GH_PR_ACCOUNT" ] && [ ! "$GH_PR_ACCOUNT" = "minio" ]; then
ALTREPO="https://github.com/$GH_PR_ACCOUNT/minio.git"
echo "Attempting to fetch $ALTREPO..."
git remote add alt $ALTREPO
(git fetch alt && git checkout "alt/$GH_BRANCH") || echo "$ALTREPO ($GH_BRANCH) not available, so keeping default repository/branch"
fi
- uses: actions/cache@v4
id: minio-latest-cache
name: MinIO Latest Cache
with:
path: |
./minio
key: ${{ runner.os }}-minio-latest-${{ hashFiles('./minio_repository/go.sum') }}

- name: Build on ${{ matrix.os }}
run: |
echo "The idea is to build minio image from downloaded repository";
cd $GITHUB_WORKSPACE/minio_repository;
echo "Get git version to build MinIO Image";
VERSION=`git rev-parse HEAD`;
echo $VERSION;
echo "Create MinIO image";
make docker VERSION=$VERSION;
docker build -q --no-cache -t minio/minio:$VERSION . -f Dockerfile
echo "Jumping back to console repository to run the integration test"
cd $GITHUB_WORKSPACE;
echo "We are going to use the built image on test-integration";
MINIO_VERSION="minio/minio:$VERSION";
echo $MINIO_VERSION;
make test-replication MINIO_VERSION=$MINIO_VERSION;
- uses: actions/cache@v4
id: coverage-cache-replication
name: Coverage Cache Replication
with:
path: |
./replication/coverage/
key: ${{ runner.os }}-replication-coverage-2-${{ github.run_id }}

# To save our replication.out file into an artifact.
# By default, GitHub stores build logs and artifacts for 90 days.
- uses: actions/upload-artifact@v4
with:
name: replication-artifact
path: ./replication/coverage/replication.out
if-no-files-found: error
sso-integration:
name: SSO Integration Test
needs:
Expand Down Expand Up @@ -1074,7 +993,6 @@ jobs:
- test-api-on-go
- test-pkg-on-go
- sso-integration
- replication
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -1110,14 +1028,6 @@ jobs:
./sso-integration/coverage/
key: ${{ runner.os }}-sso-coverage-2-${{ github.run_id }}

- uses: actions/cache@v4
id: coverage-cache-replication
name: Coverage Cache Replication
with:
path: |
./replication/coverage/
key: ${{ runner.os }}-replication-coverage-2-${{ github.run_id }}

- uses: actions/cache@v4
id: coverage-cache-api
name: Coverage Cache API
Expand All @@ -1134,12 +1044,6 @@ jobs:
./pkg/coverage/
key: ${{ runner.os }}-coverage-pkg-2-${{ github.run_id }}

# Get the replication.out file from the artifact since this is working for self host runner.
- uses: actions/download-artifact@v4
with:
name: replication-artifact
path: replication/coverage

- name: Get coverage
run: |
echo "change directory to gocovmerge"
Expand All @@ -1151,12 +1055,12 @@ jobs:
echo "go build gocoverage.go"
go build gocovmerge.go
echo "put together the outs for final coverage resolution"
./gocovmerge ../integration/coverage/system.out ../replication/coverage/replication.out ../sso-integration/coverage/sso-system.out ../api/coverage/coverage.out ../pkg/coverage/coverage-pkg.out > all.out
./gocovmerge ../integration/coverage/system.out ../sso-integration/coverage/sso-system.out ../api/coverage/coverage.out ../pkg/coverage/coverage-pkg.out > all.out
echo "Download mc for Ubuntu"
wget -q https://dl.min.io/client/mc/release/linux-amd64/mc
echo "Change the permissions to execute mc command"
chmod +x mc
echo "Only run our test if play is up and running since we require it for replication tests here."
echo "Only run our test if play is up and running"
PLAY_IS_ON=`wget --spider --server-response https://play.min.io:9443/login 2>&1 | grep '200\ OK' | wc -l`
if [ $PLAY_IS_ON == 1 ]
then
Expand All @@ -1180,11 +1084,6 @@ jobs:
./mc cp system.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
./mc cp ../integration/coverage/system.out play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
./mc cp ../integration/coverage/system.out play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
go tool cover -html=../replication/coverage/replication.out -o replication.html
./mc cp replication.html play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
./mc cp replication.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
./mc cp ../replication/coverage/replication.out play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
./mc cp ../replication/coverage/replication.out play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
go tool cover -html=../sso-integration/coverage/sso-system.out -o sso-system.html
./mc cp sso-system.html play/builds/${{ github.repository }}/${{ github.event.number }}/${{ github.run_id }}/ || true
./mc cp sso-system.html play/builds/${{ github.repository }}/${{ github.event.number }}/latest/ || true
Expand Down
86 changes: 0 additions & 86 deletions api/admin_replication_status.go

This file was deleted.

Loading

0 comments on commit 4e5dcf0

Please sign in to comment.