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

Fix windows build (mostly) #1412

Merged
merged 5 commits into from
Oct 22, 2021
Merged

Conversation

dblock
Copy link
Member

@dblock dblock commented Oct 21, 2021

Description

This fixes much of the Windows build.

What Works

./gradlew :distribution:archives:windows-zip:assemble

This is sufficient for opensearch-project/opensearch-build#767

What Doesn't Work

./gradlew :test:fixtures:azure-fixture:composeUp # causes :build to fail
./gradlew assemble # tries to assemble docker images for CentOS

Issues Resolved

Most of #1379.

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: dblock <dblock@dblock.org>
Signed-off-by: dblock <dblock@dblock.org>
Signed-off-by: dblock <dblock@dblock.org>
Signed-off-by: dblock <dblock@dblock.org>
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@dblock
Copy link
Member Author

dblock commented Oct 21, 2021

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed 04af520

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 04af520

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Precommit failure 04af520
Log 1372

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 04af520
Log 770

Reports 770

Signed-off-by: dblock <dblock@dblock.org>
@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed 3677f12

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 3677f12

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 3677f12

@dblock
Copy link
Member Author

dblock commented Oct 21, 2021

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 3677f12
Log 776

Reports 776

@reta
Copy link
Collaborator

reta commented Oct 22, 2021

@dblock I could help with ./gradlew :test:fixtures:azure-fixture:composeUp # causes :build to fail, please let me know :-)

@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

@dblock I could help with ./gradlew :test:fixtures:azure-fixture:composeUp # causes :build to fail, please let me know :-)

Definitely, please!

@dblock dblock merged commit e601a68 into opensearch-project:main Oct 22, 2021
@dblock dblock deleted the fix-windows-build branch October 22, 2021 11:55
dblock added a commit to dblock/OpenSearch that referenced this pull request Oct 22, 2021
* Updated developer guide with Windows specifics.

Signed-off-by: dblock <dblock@dblock.org>

* Correct windows task name.

Signed-off-by: dblock <dblock@dblock.org>

* Use Docker desktop installation on Windows.

Signed-off-by: dblock <dblock@dblock.org>

* Locate docker-compose on Windows.

Signed-off-by: dblock <dblock@dblock.org>

* Default docker-compose location.

Signed-off-by: dblock <dblock@dblock.org>
@reta
Copy link
Collaborator

reta commented Oct 22, 2021

./gradlew :test:fixtures:azure-fixture:composeUp

@dblock I was running the build on Windows 10 / Docker Desktop 3.6 with latest main, all stages and tests pass with no issues (I see containers started and stopped):

$ ./gradlew :test:fixtures:azure-fixture:composeUp
...
BUILD SUCCESSFUL in 20s
1 actionable task: 1 executed

The check task also passes:

./gradlew :plugins:repository-azure:check
...
BUILD SUCCESSFUL in 6m 8s
200 actionable tasks: 12 executed, 188 up-to-date

May be you could hint what the problem you run into? Thank you!

dblock added a commit that referenced this pull request Oct 22, 2021
* Updated developer guide with Windows specifics.

Signed-off-by: dblock <dblock@dblock.org>

* Correct windows task name.

Signed-off-by: dblock <dblock@dblock.org>

* Use Docker desktop installation on Windows.

Signed-off-by: dblock <dblock@dblock.org>

* Locate docker-compose on Windows.

Signed-off-by: dblock <dblock@dblock.org>

* Default docker-compose location.

Signed-off-by: dblock <dblock@dblock.org>
@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

My bad for not posting the entire error, I’ll do it when I’m back on the computer.

@reta can you successfully run ./gradlew build and assemble on windows all the way? I also think we’re defaulting to building centos packages but otherwise that’s all I know to be a problem

@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

I'm getting an obscure docker compose finished with an exit code 17, and a "not implemented" on stderr.

2021-10-22T17:22:24.908+0000 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe''
2021-10-22T17:22:24.908+0000 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
2021-10-22T17:22:26.289+0000 [ERROR] [system.err] not implemented
2021-10-22T17:22:26.333+0000 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
2021-10-22T17:22:26.333+0000 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe'' finished with exit value 17 (state: FAILED)

it's coming from docker-compose itself

./docker-compose -f ./test/fixtures/azure-fixture/docker-compose.yml up
not implemented

https://forums.docker.com/t/docker-compose-up-returns-not-implemented-what-worng/111914/14 says to run docker-compose disable-v2 which gets me further.

@reta
Copy link
Collaborator

reta commented Oct 22, 2021

Hm .... no, I don't see that, very weird .... the ./gradlew build & ./gradlew assemble do fail for me, but for different reasons:

$ ./gradlew build
> Task :build-tools:integTest FAILED

(symbolic link tests)

$ ./gradlew assemble

> Task :distribution:archives:buildLinuxArm64Tar FAILED
> Task :distribution:archives:buildLinuxTar FAILED

Which is related to #1406

@reta
Copy link
Collaborator

reta commented Oct 22, 2021

Just saw it, #1425, so it explains why it fails for you (Docker Desktop 4.x) and not for me (Docker Desktop 3.6.x).

@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

Let's move the discussion to #1425.

@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

So let's assume I solve my docker issue ...

$ ./gradlew assemble

> Task :distribution:archives:buildLinuxArm64Tar FAILED
> Task :distribution:archives:buildLinuxTar FAILED

Shouldn't it be building Windows stuff here, i.e. buildWindowsZip?

@reta
Copy link
Collaborator

reta commented Oct 22, 2021

Exactly, this is what I would have expected, looking why

@reta
Copy link
Collaborator

reta commented Oct 22, 2021

So let's assume I solve my docker issue ...

$ ./gradlew assemble

> Task :distribution:archives:buildLinuxArm64Tar FAILED
> Task :distribution:archives:buildLinuxTar FAILED

Shouldn't it be building Windows stuff here, i.e. buildWindowsZip?

@dblock it seems like we always build all distributions but we run into #1430

@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

@dblock it seems like we always build all distributions but we run into #1430

Alright, I think we should leave it as is. I'll comment in 1430.

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.

4 participants