8000 [FAI-15921] Add e2e testings for Windows system in CI by jeniii · Pull Request #131 · faros-ai/airbyte-local-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[FAI-15921] Add e2e testings for Windows system in CI #131

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

Merged
merged 56 commits into from
Apr 16, 2025
Merged

Conversation

jeniii
Copy link
Collaborator
@jeniii jeniii commented Apr 11, 2025

Description

Provide description here

Add e2e bash/powershell tests in github ci for Windows.
More info please check DEVELOPER.md testing section

Type of change

  • Bug fix
  • New feature
  • Breaking change

@jeniii jeniii changed the title Use git bash for e2e tests in windows [FAI-15921] Add e2e testings for Windows system in CI Apr 16, 2025
@jeniii jeniii marked this pull request as ready for review April 16, 2025 17:17
function getImagePlatform(image: string): string | undefined {
if (image?.startsWith('farosai')) {
return 'linux/amd64';
export function processDstDataByLine(line: string, cfg: FarosConfig): string {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

move up to the file. no change

/**
* Filter out spec output
*/
export function processSpecByLine(line: string): AirbyteSpec | undefined {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same. no change

options: Docker.ContainerCreateOptions,
outputStream: Writable,
inputStream?: ReadStream | PassThrough,
): Promise<void> {
Copy link
Collaborator Author
@jeniii jeniii Apr 16, 2025

Choose a reason for hiding this comment

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

most functions have the same running docker codes. create a function to avoid duplicate codes

}
if (stdinStream) {
(stdinStream as any).destroy();
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is some weird ....stuff.
took me a day to debug what's going on.

what happened was that the CLI hangs even it runs fine without errors. but it just didn't exit at the end. And this only happens on Github Windows runner.
I tested on my own Windows machine and it didn't hang and exited successfully. I wonder if this has to do with Github Windows runner is not using Docker Desktop.

status: 'SUCCEEDED',
},
});
docker.run = jest.fn().mockImplementation((_image, _command, outputStream: Writable, _createOptions) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

instead of using docker.run() to run for check src connection. I updated to use the same docker process as others (docker.createContainer, container start/wait).
This also has to do with some we 1E79 ird Windows behavior that the stdout/stderr is printing some extra texts. I didn't debug anything deeper and just switch to use container.attach to split stdout and stderr. it seems to fix it. ehhhhhhhh

overall, using docker.createContainer and container start/wait is too hard to mock so just rely on integration tests

jeniii and others added 2 commits April 17, 2025 04:50
Co-authored-by: Chris Wu <chris@faros.ai>
Co-authored-by: Chris Wu <chris@faros.ai>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@jeniii jeniii merged commit 66339f7 into main Apr 16, 2025
13 of 14 checks passed
@jeniii jeniii deleted the jg/nodecli-win-e2e branch April 16, 2025 21:26
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0