karthik-0306 commented on PR #12858: URL: https://github.com/apache/seatunnel/pull/12858#issuecomment-6493673175
Thanks @SEZ9. Sorry, the table was cut off. Here are the remaining rows, plus the F4 pointer. **F4 rationale:** it is in the `install_plugins` docstring (`plugin_installer.py` L233-235): `bin/install-plugin.cmd` does not report download failures through its exit code, so it cannot be used with the rollback, and a WSL or Git `bash` cannot run the script from a Windows path. The error raised on Windows says that `install_plugins()` runs `bin/install-plugin.sh` with bash and is supported on Linux and macOS only, and that `select_plugins()` works on any platform. Test: `test_windows_is_rejected_before_rewriting`. | # | Finding | Fix | Code | Tests | |---|---|---|---|---| | F7 | Rollback wrote `plugin_config` back even when `select_plugins` had changed nothing | The rollback goes through `_restore_if_changed`, which reads the current bytes and writes the snapshot back only if they differ. A failed install on an already-correct config no longer touches the file, so its mtime and inode stay the same. | `_restore_if_changed` (L191-199), called from the `except BaseException` handler in `install_plugins` (L327) | `test_failed_install_does_not_rewrite_an_unchanged_file`, plus `test_nonzero_exit_raises_and_restores_plugin_config` and `test_failed_install_restores_previous_selection_and_line_endings` for the case where a restore is needed | | F8 | The empty-version error hinted at a hard-coded `3.0.1`, which is not a published version | The hint no longer names any version. It says: "A connector version is required; it should match your SeaTunnel engine version." The invalid-version message ends with the same sentence. | `install_plugins` (L268-277) | `test_empty_version_raises` asserts that "engine version" is in the message and "3.0.1" is not. `test_invalid_version_raises_before_rewriting` covers the invalid-character case. | No code changed since the last push (head `1c42f78cb`), and the checks are rerunning on the rebased branch. Ready for your final pass whenever you are. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
