Skip to content

fix(via): atualiza Via* (Dockerfile/setup.sh/setup.bat) para 5.12.1/5.12.1/4.2.0, compatíveis com 1.21.8 - #7

Open
oTalentz wants to merge 3 commits into
mainfrom
devin/1784970164-bump-via-versions-dockerfile
Open

oTalentz wants to merge 3 commits into
mainfrom
devin/1784970164-bump-via-versions-dockerfile

Conversation

@oTalentz

@oTalentz oTalentz commented Jul 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

O ViaVersion não carrega no servidor com as versões fixadas no main:

[ViaVersion] Error initializing plugin 'ViaVersion.jar' in folder 'plugins' (Is it up to date?)
[ViaVersion] There is a newer plugin version available: 5.11.0, you're on: 5.3.0

O Dockerfile e scripts/setup.bat fixavam ViaVersion/ViaBackwards 5.3.0 e ViaRewind 4.0.4, que não suportam o protocolo 1.21.8 — o suporte multi-versão estava desligado na prática. Este PR alinha as três vias de instalação (Dockerfile, setup.sh, setup.bat) nas releases mais recentes e extrai as versões para ENV no Dockerfile:

ENV VIAVERSION_VER=5.12.0
ENV VIABACKWARDS_VER=5.12.0
ENV VIAREWIND_VER=4.2.0
...
curl -L -o plugins/ViaVersion.jar \
  "https://github.com/ViaVersion/ViaVersion/releases/download/${VIAVERSION_VER}/ViaVersion-${VIAVERSION_VER}.jar"

(2026-09-28: bump adicional 5.11.0/4.1.3 -> 5.12.0/4.2.0, últimas releases no GitHub.)

