Skip to content

chore(dependencies): drop mysql-connector-java#4386

Merged
bobbai00 merged 14 commits into
apache:mainfrom
bobbai00:chore/remove-mysql-connector
Apr 20, 2026
Merged

chore(dependencies): drop mysql-connector-java#4386
bobbai00 merged 14 commits into
apache:mainfrom
bobbai00:chore/remove-mysql-connector

Conversation

@bobbai00

@bobbai00 bobbai00 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Drop the mysql-connector-java (GPLv2, ASF Category X) dependency.

MySQLSourceOpDesc is kept as a deprecated back-compat stub so that workflows previously saved with a MySQLSource node still deserialize.

Any related issues, documentation, discussions?

Closes #4393

How was this PR tested?

sbt WorkflowExecutionService/compile and sbt WorkflowExecutionService/Test/compile pass.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-7)

…nse compliance

mysql-connector-java is GPLv2 (ASF Category X) and cannot be distributed
in binary artifacts. The MySQL source operator was also non-functional:
the driver jar was declared in computing-unit-managing-service (which has
no MySQL code) but not in workflow-execution-coordinator (where the
operator actually runs), so any attempt to use MySQLSource would fail
with ClassNotFoundException at runtime.

Removes:
- MySQLSourceOpDesc, MySQLSourceOpExec, MySQLConnUtil
- mysql-connector-java dep from computing-unit-managing-service/build.sbt
- MySQLSource registration from LogicalOp operator registry
- inMemoryMySQLSourceOpDesc test helper (unused by any test)
- MySQLSource.png and MysqlSink.png frontend assets
- MySQLSource references in frontend test data and comments (replaced
  with PostgreSQLSource which remains available)

PostgreSQL (PostgreSQLSourceOpDesc) remains available for users who
need a SQL source operator.

Part of apache#4371.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file frontend Changes related to the frontend GUI service common labels Apr 15, 2026
@bobbai00 bobbai00 self-assigned this Apr 15, 2026
@bobbai00 bobbai00 requested a review from Yicong-Huang April 15, 2026 18:04
@Yicong-Huang

Copy link
Copy Markdown
Contributor

If MySQL connect has license issue, please create an issue or sub issue under 4371.

This Pr is to remove MySQL source. Is there an alternative? E.g., other license-ok library, or MySQL connector in Python?

This discussion and information should be kept on the issue in case we need to add back MySQL operator in the future, or do not remove it in the first place.

@chenlica

Copy link
Copy Markdown
Contributor

I agree that it will be good to have a MySQL solution with a license acceptable by ASF.

bobbai00 and others added 4 commits April 18, 2026 16:31
Replace the removed MySQL operator with an Apache 2.0-licensed
implementation backed by io.vertx:vertx-mysql-client, avoiding the
GPL'd mysql-connector-java that was removed for ASF license compliance.

- MySQLConnUtil builds a Vert.x Pool via MySQLBuilder with
  SslMode.PREFERRED + trustAll (mirrors the old useSSL=true behavior).
- MySQLSourceOpDesc still extends SQLSourceOpDesc for field reuse but
  overrides sourceSchema() to introspect columns via
  information_schema.columns over Vert.x instead of JDBC DatabaseMetaData.
- MySQLSourceOpExec extends SourceOperatorExecutor directly (the JDBC-
  hardwired SQLSourceOpExec can't host a Vert.x client), reimplementing
  query building, MATCH...AGAINST keyword search, progressive sliding-
  window batching, and limit/offset. The reactive RowStream is bridged
  to the operator's synchronous Iterator[TupleLike] via a
  LinkedBlockingQueue fed by the Vert.x event loop.
- Re-register MySQLSource in LogicalOp, restore inMemoryMySQLSourceOpDesc
  test helper, and restore the MySQLSource.png icon.
- Add MySQLSourceOpDescSpec (pure unit tests for type mapping and port
  resolution) and MySQLSourceOpExecSpec (MariaDB4j-backed integration
  tests for schema introspection, row streaming, limit/offset, and
  missing-table errors; skips gracefully when the embedded MariaDB
  binary cannot start on the current platform).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restore MySQLSourceOpDesc and its "MySQLSource" Jackson subtype so that
workflows persisted before the removal can still be deserialized and
opened in the editor. The operator is *not* executable:

- MySQLSourceOpExec and MySQLConnUtil are not restored.
- The mysql-connector-java dependency stays removed.
- sourceSchema() returns null so the frontend can render the node
  without invoking JDBC DatabaseMetaData.
- getPhysicalOp throws UnsupportedOperationException with a clear
  message pointing users at PostgreSQLSource or another supported
  source.

This is a pure back-compat shell — no code path talks to MySQL, and
the binary distribution still contains no GPL'd driver.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bobbai00 bobbai00 changed the title chore: remove MySQL source operator and mysql-connector-java for license compliance chore: drop mysql-connector-java Apr 19, 2026
@bobbai00

Copy link
Copy Markdown
Contributor Author

@Yicong-Huang per our discussion. Can you review this PR again?

Comment thread frontend/src/app/common/service/workflow-persist/workflow-persist.service.spec.ts Outdated
@chenlica

Copy link
Copy Markdown
Contributor

An analyst uses the MySQL connector if they have data inside a MySQL database. So mentioning Postgres is indeed meaningless :-)

bobbai00 and others added 4 commits April 19, 2026 21:59
Addresses review feedback on PR apache#4386: MySQL and Postgres source
operators are not substitutes, so recommending Postgres is misleading.
- Revert MySQL→Postgres comment swaps in preset-wrapper and
  workflow-persist.service.spec.
- Strip Postgres mentions from MySQLSourceOpDesc error and doc text.
- Keep @deprecated annotation and the original operatorInfo intact for
  backward compatibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add hiddenOperatorTypes set in OperatorMetadataGenerator so
  MySQLSource is excluded from the palette response while its Jackson
  subtype stays registered for backward compatibility.
- Restore MySQLConnUtil (uses only java.sql.DriverManager, no GPL dep)
  to keep the diff minimal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Keep the operator discoverable in the palette; Jackson @type stays
registered for stored-workflow compatibility.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Everything MySQL-related compiles against only java.sql.* (JDK) — no
GPL driver needed at compile time. The only intentional change is
dropping the mysql-connector-java dep from
computing-unit-managing-service/build.sbt. At runtime,
DriverManager.getConnection("jdbc:mysql:...") will raise SQLException
("no suitable driver"), which is the desired "deprecated, not
executable" behavior.

- Restore MySQLSourceOpExec.scala and MySQLSourceOpDesc.scala exactly
  as they were pre-removal.
- Restore inMemoryMySQLSourceOpDesc test helper in TestOperators.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot removed the common label Apr 20, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Restore 0755 mode on MysqlSink.png (was accidentally flipped to 0644
  when the file was recreated from a pre-removal blob).
- Use the correct version "1.1.0-incubating" in the @deprecated
  annotations on MySQLSourceOpDesc and MySQLSourceOpExec.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot removed the frontend Changes related to the frontend GUI label Apr 20, 2026
@bobbai00 bobbai00 requested a review from Yicong-Huang April 20, 2026 06:32
@bobbai00 bobbai00 changed the title chore: drop mysql-connector-java chore(dependencies): drop mysql-connector-java Apr 20, 2026
@bobbai00 bobbai00 merged commit bc2776e into apache:main Apr 20, 2026
14 checks passed
bobbai00 added a commit to bobbai00/texera that referenced this pull request Apr 23, 2026
…nt deps

Removes entries that are no longer bundled after the following upstream PRs:
- apache#4463 drop `twittered` (and its Sonar/jtidy/Maven-tooling transitive chain)
- apache#4474 drop `python-lsp-server` (and its pylint/rope/astroid chain + extras)
- apache#4475 drop `jschardet` from the frontend
- apache#4473 pin torch to CPU wheel on Linux x86_64 (removes nvidia-*-cu12)
- apache#4386 drop `mysql-connector-java`

Adds entries for newly-bundled deps surfaced by the reconciliation:
- `org.eclipse.collections` + `-api` under EDL-1.0
- Python `imageio` under BSD-2-Clause
- Python `lazy-loader`, `scikit-image`, `tifffile` under BSD-3-Clause

Also drops the now-redundant NOTICE-binary W3C block for xml-apis, the
entire NVIDIA CUDA section in LICENSE-binary, and the Java HTML Tidy
License section.

Verified: the checker reports zero STALE/ADDED across JVM, Python, and
npm ecosystems against a fresh `sbt dist` / frontend build / pip install.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bobbai00 added a commit to bobbai00/texera that referenced this pull request Apr 23, 2026
…nt deps

Removes entries that are no longer bundled after the following upstream PRs:
- apache#4463 drop `twittered` (and its Sonar/jtidy/Maven-tooling transitive chain)
- apache#4474 drop `python-lsp-server` (and its pylint/rope/astroid chain + extras)
- apache#4475 drop `jschardet` from the frontend
- apache#4473 pin torch to CPU wheel on Linux x86_64 (removes nvidia-*-cu12)
- apache#4386 drop `mysql-connector-java`

Adds entries for newly-bundled deps surfaced by the reconciliation:
- `org.eclipse.collections` + `-api` under EDL-1.0
- Python `imageio` under BSD-2-Clause
- Python `lazy-loader`, `scikit-image`, `tifffile` under BSD-3-Clause

Also drops the now-redundant NOTICE-binary W3C block for xml-apis, the
entire NVIDIA CUDA section in LICENSE-binary, and the Java HTML Tidy
License section.

Verified: the checker reports zero STALE/ADDED across JVM, Python, and
npm ecosystems against a fresh `sbt dist` / frontend build / pip install.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
### What changes were proposed in this PR?

Drop the `mysql-connector-java` (GPLv2, ASF [Category
X](https://www.apache.org/legal/resolved.html#category-x)) dependency.

`MySQLSourceOpDesc` is kept as a deprecated back-compat stub so that
workflows previously saved with a `MySQLSource` node still deserialize.

### Any related issues, documentation, discussions?

Closes apache#4393

### How was this PR tested?

`sbt WorkflowExecutionService/compile` and `sbt
WorkflowExecutionService/Test/compile` pass.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-7)

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Chen Li <chenli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common dependencies Pull requests that update a dependency file service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove or replace mysql-connector-java

3 participants