From 38bf371f536c60ee84eee38ddf1eb05a23e2d2d2 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:07:54 +0300 Subject: [PATCH 01/11] all upgrading the requirements --- tests_e2e/requirements.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests_e2e/requirements.txt b/tests_e2e/requirements.txt index aeae7aa..7a183a0 100644 --- a/tests_e2e/requirements.txt +++ b/tests_e2e/requirements.txt @@ -1,7 +1,7 @@ -certifi==2023.11.17 -charset-normalizer==3.3.2 -idna==3.7 -PyYAML==6.0.1 -requests==2.32.0 -toml==0.10.2 -urllib3==2.1.0 +certifi>=2023.11.17 +charset-normalizer>=3.3.2 +idna>=3.7 +PyYAML>=6.0.1 +requests>=2.32.0 +toml>=0.10.2 +urllib3>=2.1.0 From 52fe921464b66065e57d060174527d1796171fd4 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:20:49 +0300 Subject: [PATCH 02/11] add folia flag to tests --- tests_e2e/run.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests_e2e/run.py b/tests_e2e/run.py index 26e34a1..8eec469 100755 --- a/tests_e2e/run.py +++ b/tests_e2e/run.py @@ -89,6 +89,15 @@ '1.20.1', '1.20.2', '1.20.3', + )) + ), + **( + dict(( + version, + { + 'folia': True, + }, + ) for version in ( '1.20.4', )) ), @@ -222,11 +231,22 @@ def save(data): if enable_blue: logger.info("Use 127.0.0.1:9011 for blue server") + enable_folia = environ.get("FOLIA") == "1" + proxy_type, client_version, action = argv[1:] version_info = VERSIONS[client_version] - test_name = f"mmc_test_{proxy_type}_{client_version}" + if enable_folia and ("folia" not in version_info or not version_info["folia"]): + logger.info(f"Skipping: Folia is not supported on this version ({client_version})") + exit(0) + + test_name_suffix = "" + if enable_folia: + test_name_suffix += "folia_" + test_name_suffix += f"{proxy_type}_{client_version}" + + test_name = f"mmc_test_{test_name_suffix}" test_env_dir = PARENT_DIR / "test_env" / test_name makedirs(test_env_dir, exist_ok=True) @@ -281,6 +301,11 @@ def save(data): else: world_version = "1.17.1" + if enable_folia: + server_type = "FOLIA" + else: + server_type = "PAPER" + for server_name in servers: server_desc = { 'build': { @@ -294,6 +319,7 @@ def save(data): }, 'environment': [ f'VERSION={server_version}' + f'TYPE={server_type}', ], 'ports': [ ] From 208d527127c3497e966c51af20fa574174d32e81 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:23:33 +0300 Subject: [PATCH 03/11] folia tests in workflow call --- .github/workflows/e2e_test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index 0b97e54..666a104 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -6,13 +6,15 @@ on: proxy: required: true type: string + folia: + type: boolean version: required: true type: string jobs: test: - name: E2E test (${{ inputs.version }}, ${{ inputs.proxy }}) + name: E2E test (${{ inputs.version }}, proxy=${{ inputs.proxy }}, folia=${{ inputs.folia }}) runs-on: ubuntu-latest defaults: run: @@ -20,6 +22,7 @@ jobs: env: # Legacy builder doesn't seem to properly mount /data folder inside server container for some reason DOCKER_BUILDKIT: 1 + FOLIA: "${{ inputs.folia }}" steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 From dabf7de6d9a6061755145fc73027e8d82a552f37 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:23:45 +0300 Subject: [PATCH 04/11] add folia matrix --- .github/workflows/e2e_all.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2e_all.yml b/.github/workflows/e2e_all.yml index 435d17f..e0386f9 100644 --- a/.github/workflows/e2e_all.yml +++ b/.github/workflows/e2e_all.yml @@ -35,6 +35,9 @@ jobs: - velocity - bungeecord - waterfall + folia: + - false + - true uses: ./.github/workflows/e2e_test.yml with: proxy: ${{ matrix.proxy }} From 3ec59049527ed6072b6877e3e196831f36ee1f5c Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:24:35 +0300 Subject: [PATCH 05/11] separately test version with and without folia --- .github/workflows/e2e_notable.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e_notable.yml b/.github/workflows/e2e_notable.yml index c47d7be..e65808f 100644 --- a/.github/workflows/e2e_notable.yml +++ b/.github/workflows/e2e_notable.yml @@ -13,14 +13,13 @@ jobs: build: name: Build uses: ./.github/workflows/nightly.yml - test: + paper: name: E2E test needs: build strategy: fail-fast: false matrix: version: - - 1.20.4 - 1.16.5 - 1.16.3 - 1.13.2 @@ -33,3 +32,22 @@ jobs: with: proxy: ${{ matrix.proxy }} version: ${{ matrix.version }} + paper-folia: + name: E2E test (with Folia) + needs: build + strategy: + fail-fast: false + matrix: + version: + - 1.20.4 + proxy: + - velocity + - bungeecord + folia: + - false + - true + uses: ./.github/workflows/e2e_test.yml + with: + proxy: ${{ matrix.proxy }} + version: ${{ matrix.version }} + folia: ${{ matrix.folia }} From 959cea57cd7f507180850e816b95a2640acd8465 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:27:56 +0300 Subject: [PATCH 06/11] fix boolean --- .github/workflows/e2e_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index 666a104..9814d4f 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -22,7 +22,7 @@ jobs: env: # Legacy builder doesn't seem to properly mount /data folder inside server container for some reason DOCKER_BUILDKIT: 1 - FOLIA: "${{ inputs.folia }}" + FOLIA: "${{ inputs.folia && '1' || '0' }}" steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 From b84b444f282b24e6cf7a8cfecea7d50427c9e211 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:28:54 +0300 Subject: [PATCH 07/11] log server type --- tests_e2e/run.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests_e2e/run.py b/tests_e2e/run.py index 8eec469..eb107a8 100755 --- a/tests_e2e/run.py +++ b/tests_e2e/run.py @@ -306,6 +306,8 @@ def save(data): else: server_type = "PAPER" + logger.info(f"Selected server type: {server_type}") + for server_name in servers: server_desc = { 'build': { From 94114c45093afe664075227fa6756dfd0b8871e2 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:42:14 +0300 Subject: [PATCH 08/11] enable debug logging --- tests_e2e/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests_e2e/run.py b/tests_e2e/run.py index eb107a8..49507dc 100755 --- a/tests_e2e/run.py +++ b/tests_e2e/run.py @@ -214,7 +214,7 @@ def save(data): ] debug_level = int(environ.get("DEBUG")) if environ.get("DEBUG") else 0 - debug = debug_level or environ.get("ACTIONS_STEP_DEBUG") == "true" + debug = True # debug_level or environ.get("ACTIONS_STEP_DEBUG") == "true" basicConfig( level=DEBUG if debug else INFO ) From 2c7fdd2ce7642a25610af0571cdde7fcffffbfc7 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:45:16 +0300 Subject: [PATCH 09/11] fix env --- tests_e2e/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests_e2e/run.py b/tests_e2e/run.py index 49507dc..e4eda65 100755 --- a/tests_e2e/run.py +++ b/tests_e2e/run.py @@ -320,7 +320,7 @@ def save(data): ], }, 'environment': [ - f'VERSION={server_version}' + f'VERSION={server_version}', f'TYPE={server_type}', ], 'ports': [ From 934837fd8e87eedbb60c4194559db0195b8acf91 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:47:44 +0300 Subject: [PATCH 10/11] Revert "enable debug logging" This reverts commit 94114c45093afe664075227fa6756dfd0b8871e2. --- tests_e2e/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests_e2e/run.py b/tests_e2e/run.py index e4eda65..1164c98 100755 --- a/tests_e2e/run.py +++ b/tests_e2e/run.py @@ -214,7 +214,7 @@ def save(data): ] debug_level = int(environ.get("DEBUG")) if environ.get("DEBUG") else 0 - debug = True # debug_level or environ.get("ACTIONS_STEP_DEBUG") == "true" + debug = debug_level or environ.get("ACTIONS_STEP_DEBUG") == "true" basicConfig( level=DEBUG if debug else INFO ) From 3c30a2d18732ae33bd263067a81dadb3ae85aed4 Mon Sep 17 00:00:00 2001 From: turikhay Date: Sat, 25 May 2024 16:50:38 +0300 Subject: [PATCH 11/11] update note about Folia [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dfef57b..98dbf85 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ If you have any questions, please [join my Discord][Discord]. | [JourneyMap] | v5.7.1 / Minecraft 1.16.5 | v5.9.9 / Minecraft 1.20.1 | ✅ Supported | | VoxelMap | [v1.7.10][VoxelMap (old)] / Minecraft 1.8 | [v1.12.x][VoxelMap] / Minecraft 1.20.1 | ✅ Supported[[2]](https://github.com/turikhay/MapModCompanion/issues/8) | -[Folia](https://papermc.io/software/folia) is supported, but isn't tested regularly. Please report if the support is broken. +[Folia](https://papermc.io/software/folia) is supported, but isn't tested thoroughly. Please report if the support is broken. ## Installation