Verificado localmente (build combinado com o #6, necessário porque o main ainda baixa o Paper pela API v2 descontinuada):

[ViaVersion] ViaVersion 5.12.0 is now loaded. Registering protocol transformers...
[ViaVersion] ViaVersion detected server version: 1.21.7-1.21.8 (772)
[ViaBackwards] Enabling ViaBackwards v5.12.0
[ViaRewind] Enabling ViaRewind v4.2.0
Done (19.871s)! For help, type "help"

Sem nenhum ERROR; container mc-server-1218 healthy.

Nota de deploy: plugins/ é um volume nomeado (mc-plugins), então o rebuild só entrega os jars novos após docker compose down -v (ou remoção do volume).

Link to Devin session: https://app.devin.ai/sessions/d623089f3bfc4b0bb8dc92aa0cad8636
Open in Devin Desktop: https://app.devin.ai/desktop/session/d623089f3bfc4b0bb8dc92aa0cad8636?variant=devin

…patíveis com 1.21.8

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

ViaVersion, ViaBackwards, and ViaRewind versions are parameterized in the Docker build and updated in scripts/setup.bat. Docker plugin downloads now use the configured variables instead of hard-coded versions.

Changes

Via plugin version configuration

Layer / File(s) Summary
Configure Via plugin versions
Dockerfile, scripts/setup.bat
Docker defines version variables for the Via plugins and uses them in download URLs; the setup script updates the pins to ViaVersion/ViaBackwards 5.11.0 and ViaRewind 4.1.3.

Estimated code review effort: 2 (Simple) | ~5 minutes


🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check Warning O título descreve a atualização dos plugins Via*, que é o objetivo principal, mas informa versões diferentes das alterações reais. O pull request atualiza ViaVersion e ViaBackwards para 5.11.0 e ViaRe… Atualize o título para refletir as versões reais, por exemplo: "fix(via): atualiza Via* no Dockerfile e setup.bat para 5.11.0/5.11.0/4.1.3".
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Full details: Title check

Explanation

O título descreve a atualização dos plugins Via*, que é o objetivo principal, mas informa versões diferentes das alterações reais. O pull request atualiza ViaVersion e ViaBackwards para 5.11.0 e ViaRewind para 4.1.3.



  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1784970164-bump-via-versions-dockerfile



Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
Dockerfile (2)

33-37: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Make failed downloads fail the image build.

Without --fail, curl can return success for HTTP errors such as 404, leaving an invalid response saved as a .jar. Add --fail --show-error to each download command. (curl.se)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 33 - 37, Update each curl command downloading
ViaVersion, ViaBackwards, and ViaRewind in the Dockerfile to include --fail
--show-error, ensuring HTTP download errors fail the image build while
preserving the existing output paths and URLs.

33-37: 🩺 Stability & Availability | 🔵 Trivial

Ensure the plugin volume is refreshed during upgrades.

Rebuilding the image does not replace an existing mc-plugins volume, so these newly downloaded JARs may remain hidden behind stale volume contents. Keep docker compose down -v or an explicit volume migration in the upgrade path. (docs.docker.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 33 - 37, Update the upgrade path associated with the
Docker Compose deployment to refresh the mc-plugins volume when plugin JARs
change. Preserve the existing plugin download behavior and either retain docker
compose down -v during upgrades or add an explicit volume migration that
replaces stale contents with the newly downloaded plugins.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/setup.bat`:
- Around line 6-8: Update the setup script’s plugin download flow using
VIAVERSION_VER, VIABACKWARDS_VER, and VIAREWIND_VER so that, after all new JAR
downloads succeed, it removes older versioned ViaVersion, ViaBackwards, and
ViaRewind JARs while preserving the newly downloaded files. Ensure cleanup is
scoped to matching plugin filenames and does not run before successful
downloads.

---

Nitpick comments:
In `@Dockerfile`:
- Around line 33-37: Update each curl command downloading ViaVersion,
ViaBackwards, and ViaRewind in the Dockerfile to include --fail --show-error,
ensuring HTTP download errors fail the image build while preserving the existing
output paths and URLs.
- Around line 33-37: Update the upgrade path associated with the Docker Compose
deployment to refresh the mc-plugins volume when plugin JARs change. Preserve
the existing plugin download behavior and either retain docker compose down -v
during upgrades or add an explicit volume migration that replaces stale contents
with the newly downloaded plugins.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 772cd167-eb66-4cfe-a8c5-53b94f4099e7

📥 Commits

Reviewing files that changed from the base of the PR and between e28abc0 and 8d8c542.

📒 Files selected for processing (2)
  • Dockerfile
  • scripts/setup.bat

Comment thread scripts/setup.bat Outdated
Comment on lines +6 to +8
set "VIAVERSION_VER=5.11.0"
set "VIABACKWARDS_VER=5.11.0"
set "VIAREWIND_VER=4.1.3"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Remove obsolete plugin JARs during upgrades.

Because the version is embedded in each filename, an existing ViaVersion-5.3.0.jar, ViaBackwards-5.3.0.jar, or ViaRewind-4.0.4.jar is not removed. The next server start can see both old and new artifacts. Delete older matching JARs after the new downloads succeed, or switch to stable filenames with an explicit replacement step.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/setup.bat` around lines 6 - 8, Update the setup script’s plugin
download flow using VIAVERSION_VER, VIABACKWARDS_VER, and VIAREWIND_VER so that,
after all new JAR downloads succeed, it removes older versioned ViaVersion,
ViaBackwards, and ViaRewind JARs while preserving the newly downloaded files.
Ensure cleanup is scoped to matching plugin filenames and does not run before
successful downloads.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@oTalentz oTalentz changed the title fix(via): atualiza Via* no Dockerfile/setup.bat para versões compatíveis com 1.21.8 fix(via): atualiza Via* (Dockerfile/setup.sh/setup.bat) para 5.12.0/5.12.0/4.2.0, compatíveis com 1.21.8 Sep 28, 2026
Co-Authored-By: Devin AI <devin-ai-integration[bot]@users.noreply.github.com>
@oTalentz oTalentz changed the title fix(via): atualiza Via* (Dockerfile/setup.sh/setup.bat) para 5.12.0/5.12.0/4.2.0, compatíveis com 1.21.8 fix(via): atualiza Via* (Dockerfile/setup.sh/setup.bat) para 5.12.1/5.12.1/4.2.0, compatíveis com 1.21.8 Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant