Conversation
| assert.Equal(t, want, got) | ||
| } | ||
|
|
||
| func TestProvider_FetchCommitByID(t *testing.T) { |
There was a problem hiding this comment.
| func TestProvider_FetchCommitByID(t *testing.T) { | |
| func TestProviderFetchCommitByID(t *testing.T) { |
let's keep it consistent with other test name
There was a problem hiding this comment.
This naming style is consistent with all other tests in github_test.go and gitlab_test.go. I think this is not concern within PR, but we can discuss and address this in a separate PR.
There was a problem hiding this comment.
SG. In general, sub-tests use the name of TestProvider_FetchCommitByID. Let's address the test naming consistency in a follow-up PR.
There was a problem hiding this comment.
I checked all existing 82 test functions, it seems that only I have written tests for struct methods, which happens to use the pattern Test<T>_<method> ... that means unless we want to eliminate the use of underscore _ in tests name, there is no change needed at this point.
Pin the routine-catalogue tolerance on top of 10972659bef0 instead of the omni PR head, so the bump carries the Doris change and nothing else. The PR head also carries #1417's SQL Server error-unwrapping change, which fails Bytebase's recorded mssql parity corpus; that is another engine's behavior change and needs its own pin-bump audit.
* refactor(doris): drive doris through omni Cut backend/plugin/db/doris over to github.com/bytebase/omni/doris/driver. The package is now an adapter over the omni driver: it maps db.ConnectionConfig onto driver.Config, keeps Bytebase's SSH tunnel and TLS material on this side of the seam, and converts the contract's results back into v1pb.QueryResult and metadatapb.DatabaseSchemaMetadata. The catalog sync queries, the server-DDL dump renderer, the value conversions and the statement classification are deleted. * Merge origin/main into cutover/doris, and hold the query session A Query request's statements arrive one per QueryConn call on a driver the editor keeps, so opening and closing a session per call lost the session state a SET or a user variable set up. Hold one session until Close, as the tidb and mysql adapters do, and drop it when a statement's context ends. No conflicts: the branch touches only its engine package. * fix(doris): pin the dump's routine tolerance and state the held session The omni dump now keeps the objects it can state when a server refuses the routine catalogue — a kernel built without the PL/SQL grammar, or an account without the catalogue's privilege — instead of failing the whole dump, which schema sync treats as fatal (BYT-10211). Pin the fix; it is bytebase/omni#1430. Also say what QueryConn now does: the driver holds one session for its life, as the session-state semantics of an editor stream require. * chore(doris): pin the Doris dump fix on the current omni pin Pin the routine-catalogue tolerance on top of 10972659bef0 instead of the omni PR head, so the bump carries the Doris change and nothing else. The PR head also carries #1417's SQL Server error-unwrapping change, which fails Bytebase's recorded mssql parity corpus; that is another engine's behavior change and needs its own pin-bump audit. * fix(doris): serialize QueryConn on the held session Hold the session lock for the whole call, as the mysql adapter does, so the calls of one editor stream queue on the session instead of racing it: a statement that takes the session with it (a failed call, an ended context) cannot close a session another call is running on.
omni #1432 removed ast.MergeStmt with the StarRocks grammar's MERGE statement, so drop the three analysis cases that named it. The Doris residue the type read is now refused by the parser itself. omni #1417 unpacks the server message a batch's row reader fails on, so the mssql cutover parity case that recorded the client text as a known difference is no longer a difference. Drop it, and normalize the container name an unpacked error carries so the recorded golden and the replay can compare.
omni #1432 removed ast.MergeStmt with the StarRocks grammar's MERGE statement, so drop the three analysis cases that named it. The Doris residue the type read is now refused by the parser itself. omni #1417 unpacks the server message a batch's row reader fails on, so the mssql cutover parity case that recorded the client text as a known difference is no longer a difference. Drop it, and normalize the container name an unpacked error carries so the recorded golden and the replay can compare.
* fix(deps): update github.com/bytebase/omni digest to ffa6a5a * fix(deps): update github.com/bytebase/omni to 3ffa03a Pin current omni main (3ffa03a) merged with the Doris routine-catalogue tolerance from bytebase/omni#1430 (f48105aa), since #1430 is still unmerged. This keeps the BYT-10211 fix the previous pin carried; re-point at main once #1430 lands. * fix(starrocks,mssql): adopt omni main's parser and error changes omni #1432 removed ast.MergeStmt with the StarRocks grammar's MERGE statement, so drop the three analysis cases that named it. The Doris residue the type read is now refused by the parser itself. omni #1417 unpacks the server message a batch's row reader fails on, so the mssql cutover parity case that recorded the client text as a known difference is no longer a difference. Drop it, and normalize the container name an unpacked error carries so the recorded golden and the replay can compare. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Danny Xu <d@bytebase.com>
Implements
FetchCommitByIDfor GitHub VCS provider, adds unit tests for both GitHub and GitLab.Part of #928