Skip to content

Conversation

buu-nguyen
Copy link

Proposed changes

Problem Summary:

This PR adds support for resolving environment variables within the parameter mapping for CDC tools. It updates the getConfigMap method to substitute placeholders like $VAR or ${VAR} with their corresponding environment variable values.

Checklist(Required)

  1. Does it affect the original behavior: No
  2. Has unit tests been added: Yes
  3. Has document been added or modified: No
  4. Does it need to update dependencies: No
  5. Are there any changes that cannot be rolled back: No

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@buu-nguyen buu-nguyen closed this May 21, 2025
@JNSimba
Copy link
Member

JNSimba commented May 27, 2025

Thank you for your contribution, can this be added as a case, something like this? https://github.com/apache/doris-flink-connector/blob/master/flink-doris-connector/src/test/resources/container/e2e/mysql2doris/testMySQL2Doris.txt

- Extracts environment variable regex pattern to a constant for reusability
- Replaces inline regex compilation with a pre-compiled pattern to improve performance
@buu-nguyen buu-nguyen force-pushed the cdc-env branch 3 times, most recently from 6737125 to 785f7c8 Compare May 30, 2025 15:24
…E tests

- Introduces a new test case `testMySQL2DorisEnvVar` that validates environment variable resolution during data syncing from MySQL to Doris.
- Implements methods to set and unset environment variables for testing purposes.
- Adds initialization SQL and configuration files to support the new test scenario.
@buu-nguyen
Copy link
Author

Thank you for your contribution, can this be added as a case, something like this? https://github.com/apache/doris-flink-connector/blob/master/flink-doris-connector/src/test/resources/container/e2e/mysql2doris/testMySQL2Doris.txt

Hi @JNSimba, i already added an E2E test

@JNSimba
Copy link
Member

JNSimba commented Jun 11, 2025

ci failed, PTAL.@buu-nguyen

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.

2 participants