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

Enable ./gradlew build on MacOS (M1) by loudly disabling bwc tests. #7303

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

dblock
Copy link
Member

@dblock dblock commented Apr 25, 2023

Description

Loudly disables bwc tests when running build on Mac. If we wanted to support a proper Mac distribution we would need to produce bwc artifacts for testing, which I believe means making a manual build once to get bootstrapped, then we would get rid of the > Project :qa:full-cluster-restart declares a dependency from configuration 'opensearch_distro_extracted_testclusters-qa-full-cluster-restart-v2.1.1-1-2.1.1-' to configuration 'expanded-darwin-arm64-tar' which is not declared in the descriptor for project :distribution:bwc:bugfix. error.

$ ./gradlew build
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true

> Configure project :
========================= WARNING =========================
         Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/4173
===========================================================
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.1.1
  OS Info               : Mac OS X 13.3.1 (aarch64)
  JDK Version           : 17 (Eclipse Temurin JDK)
  JAVA_HOME             : /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
  Random Testing Seed   : 8ACEB97ECBC4774
  In FIPS 140 mode      : false
=======================================

Issues Resolved

Closes #4173.

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.

@dblock dblock changed the title Enabled ./gradlew build on MacOS M1 w/o bwc tests. Enable ./gradlew build on MacOS (M1) by loudly disabling bwc tests. Apr 25, 2023
@dblock
Copy link
Member Author

dblock commented Apr 25, 2023

Note that on my M1 the docker setup is failing (read-only filesystem?) so this test fails.

$ ./gradlew :test:fixtures:krb5kdc-fixture:composeBuild
Picked up JAVA_TOOL_OPTIONS: -Dlog4j2.formatMsgNoLookups=true

> Configure project :
========================= WARNING =========================
         Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/4173
===========================================================
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.1.1
  OS Info               : Mac OS X 13.3.1 (aarch64)
  JDK Version           : 17 (Eclipse Temurin JDK)
  JAVA_HOME             : /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
  Random Testing Seed   : 26B668E852A6EAB6
  In FIPS 140 mode      : false
=======================================

> Task :test:fixtures:krb5kdc-fixture:composeBuild FAILED
Building peppa
#1 [internal] load build definition from Dockerfile
#1 sha256:8489cf676829bff26128ffe41230e0d09b927f72ea87a138dfcaf40baa3864ae
#1 transferring dockerfile: 37B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:649973d0732ff8280734494086b04a253657ea2717370c074f6bd150bc687e88
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/ubuntu:14.04
#3 sha256:9e293e85f130981a3ff23c0658e3319e768f1ce9460fa01765c10016dbaee053
#3 DONE 0.2s

#10 [1/6] FROM docker.io/library/ubuntu:14.04@sha256:64483f3496c1373bfd55348e88694d1c4d0c9b660dee6bfef5e12f43b9933b30
#10 sha256:63abd81037383fc3a2d7c0eac3052f5b3230f96b940eea4f4a095109d9f584b0
#10 DONE 0.0s

#6 [internal] load build context
#6 sha256:9788a83dac7432b8f877bedb0efd0127a11ab13b8b606c87bbd8f43453954e8f
#6 transferring context: 848B done
#6 DONE 0.0s

#4 [2/6] RUN apt update -y
#4 sha256:9cf6ab37d1fea64b6e61fbfe4d24ee1323d1e5379dc00950a5e58f1c4390351d
#4 CACHED

#5 [3/6] RUN apt upgrade -y
#5 sha256:289d7273b81c46ed67472e64e812eb9eeb55ec98c5b6c6ceb2666b035200111b
#5 CACHED

#7 [4/6] ADD . /fixture
#7 sha256:710ea668fe573635b0470ba9f38c15e229b700785059e2c64f2d2ecbcef3b56b
#7 CACHED

#8 [5/6] RUN echo kerberos.build.opensearch.org > /etc/hostname && echo "127.0.0.1 kerberos.build.opensearch.org" >> /etc/hosts
#8 sha256:6a1fcf42ec1e736788f0b7d63fb627be67cd26d56173e1bd1617b479d46cdfd7
#8 0.176 /bin/sh: 1: cannot create /etc/hosts: Read-only file system
#8 ERROR: executor failed running [/bin/sh -c echo kerberos.build.opensearch.org > /etc/hostname && echo "127.0.0.1 kerberos.build.opensearch.org" >> /etc/hosts]: exit code: 2
------
 > [5/6] RUN echo kerberos.build.opensearch.org > /etc/hostname && echo "127.0.0.1 kerberos.build.opensearch.org" >> /etc/hosts:
------
executor failed running [/bin/sh -c echo kerberos.build.opensearch.org > /etc/hostname && echo "127.0.0.1 kerberos.build.opensearch.org" >> /etc/hosts]: exit code: 2
Service 'peppa' failed to build : Build failed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test:fixtures:krb5kdc-fixture:composeBuild'.
> Exit-code 1 when calling /usr/local/bin/docker-compose, stdout: 

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
9 actionable tasks: 1 executed, 8 up-to-date

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2023

Codecov Report

Merging #7303 (d314d15) into main (dd05edd) will decrease coverage by 0.06%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #7303      +/-   ##
============================================
- Coverage     70.64%   70.59%   -0.06%     
+ Complexity    59512    59507       -5     
============================================
  Files          4862     4862              
  Lines        285544   285544              
  Branches      41153    41153              
============================================
- Hits         201725   201566     -159     
- Misses        67202    67428     +226     
+ Partials      16617    16550      -67     

see 494 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.repositories.s3.S3BlobStoreRepositoryTests.testSnapshotAndRestore

build.gradle Outdated Show resolved Hide resolved
Signed-off-by: dblock <dblock@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationAllocationIT.testSingleIndexShardAllocation

@dblock dblock merged commit 77f6d13 into opensearch-project:main Apr 26, 2023
@dblock dblock deleted the darwin-m1 branch April 26, 2023 20:26
@dblock dblock added the backport 2.x Backport to 2.x branch label Apr 26, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7303-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 77f6d1353d9adfa54f440811867c056c48672ab3
# Push it to GitHub
git push --set-upstream origin backport/backport-7303-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-7303-to-2.x.

austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Apr 28, 2023
@dblock
Copy link
Member Author

dblock commented Apr 28, 2023

I am not going to bother manually backporting it to 2.x, but if someone wants to, please do!

@r1walz
Copy link
Contributor

r1walz commented Jul 18, 2023

Chasing Read-only filesystem ERROR above in issue #8761.

shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…t#7303)

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Project build is failing on Mac M1
5 participants