Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: integrate mysql (user-managed) into risedev and inline source tests #16449

Merged
merged 13 commits into from
Apr 25, 2024

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Apr 23, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

#12451

  • so that it can be run easier locally.
  • also improved tests to include shared source

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@github-actions github-actions bot added the component/test Test related issue. label Apr 23, 2024
@xxchan xxchan requested review from StrikeW and BugenZhao April 23, 2024 07:08
xxchan added 4 commits April 23, 2024 23:08
Signed-off-by: xxchan <[email protected]>
Signed-off-by: xxchan <[email protected]>
Signed-off-by: xxchan <[email protected]>
Signed-off-by: xxchan <[email protected]>
Comment on lines +177 to +180
query IT
select * from tt1_shared;
----
1 2023-10-23 10:00:00+00:00
Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, this test succeeds in CI, but failed for me locally. tt1 is ok, but tt1_shared has a different result. Any ideas?

failed to run `e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt`

Caused by:
    query result mismatch:
    [SQL] select * from tt1_shared;
    [Diff] (-expected|+actual)
    -   1 2023-10-23 10:00:00+00:00
    +   1 2023-10-23 02:00:00+00:00
    at e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt:177
    

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Most likely a bug in test setup or CDC itself, as the result is different in 8 hours when executed in different time zone.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the MySqlExternalTableReader which backfill upstream table we have executed conn.exec_drop("SET time_zone = \"+00:00\"", ()).await?; before scan the rows. And set driver.connectionTimeZone=+00:00 in the debezium connector.

Copy link
Member Author

Choose a reason for hiding this comment

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

@StrikeW Sorry that I might not understand the details yet. Do you mean this is a bug or ..?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should not happen, is it a new test case you added?

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you try to run this test locally to see whether you can reproduce it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it a simple way to run the test locally with your branch?

Copy link
Member Author

@xxchan xxchan Apr 24, 2024

Choose a reason for hiding this comment

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

Yes

  1. Add your MySQL to risedev user profile
  2. risedev d
  3. risedev slt e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's create a separate issue for this
#16496

@xxchan xxchan changed the title test: integrate mysql into risedev test: integrate mysql (user-managed) into risedev Apr 23, 2024
@xxchan xxchan changed the title test: integrate mysql (user-managed) into risedev test: integrate mysql (user-managed) into risedev and inline source tests Apr 23, 2024
e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt Outdated Show resolved Hide resolved
Comment on lines +177 to +180
query IT
select * from tt1_shared;
----
1 2023-10-23 10:00:00+00:00
Copy link
Contributor

Choose a reason for hiding this comment

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

In the MySqlExternalTableReader which backfill upstream table we have executed conn.exec_drop("SET time_zone = \"+00:00\"", ()).await?; before scan the rows. And set driver.connectionTimeZone=+00:00 in the debezium connector.

Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

The RiseDev part LGTM

src/risedevtool/src/bin/risedev-dev.rs Show resolved Hide resolved
src/risedevtool/src/bin/risedev-dev.rs Outdated Show resolved Hide resolved
Signed-off-by: xxchan <[email protected]>
@xxchan xxchan mentioned this pull request Apr 25, 2024
@xxchan xxchan added this pull request to the merge queue Apr 25, 2024
Merged via the queue into main with commit d5be17d Apr 25, 2024
27 of 28 checks passed
@xxchan xxchan deleted the xxchan/mysql branch April 25, 2024 13:59
@xxchan xxchan mentioned this pull request Aug 6, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test Test related issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants