[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.481 s - in org.tensorflow.framework.metrics.RecallAtPrecisionTest
[INFO] Running org.tensorflow.framework.metrics.FalseNegativesTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.417 s - in org.tensorflow.framework.metrics.FalseNegativesTest
[INFO] Running org.tensorflow.framework.metrics.SquaredHingeTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.33 s - in org.tensorflow.framework.metrics.SquaredHingeTest
[INFO] Running org.tensorflow.framework.losses.KLDivergenceTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.354 s - in org.tensorflow.framework.losses.KLDivergenceTest
[INFO] Running org.tensorflow.framework.losses.BinaryCrossentropyTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.394 s - in org.tensorflow.framework.losses.BinaryCrossentropyTest
[INFO] Running org.tensorflow.framework.losses.SparseCategoricalCrossentropyTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.398 s - in org.tensorflow.framework.losses.SparseCategoricalCrossentropyTest
[INFO] Running org.tensorflow.framework.losses.LogCoshTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.344 s - in org.tensorflow.framework.losses.LogCoshTest
[INFO] Running org.tensorflow.framework.losses.MeanAbsolutePercentageErrorTest
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.371 s - in org.tensorflow.framework.losses.MeanAbsolutePercentageErrorTest
[INFO] Running org.tensorflow.framework.losses.MeanAbsoluteErrorTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.351 s - in org.tensorflow.framework.losses.MeanAbsoluteErrorTest
[INFO] Running org.tensorflow.framework.losses.MeanSquaredLogarithmicErrorTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.351 s - in org.tensorflow.framework.losses.MeanSquaredLogarithmicErrorTest
[INFO] Running org.tensorflow.framework.losses.CategoricalCrossentropyTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.406 s - in org.tensorflow.framework.losses.CategoricalCrossentropyTest
[INFO] Running org.tensorflow.framework.losses.CategoricalHingeTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.365 s - in org.tensorflow.framework.losses.CategoricalHingeTest
[INFO] Running org.tensorflow.framework.losses.HingeTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.391 s - in org.tensorflow.framework.losses.HingeTest
[INFO] Running org.tensorflow.framework.losses.PoissonTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.346 s - in org.tensorflow.framework.losses.PoissonTest
[INFO] Running org.tensorflow.framework.losses.MeanSquaredErrorTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.35 s - in org.tensorflow.framework.losses.MeanSquaredErrorTest
[INFO] Running org.tensorflow.framework.losses.CosineSimilarityTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.382 s - in org.tensorflow.framework.losses.CosineSimilarityTest
[INFO] Running org.tensorflow.framework.losses.HuberTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.357 s - in org.tensorflow.framework.losses.HuberTest
[INFO] Running org.tensorflow.framework.losses.SquaredHingeTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.392 s - in org.tensorflow.framework.losses.SquaredHingeTest
[INFO] Running org.tensorflow.framework.constraints.NonNegTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.293 s - in org.tensorflow.framework.constraints.NonNegTest
[INFO] Running org.tensorflow.framework.constraints.MinMaxNormTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.334 s - in org.tensorflow.framework.constraints.MinMaxNormTest
[INFO] Running org.tensorflow.framework.constraints.MaxNormTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.364 s - in org.tensorflow.framework.constraints.MaxNormTest
[INFO] Running org.tensorflow.framework.constraints.UnitNormTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.333 s - in org.tensorflow.framework.constraints.UnitNormTest
[INFO] Running org.tensorflow.framework.op.SetOpsTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.379 s - in org.tensorflow.framework.op.SetOpsTest
[INFO] Running org.tensorflow.framework.op.NnOpsTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.317 s - in org.tensorflow.framework.op.NnOpsTest
[INFO] Running org.tensorflow.framework.op.MathOpsTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.422 s - in org.tensorflow.framework.op.MathOpsTest
[INFO] Running org.tensorflow.framework.op.LinalgOpsTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.315 s - in org.tensorflow.framework.op.LinalgOpsTest
[INFO] Running org.tensorflow.framework.optimizers.AdaDeltaTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.469 s - in org.tensorflow.framework.optimizers.AdaDeltaTest
[INFO] Running org.tensorflow.framework.optimizers.OptimizersTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.263 s - in org.tensorflow.framework.optimizers.OptimizersTest
[INFO] Running org.tensorflow.framework.optimizers.FtrlTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.348 s - in org.tensorflow.framework.optimizers.FtrlTest
[INFO] Running org.tensorflow.framework.optimizers.AdamTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.307 s - in org.tensorflow.framework.optimizers.AdamTest
[INFO] Running org.tensorflow.framework.optimizers.GradientDescentTest
[WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.307 s - in org.tensorflow.framework.optimizers.GradientDescentTest
[INFO] Running org.tensorflow.framework.optimizers.NadamTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.37 s - in org.tensorflow.framework.optimizers.NadamTest
[INFO] Running org.tensorflow.framework.optimizers.AdamaxTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.324 s - in org.tensorflow.framework.optimizers.AdamaxTest
[INFO] Running org.tensorflow.framework.optimizers.AdaGradTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.323 s - in org.tensorflow.framework.optimizers.AdaGradTest
[INFO] Running org.tensorflow.framework.optimizers.MomentumTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.327 s - in org.tensorflow.framework.optimizers.MomentumTest
[INFO] Running org.tensorflow.framework.optimizers.AdaGradDATest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.317 s - in org.tensorflow.framework.optimizers.AdaGradDATest
[INFO] Running org.tensorflow.framework.optimizers.RMSPropTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.432 s - in org.tensorflow.framework.optimizers.RMSPropTest
[INFO] Running org.tensorflow.framework.regularizers.L2Test
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.315 s - in org.tensorflow.framework.regularizers.L2Test
[INFO] Running org.tensorflow.framework.regularizers.L1L2Test
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.337 s - in org.tensorflow.framework.regularizers.L1L2Test
[INFO] Running org.tensorflow.framework.regularizers.RegularizerLossTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.299 s - in org.tensorflow.framework.regularizers.RegularizerLossTest
[INFO] Running org.tensorflow.framework.regularizers.L1Test
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.337 s - in org.tensorflow.framework.regularizers.L1Test
[INFO] Running org.tensorflow.framework.data.SkipDatasetTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.292 s - in org.tensorflow.framework.data.SkipDatasetTest
[INFO] Running org.tensorflow.framework.data.MapDatasetTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.286 s - in org.tensorflow.framework.data.MapDatasetTest
[INFO] Running org.tensorflow.framework.data.DatasetIteratorTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.316 s - in org.tensorflow.framework.data.DatasetIteratorTest
[INFO] Running org.tensorflow.framework.data.TakeDatasetTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.269 s - in org.tensorflow.framework.data.TakeDatasetTest
[INFO] Running org.tensorflow.framework.data.BatchDatasetTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.312 s - in org.tensorflow.framework.data.BatchDatasetTest
[INFO] Running org.tensorflow.framework.initializers.OnesTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.347 s - in org.tensorflow.framework.initializers.OnesTest
[INFO] Running org.tensorflow.framework.initializers.RandomUniformTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.298 s - in org.tensorflow.framework.initializers.RandomUniformTest
[INFO] Running org.tensorflow.framework.initializers.GlorotTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.318 s - in org.tensorflow.framework.initializers.GlorotTest
[INFO] Running org.tensorflow.framework.initializers.IdentityTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.329 s - in org.tensorflow.framework.initializers.IdentityTest
[INFO] Running org.tensorflow.framework.initializers.ConstantTest
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.337 s - in org.tensorflow.framework.initializers.ConstantTest
[INFO] Running org.tensorflow.framework.initializers.ZerosTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.342 s - in org.tensorflow.framework.initializers.ZerosTest
[INFO] Running org.tensorflow.framework.initializers.RandomNormalTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.309 s - in org.tensorflow.framework.initializers.RandomNormalTest
[INFO] Running org.tensorflow.framework.initializers.TruncatedNormalTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.346 s - in org.tensorflow.framework.initializers.TruncatedNormalTest
[INFO] Running org.tensorflow.framework.initializers.HeTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.344 s - in org.tensorflow.framework.initializers.HeTest
[INFO] Running org.tensorflow.framework.initializers.VarianceScalingTest
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.331 s - in org.tensorflow.framework.initializers.VarianceScalingTest
[INFO] Running org.tensorflow.framework.initializers.LeCunTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.342 s - in org.tensorflow.framework.initializers.LeCunTest
[INFO] Running org.tensorflow.framework.initializers.OrthogonalTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.336 s - in org.tensorflow.framework.initializers.OrthogonalTest
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 498, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ tensorflow-framework ---
[INFO] Building jar: /Users/ducha/Workspace/tf_build/tensorflow-java/tensorflow-framework/target/tensorflow-framework-0.4.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ tensorflow-framework ---
[INFO] Skipping source per configuration.
[INFO]
[INFO] --- maven-javadoc-plugin:3.2.0:jar (attach-javadocs) @ tensorflow-framework ---
[INFO] Skipping javadoc generation
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for TensorFlow Java Parent 0.4.0-SNAPSHOT:
[INFO]
[INFO] TensorFlow Java Parent ............................. SUCCESS [  0.644 s]
[INFO] TensorFlow Core Parent ............................. SUCCESS [  0.005 s]
[INFO] TensorFlow Core Generators ......................... SUCCESS [  0.461 s]
[INFO] TensorFlow Core API Library ........................ SUCCESS [01:13 min]
[INFO] TensorFlow Core API Library Platform ............... SUCCESS [01:22 min]
[INFO] TensorFlow Framework Library ....................... SUCCESS [03:36 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:13 min
[INFO] Finished at: 2021-11-16T17:12:51+01:00
[INFO] ------------------------------------------------------------------------

@Craigacp I am not sure what I am missing here:
(base) kgoderis@Karels-M1-MacBook-Pro craig % java -version
openjdk version **"11.0.13"** 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
(base) kgoderis@Karels-M1-MacBook-Pro craig % sudo mvn clean  package
Password:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] TensorFlow Java Parent                                             [pom]
[INFO] TensorFlow Core Parent                                             [pom]
[INFO] TensorFlow Core Generators                                         [jar]
[INFO] TensorFlow Core API Library                                        [jar]
[INFO] TensorFlow Core API Library Platform                               [jar]
[INFO] TensorFlow Framework Library                                       [jar]
[INFO]
[INFO] -------------------< org.tensorflow:tensorflow-java >-------------------
[INFO] Building TensorFlow Java Parent 0.4.0-SNAPSHOT                     [1/6]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tensorflow-java ---
[INFO]
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ tensorflow-java ---
[INFO] Skipping source per configuration.
[INFO]
[INFO] --- maven-javadoc-plugin:3.2.0:jar (attach-javadocs) @ tensorflow-java ---
[INFO] Skipping javadoc generation
[INFO]
[INFO] -------------------< org.tensorflow:tensorflow-core >-------------------
[INFO] Building TensorFlow Core Parent 0.4.0-SNAPSHOT                     [2/6]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tensorflow-core ---
[INFO]
[INFO] --- maven-source-plugin:3.2.1:jar-no-fork (attach-sources) @ tensorflow-core ---
[INFO] Skipping source per configuration.
[INFO]
[INFO] --- maven-javadoc-plugin:3.2.0:jar (attach-javadocs) @ tensorflow-core ---
[INFO] Skipping javadoc generation
[INFO]
[INFO] --------------< org.tensorflow:tensorflow-core-generator >--------------
[INFO] Building TensorFlow Core Generators 0.4.0-SNAPSHOT                 [3/6]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tensorflow-core-generator ---
[INFO] Deleting /Users/kgoderis/Development/craig/tensorflow-core/tensorflow-core-generator/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tensorflow-core-generator ---
[INFO] Using 'UTF8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/kgoderis/Development/craig/tensorflow-core/tensorflow-core-generator/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ tensorflow-core-generator ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 43 source files to /Users/kgoderis/Development/craig/tensorflow-core/tensorflow-core-generator/target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] [options] bootstrap class path not set in conjunction with -source 8
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/kgoderis/Development/craig/tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/op/generator/javadoc/JavaDocRenderer.java:[47,7] error: An unhandled exception was thrown by the Error Prone static analysis plugin.
     Please report this at https://github.com/google/error-prone/issues/new and include the following:

     error-prone version: 2.6.0
     BugPattern: JavaLangClash
     Stack Trace:
     java.lang.NoSuchMethodError: 'java.lang.Iterable com.sun.tools.javac.code.Scope$WriteableScope.getSymbolsByName(com.sun.tools.javac.util.Name, com.sun.tools.javac.util.Filter)'
  	at com.google.errorprone.bugpatterns.JavaLangClash.check(JavaLangClash.java:66)
  	at com.google.errorprone.bugpatterns.JavaLangClash.matchClass(JavaLangClash.java:53)
  	at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:450)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:548)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:151)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:860)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
  	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
  	at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:152)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:561)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:151)
  	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:614)
  	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
  	at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
  	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
  	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341)
  	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:317)
  	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
  	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
  	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
[INFO] 1 error

@kgoderis  Running sudo mvn package runs maven as root with a different environment, where I assume it's picking up Java 17 by default. For example on my machine where I have JAVA_HOME set to Zulu 11, when running maven as root it pulls in Java 17 as that's my system wide default:
$ mvn --version
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: /opt/homebrew/Cellar/maven/3.8.3/libexec
Java version: 11.0.10, vendor: Azul Systems, Inc., runtime: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "12.0.1", arch: "aarch64", family: "mac"
$ sudo mvn --version
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: /opt/homebrew/Cellar/maven/3.8.3/libexec
Java version: 17, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/17/libexec/openjdk.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "12.0.1", arch: "aarch64", family: "mac"

Running as root can also cause Python issues as for some reason the TF native library build requires numpy. In my branch I modified build.sh to only run bazel as root, along with a few chmods and lns to make everything line up. Before we merge this into master we need to remove those as we shouldn't encourage people to run the build as root.

Hi everyone,
I am also currently trying to build the module on my Apple silicon machine (0.4.0-SNAPSHOT with Zulu SDK 11 on macOS Monterey).
I was able to compile it (however quite messily and independently from @Craigacp's changes) and for me it passes the tests.
Checking out Adam's fork and compiling it works for me too. @kgoderis I'm sorry that I can't help you, I had completely different issues when trying to build it.
It has many warnings though. The following types of warnings were logged:
FloatingPointLiteralPrecision
ImmutableEnumChecker
InvalidParam
MissingOverride
MissingSummary
UnusedVariable
cast
options
rawtypes
serial
unchecked

@DevinTDHa Error-prone does flag a bunch of issues with TF-Java, some of which are due to the generated protobuf code which we can't change, and others are things that we will fix eventually but haven't got to yet.

When inspecting the jars, it was missing some dependencies like org.tensorflow.ndarray and com.google.protobuf (potentially more). This applies to the jars resulting from Adams fork as well.
My question is: do you think that this will be a problem going forward? Or might this be another setup environment issue?
For the missing org.tensorflow.ndarray I had to compile it on my machine and add it manually. I believe com.google.protobuf might not have jars for apple silicon either for version < 3.18, so might need to be compiled locally as well. I haven't checked which other dependencies are missing.

Those jars won't be built as part of the TF-Java build process, they should be pulled in by Maven if you depend on TF-Java, so it's expected that they aren't present in our build. TF-Java doesn't build a with-dependencies jar, but if you want one then it's fairly easy to make. Protobuf-java is purely Java, there is no native library in it, so the jar file on Maven Central will work just fine on Apple Silicon. tensorflow-ndarray is also pure Java without a native library, so that shouldn't be an issue either.

@Craigacp Thanks for pointing out sudo java --version. Indeed, I have Java 15 in that environment

What is the current status for this?
Is there anything we (community) can help to make it work on M1?
Our use case is that we need to be unblocked to develop ML Inference on M1 machines. We don't currently need to Train ML models with tensorflow-java (we use Python for that, which already works with M1).

Using the branch I mentioned above it should compile and produce macos-arm64 jars. I'll respin the branch for the 0.4.0 release at some point this week as it's currently targeting TF 2.6.0, and 0.4.0 ships with TF 2.7.
We can't provide binaries until there is some build support in Github Actions for it, or we figure out cross compiling from a macOS x86_64 environment.
If you can figure out why it requires sudo to build the TF native library, and how we can convert it into a regular user build then that will help get it merged into master as we can't require that the build runs as root. It's something to do with how XCode is configured, but I've not had enough time to figure it out yet.

Using the branch I mentioned above it should compile and produce macos-arm64 jars

Ok, thanks, I'll try to build it in that branch and report here if I had a success or failure (to hopefully help others do the same).

Hello Everyone,
For anyone who might need it, I uploaded the compiled jars for myself here:
https://github.com/DevinTDHa/precompiled-tf-jni-m1
Hope it might be useful to someone else as well.

I am having an issue with your jars @DevinTDHa see [here](https://github.com/DevinTDHa/precompiled-tf-jni-m1/issues/1)

Hi @Craigacp,
I have a question regarding this issue. I tried to keep up to date with the releases and was able to compile it with the help of you branch so far, up to version 0.4.1.
Updating to 0.4.2 I am running into some issues and I was not able to figure it out yet.
The branch I am working on is the following:
https://github.com/DevinTDHa/tensorflow-java/tree/apple-silicon-0.4.2-shaded
The compilation runs fine until the Exporting Ops stage in the build.sh file.
The following error occurs:
[INFO] --- javacpp:1.5.6:build (javacpp-validate) @ tensorflow-core-api ---
[INFO] Detected platform "macosx-arm64"
[INFO] Building platform "macosx-arm64"
[INFO]
[INFO] --- javacpp:1.5.6:build (javacpp-build) @ tensorflow-core-api ---
[INFO] Detected platform "macosx-arm64"
[INFO] Building platform "macosx-arm64"
[INFO] bash /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/build.sh
Password:
INFO: Invocation ID: 627f0e51-b286-4d5c-b950-ac564b5c7318
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=156
INFO: Reading rc options for 'build' from /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/.bazelrc:
  'build' options: --remote_cache=https://storage.googleapis.com/tensorflow-sigs-jvm --remote_upload_local_results=false --incompatible_restrict_string_escapes=false
INFO: Reading rc options for 'build' from /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc:
  'build' options: --define framework_shared_object=true --java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --host_java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/fallback,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:macos_arm64 in file /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc: --cpu=darwin_arm64 --host_cpu=darwin_arm64
INFO: Found applicable config definition build:macos in file /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/tensorflow.bazelrc: --apple_platform_type=macos --copt=-DGRPC_BAZEL_BUILD --copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
INFO: Analyzed 6 targets (0 packages loaded, 0 targets configured).
INFO: Found 6 targets...
INFO: Elapsed time: 0.477s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Listing /Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/bazel-bin/external/org_tensorflow/tensorflow:
total 837800
drwxr-xr-x  28 root   wheel        896 Nov 24 19:14 c
drwxr-xr-x  76 root   wheel       2432 Nov 24 18:55 cc
drwxr-xr-x   6 root   wheel        192 Nov 24 11:55 compiler
drwxr-xr-x  28 root   wheel        896 Nov 24 18:44 core
-r-xr-xr-x   1 ducha  wheel  402496848 Nov 24 19:18 libtensorflow_cc.2.7.4.dylib
-r-xr-xr-x   1 root   wheel     179888 Nov 24 13:19 libtensorflow_cc.2.7.4.dylib-2.params
lrwxr-xr-x   1 root   wheel         28 Nov 25 14:47 libtensorflow_cc.2.dylib -> libtensorflow_cc.2.7.4.dylib
lrwxr-xr-x   1 root   wheel         28 Nov 25 14:47 libtensorflow_cc.dylib -> libtensorflow_cc.2.7.4.dylib
-r-xr-xr-x   1 root   wheel   26219836 Nov 24 19:10 libtensorflow_framework.2.7.4.dylib
-r-xr-xr-x   1 root   wheel      51689 Nov 24 13:51 libtensorflow_framework.2.7.4.dylib-2.params
lrwxr-xr-x   1 root   wheel         35 Nov 24 19:10 libtensorflow_framework.2.dylib -> libtensorflow_framework.2.7.4.dylib
lrwxr-xr-x   1 root   wheel         31 Nov 24 19:10 libtensorflow_framework.dylib -> libtensorflow_framework.2.dylib
drwxr-xr-x   3 root   wheel         96 Nov 24 12:37 lite
drwxr-xr-x  53 root   wheel       1696 Nov 24 18:52 stream_executor
drwxr-xr-x   4 root   wheel        128 Nov 24 12:37 tools
Exporting Ops
2022-11-25 14:47:09.892464: F src/bazel/op_generator/op_export_main.cc:121] Non-OK-status: env->LoadDynamicLibrary(argv[1], &ops_libs_handles[0]) status: NOT_FOUND: dlopen(/Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/bazel-bin/external/org_tensorflow/tensorflow/libtensorflow_cc.2.7.4.dylib, 0x0006): malformed trie child, cycle to nodeOffset=0x3
weak-def symbol not found (__ZGVZN10tensorflow13Divide16x8PowILi7EEE17__simd128_int16_tS1_E9FIRST_BIT)
/Users/ducha/Workspace/Building/tensorflow-java/tensorflow-core/tensorflow-core-api/build.sh: line 106: 94731 Abort trap: 6           $BAZEL_BIN/java_op_exporter $TENSORFLOW_LIB $GEN_RESOURCE_DIR/ops.pb $GEN_RESOURCE_DIR/ops.pbtxt $BAZEL_SRCS/external/org_tensorflow/tensorflow/core/api_def/base_api src/bazel/api_def

I tried to skip the op-export but this also resulted in an error, that TARGET_OS_IPHONE was not defined (and indeed it isn't in the code) in tensorflow-java/tensorflow-core/tensorflow-core-api/target/native/org/tensorflow/internal/c_api/macosx-arm64/jnijavacpp.cpp.
I am not entirely sure what would cause this issue. I am using llvm@11 from homebrew and bazelisk for this process.

I am not entirely sure what would cause this issue. I am using llvm@11 from homebrew and bazelisk for this process.

Please update to JavaCPP 1.5.8 in that case, see https://github.com/bytedeco/javacpp/issues/609

The compilation runs fine until the Exporting Ops stage in the build.sh file.

I just found out that the Export Ops step in general doesn't work on my system anymore. Seems like something broke after one of the auto-updates for Xcode?

We're also hitting this in our local builds, not figured out what's going on yet.

@Craigacp
I was able to resolve it by downgrading command line tools and Xcode to version 13.1.6! Goes through like before.

 I've been trying to build TF 2.10 on my M1 for awhile and was blocked by this malformed trie error as well. Looks like downgrading Xcode from 14.x to 13.x did the job!
Other than that, building 2.10 is pretty straightforward and I've fixed also how the op exporter is linking to TF. I would like to update TF-Java repo so that the latest snapshot can be easily build on M1 machines. @saudet , I've also updated JavaCPP to 1.5.8. Still, I'm facing some new problems that don't seem related to M1 this time but maybe more on 2.10, I'll take a look later but any advice from you would be more than welcome:
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/native/org/tensorflow/internal/c_api/macosx-arm64/jnitensorflow.cpp:3380:47: error: no matching constructor for initialization of 'SpanAdapter<tensorflow::SourceLocation>'
    SpanAdapter< tensorflow::SourceLocation > radapter(ptr->GetSourceLocations());
                                              ^        ~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/classes/org/tensorflow/internal/c_api/include/tensorflow_adapters.h:19:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'absl::Span<const SourceLocation>' to 'const SpanAdapter<tensorflow::SourceLocation>' for 1st argument
template<typename T> class SpanAdapter {
                           ^
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/classes/org/tensorflow/internal/c_api/include/tensorflow_adapters.h:19:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'absl::Span<const SourceLocation>' to 'SpanAdapter<tensorflow::SourceLocation>' for 1st argument
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/classes/org/tensorflow/internal/c_api/include/tensorflow_adapters.h:23:5: note: candidate constructor not viable: no known conversion from 'Span<const tensorflow::SourceLocation>' to 'const Span<tensorflow::SourceLocation>' for 1st argument
    SpanAdapter(const Span<T>& arr) : ptr(0), size(0), owner(0), arr2(arr), arr(arr2) { }
    ^
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/classes/org/tensorflow/internal/c_api/include/tensorflow_adapters.h:24:5: note: candidate constructor not viable: no known conversion from 'absl::Span<const SourceLocation>' to 'Span<tensorflow::SourceLocation> &' for 1st argument
    SpanAdapter(      Span<T>& arr) : ptr(0), size(0), owner(0), arr(arr) { }
    ^
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/classes/org/tensorflow/internal/c_api/include/tensorflow_adapters.h:25:5: note: candidate constructor not viable: no known conversion from 'absl::Span<const SourceLocation>' to 'const Span<tensorflow::SourceLocation> *' for 1st argument
    SpanAdapter(const Span<T>* arr) : ptr(0), size(0), owner(0), arr(*(Span<T>*)arr) { }
    ^
/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/classes/org/tensorflow/internal/c_api/include/tensorflow_adapters.h:21:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided
    SpanAdapter(T const * ptr, typename Span<T>::size_type size, void* owner) : ptr((T*)ptr), size(size), owner(owner),

Yeah, we should do version upgrades for TF Core separately. Put that in a branch and I'll take a look at it.

Based on that error message, something like this should fix that one though:
.put(new Info("absl::Span<const tensorflow::SourceLocation>").annotations("@Span")
                                                             .valueTypes("@Cast(\"const tensorflow::SourceLocation*\") SourceLocation")
                                                             .pointerTypes("SourceLocation"))

Based on that error message, something like this should fix that one though:
.put(new Info("absl::Span<const tensorflow::SourceLocation>").annotations("@Span")
                                                             .valueTypes("@Cast(\"const tensorflow::SourceLocation*\") SourceLocation")
                                                             .pointerTypes("SourceLocation"))

Yep, that did the trick, thanks! Still, hitting issues now when JavaCPP tries to load the libjnitensorflow library. JavaCPP fails with the following debug trace.
Debug: Locking /Users/klessard/.javacpp/cache before extracting
Debug: Extracting jar:file:/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar!/org/tensorflow/internal/c_api/macosx-arm64/libtensorflow_framework.2.dylib
Debug: Loading /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libtensorflow_framework.2.dylib
Debug: Locking /Users/klessard/.javacpp/cache before extracting
Debug: Extracting jar:file:/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar!/org/tensorflow/internal/c_api/macosx-arm64/libtensorflow_cc.2.dylib
Debug: Loading /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libtensorflow_cc.2.dylib
Debug: Locking /Users/klessard/.javacpp/cache before extracting
Debug: Extracting jar:file:/Users/klessard/Documents/Projects/ML/Sources/TensorFlow/tensorflow-java/tensorflow-core/tensorflow-core-api/target/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar!/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib
Debug: Loading /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib
Debug: Failed to load /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib: java.lang.UnsatisfiedLinkError: Can't load library: /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib
Debug: Loading library jnitensorflow
Debug: Failed to load for jnitensorflow: java.lang.UnsatisfiedLinkError: no jnitensorflow in java.library.path: [/Users/klessard/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
[ERROR] Tests run: 17, Failures: 0, Errors: 15, Skipped: 0, Time elapsed: 4.74 s <<< FAILURE! - in org.tensorflow.TensorTest
[ERROR] org.tensorflow.TensorTest.createFromBufferWithNonNativeByteOrder  Time elapsed: 4.698 s  <<< ERROR!
java.lang.UnsatisfiedLinkError: no jnitensorflow in java.library.path: [/Users/klessard/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
	at org.tensorflow.TensorTest.createFromBufferWithNonNativeByteOrder(TensorTest.java:134)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib
	at org.tensorflow.TensorTest.createFromBufferWithNonNativeByteOrder(TensorTest.java:134)

The JNI library is there and looks ok, here's the output of its otool -L:
/Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib:
	libjnitensorflow.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libtensorflow_cc.2.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)

I'll try to debug that but I've pushed too a temporary branch with my actual code, so if you are interested to give it a try @saudet . Don't forget that only works apparently on Xcode CL Tools 13.x, which might require to downgrade

Also if I understand JavaCPP debug traces correctly, TF cc and framework libraries have been loaded correctly:
Debug: Loading /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libtensorflow_framework.2.dylib
Debug: Loading /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libtensorflow_cc.2.dylib
Debug: Loading /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib
Debug: Failed to load /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib: java.lang.UnsatisfiedLinkError: Can't load library: /Users/klessard/.javacpp/cache/tensorflow-core-api-0.5.0-SNAPSHOT-macosx-arm64.jar/org/tensorflow/internal/c_api/macosx-arm64/libjnitensorflow.dylib
Debug: Loading library jnitensorflow
Debug: Failed to load for jnitensorflow: java.lang.UnsatisfiedLinkError: no jnitensorflow in java.library.path: [/Users/klessard/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]

java.lang.UnsatisfiedLinkError: no jnitensorflow in java.library.path: [/Users/klessard/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]

@saudet , anymore guidance you can provide on this? I confirm that binaries build with Bazel (libtensorflow_framework and libtensorflow_cc) loads successfully when calling Java System.load() but the one compiled by JavaCPP (libjnitensorflow) does not... I don't know, am I the only having this issue?  -Wall -fPIC -pthread -dynamiclib -undefined dynamic_lookup \
-o libjnitensorflow.dylib \
-L/private/var/tmp/_bazel_klessard/a8a13bbdeba26dffed02fff40a88f8c2/execroot/tensorflow_core_api/bazel-out/darwin_arm64-opt/bin/external/org_tensorflow/tensorflow \
-Wl,-rpath,/private/var/tmp/_bazel_klessard/a8a13bbdeba26dffed02fff40a88f8c2/execroot/tensorflow_core_api/bazel-out/darwin_arm64-opt/bin/external/org_tensorflow/tensorflow \
-ltensorflow_cc

Or could it be related to that change? https://github.com/tensorflow/java/issues/394#issuecomment-1328144380

I don't know if that's relevant but these libraries have an extra flag MH_HAS_TLV_DESCRIPTORS on them using the previous otool command:

That seems to get added when there are thread local variables:
https://opensource.apple.com/source/dyld/dyld-239.3/src/threadLocalVariables.c.auto.html

Or could it be related to that change? https://github.com/tensorflow/java/issues/394#issuecomment-1328144380

No, I don't see how that's related?
Since I don't have such a Mac here, that's hard or me to debug, but many users are using other presets for Mac on ARM with no problems at all: https://github.com/bytedeco/javacpp-presets/issues/1069

Where does "-undefined dynamic_lookup" get added? You might want to remove that and see if any important looking symbols are missing.

Actually, I have absolutely no clue where that argument is coming from, the config of the JavaCPP task triggering this build is simply this:
            <id>javacpp-compiler</id>
            <phase>process-classes</phase>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/native/org/tensorflow/internal/c_api/${native.classifier}/</outputDirectory>
              <skip>${javacpp.compiler.skip}</skip>
              <classOrPackageName>org.tensorflow.internal.c_api.**</classOrPackageName>
              <copyLibs>true</copyLibs>
              <copyResources>true</copyResources>
            </configuration>

Ah, I was looking in the wrong place. JavaCPP adds it automatically so that it behaves more like Linux by default:
https://github.com/bytedeco/javacpp/blob/master/src/main/resources/org/bytedeco/javacpp/properties/macosx-arm64.properties
Try to manually rerun that clang++ ... command by copy/pasting without -undefined dynamic_lookup see if it complains.

Ok.... so removing fails to compile as it does not find a lot of the TF symbols, that can definitely explain it. Inspecting the TF binaries, I can notice that the missing symbols are those located in the libtensorflow_framework library. Looks like they are not being resolved transitively by just linking to libtensorflow_cc, even if it depends on it:
libtensorflow_cc.2.10.0.dylib:
	@rpath/libtensorflow_cc.2.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libtensorflow_framework.2.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
	/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.100.19)
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 60158.100.133)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)

If I add -ltensorflow_framework to the clang++ command, only one symbol remains unresolved, I'll need to investigate more one this one:
Undefined symbols for architecture arm64:
  "tensorflow::Node::RunForwardTypeInference()", referenced from:
      _Java_org_tensorflow_internal_c_1api_Node_RunForwardTypeInference in jnitensorflow-a42ccb.o

Doesn't look too important. Try to move<EMAIL_ADDRESS>from the "preload" list to "link" see if that works:
https://github.com/tensorflow/java/blob/master/tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java#L70

@kgoderis am I correct in understanding you got the build to work on M1 with Bazel? Would you be able to share that code?

Oh, good news everyone!!
So @saudet, effectively moving libtensorflow_framework from preload to link solved the linkage problem during compilation (btw, can I safely comment out what we currently have in the preload list since we don't support MKL anymore?)
Now, I also had to solve the remaining missing symbol "that didn't look too important" by skipping tensorflow::Node::RunForwardTypeInference from the JavaCPP preset, all tests are passing now!
... and that being said, I'm planning to push these changes to make the codebase in the TF Java repo compilable on M1 machines, and that also includes an upgrade to.... well, I was at 2.10.0 when I started but I should probably now upgrade to 2.11.0 😄
Just recalling that what @DevinTDHa said previously is still valid, we need to downgrade to Xcode 13.x to get this work until Apple fixes (hopefully) the "malformed trie" issue.
That's it, thanks everyone! I'll let you all know when that PR get merged.

So @saudet, effectively moving libtensorflow_framework from preload to link solved the linkage problem during compilation (btw, can I safely comment out what we currently have in the preload list since we don't support MKL anymore?)

Yes, those libraries are long deprecated, I don't think anyone uses them anymore.

Ok, I'll do that in a separate PR... one day 😅

Hey @karllessard, as per usual, thank you for your work on this project. I am wondering if there has been progress on apple silicon support for this project?
Also, I noticed https://github.com/tensorflow/java/actions/runs/7013329954 the other day, which gave me a glint of hope that maybe we'd get apple silicon support AND a bump to TF 2.15, a potent and exciting combination of wins. However, it's unclear if that was just testing for another purpose or testing with the intention of making a new release of this library. Hope you are well.

We're working on reducing the build process complexity and have added support for building macos arm64 jars locally without running bazel (so it's much simpler and likely to work without user intervention). It's not finished yet as we're hitting issues with Windows which either mean we need to still run a full bazel build on Windows, or we need to wait for Intel to fix the libtensorflow builds on Windows. We might merge it into master before then, but a release can't happen till we've figured out the Windows story. The branch where we're doing this work is running TF 2.15 and it'll either be that or 2.16 in the next release depending on the nature of the Windows fix.

Thanks @mattomatic , +1 to everything that Adam mentioned! I believe we'll get that merged soon (with or without Windows)

Yay, that's awesome, thanks for the update. I don't fall into the camp who require windows support so it's relieving to know that things seem to work aside from that.

Hey, I've come across the same issue and wasn't able to downgrade XCode because of the new MacOS version (which worked before). I don't have any experience with jni so I had no idea what to try next, but I had luck changing the JDK from an aarch64 version to a 32Bit one (Termurin 21 without the aarch64 tag) and now it works! I don't know why but it does, maybe that's interesting for someone with more knowledge or anyone with the same issue who needs a solution fast.

Using an x86 build of TF-Java on Apple Silicon is a bad idea. Apple didn't implement support for AVX vector instructions in Rosetta, so it will crash the JVM whenever it tries to use them. This can be hard to predict as some codepaths may have a fallback to non-vector instructions, but when you hit one it'll cause a SIGILL and take the whole JVM down.

TF-Java 1.0.0-rc1 has Apple Silicon binaries - https://github.com/tensorflow/java/releases/tag/v1.0.0-rc.1


Quic Support

What is your question?
Is there any update on possibly adding support for QUIC? And is there any documentation on how to use CertMagic within my own HTTP/3 listener?
Include any other information or discussion.
Same question was asked in 2019 but I was curious if there are any updates regarding this
https://github.com/caddyserver/certmagic/issues/42

What we do in Caddy is simply give the http3.Server the TLS config returned from CertMagic. (Same as you would an http.Server<EMAIL_ADDRESS>That's the basic idea, anyway.

Awesome, I figured that was the way but wasn't sure. Thanks for the quick response

quic* response :wink:


Push to private registry fails with BLOB_UNKNOWN v2.1.1

I have a private registry sitting behind a pair of nginx proxies. The first terminates the TLS, while the second simply routes any information between the registry (:443) and a separate docker container (:80). The config files for both, version info, and other relevant information is contained in the gist.
https://gist.github.com/caladbolg7/56488f65c108e5ae7ca1
I can curl to /v2/ and /v2/_catalog just fine, but any attempt at pushing to the registry ends in a single push then a 'blob upload unknown'. Personally, I'm not sure what exactly is happening, as I had this set up working initially with 2.0 around two weeks ago, but after retesting yesterday, I receive this error, regardless of version (2.0/2.0.1/2.1.0/2.1.1).
Currently, the private registry stores to the local file system.
Error log:
{"http.request.host":"--------------","http.request.id":"78a5be0a-5d9a-4d14-b4cb-36d56efda82b","http.request.method":"GET","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"authorizing request","service":"registry","time":"2015-08-26T14:43:02.08135772Z","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"78a5be0a-5d9a-4d14-b4cb-36d56efda82b","http.request.method":"GET","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","http.response.contenttype":"application/json; charset=utf-8","http.response.duration":"4.747105ms","http.response.status":200,"http.response.written":2,"instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"info","msg":"response completed","service":"registry","time":"2015-08-26T14:43:02.081767837Z","version":"v2.1.1"}
<IP_ADDRESS> - - [26/Aug/2015:14:43:02 +0000] "GET /v2/ HTTP/1.0" 200 2 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64"
{"http.request.host":"--------------","http.request.id":"f6ac44a9-d53e-40c2-ad27-3c590c964a7a","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"authorizing request","service":"registry","time":"2015-08-26T14:43:02.54730768Z","vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"f6ac44a9-d53e-40c2-ad27-3c590c964a7a","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"GetBlob","service":"registry","time":"2015-08-26T14:43:02.547555181Z","vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"f6ac44a9-d53e-40c2-ad27-3c590c964a7a","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"filesystem.GetContent(\"/docker/registry/v2/repositories/ubuntu2/_layers/sha256/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4/link\")","service":"registry","time":"2015-08-26T14:43:02.547881629Z","trace.duration":89812,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).GetContent","trace.id":"c8ef96a7-d0e9-445c-9c01-cc32c10c3da4","trace.line":55,"vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
{"err.code":"BLOB_UNKNOWN","err.detail":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","err.message":"blob unknown to registry","http.request.host":"--------------","http.request.id":"f6ac44a9-d53e-40c2-ad27-3c590c964a7a","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","http.response.contenttype":"application/json; charset=utf-8","http.response.duration":"4.199659ms","http.response.status":404,"http.response.written":157,"instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"error","msg":"response completed with error","service":"registry","time":"2015-08-26T14:43:02.548199108Z","vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
<IP_ADDRESS> - - [26/Aug/2015:14:43:02 +0000] "HEAD /v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 HTTP/1.0" 404 157 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64"
{"http.request.host":"--------------","http.request.id":"e041587f-c7c8-403a-a193-cbd0ae4b27a8","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"authorizing request","service":"registry","time":"2015-08-26T14:43:02.948769616Z","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"e041587f-c7c8-403a-a193-cbd0ae4b27a8","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"(*linkedBlobStore).Writer","service":"registry","time":"2015-08-26T14:43:02.949089633Z","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"e041587f-c7c8-403a-a193-cbd0ae4b27a8","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"filesystem.PutContent(\"/docker/registry/v2/repositories/ubuntu2/_uploads/072e3e64-1d82-421c-b7cd-c6f9be4c3fa4/startedat\")","service":"registry","time":"2015-08-26T14:43:02.950257626Z","trace.duration":914106,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent","trace.id":"8a59b089-6e54-4818-bd09-d13265c467fb","trace.line":67,"vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"e041587f-c7c8-403a-a193-cbd0ae4b27a8","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"debug","msg":"filesystem.Stat(\"/docker/registry/v2/repositories/ubuntu2/_uploads/072e3e64-1d82-421c-b7cd-c6f9be4c3fa4/data\")","service":"registry","time":"2015-08-26T14:43:02.950585909Z","trace.duration":50927,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat","trace.id":"a60c9f24-4afc-4342-a91a-00a5c8df567a","trace.line":111,"vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"--------------","http.request.id":"e041587f-c7c8-403a-a193-cbd0ae4b27a8","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","http.response.duration":"11.405644ms","http.response.status":202,"http.response.written":0,"instance.id":"4354d02c-5be5-45d4-a189-c1832b51daef","level":"info","msg":"response completed","service":"registry","time":"2015-08-26T14:43:02.954582117Z","version":"v2.1.1"}
<IP_ADDRESS> - - [26/Aug/2015:14:43:02 +0000] "POST /v2/ubuntu2/blobs/uploads/ HTTP/1.0" 202 0 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64"

I'm sure it's likely something I'm glossing over, but if there's any extra info I need to supply I'll get it as quickly as possible.
Thanks.

Is it working if you access your layer-2 nginx? Or directly the backend registry?
When it fails, can you copy your docker daemon logs output? (launched in debug mode with -D)
Thanks.

I see you are using your own registry image ("cf-registry").
Can you provide details about what's in there? Also, can you provide:

registry version: docker exec  registry -version
registry logs

As of now, cf-registry is basically a copy of registry:2.1.1.
Version: registry github.com/docker/distribution v2.1.1
Logs:
{"level":"debug","msg":"using \"json\" logging formatter","time":"2015-08-26T21:18:09.821610963Z"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"warning","msg":"No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable.","service":"registry","time":"2015-08-26T21:18:09.826673351Z","version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"info","msg":"redis not configured","service":"registry","time":"2015-08-26T21:18:09.826787005Z","version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"info","msg":"listening on [::]:5000","service":"registry","time":"2015-08-26T21:18:09.827034441Z","version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"info","msg":"Starting upload purge in 2m0s","service":"registry","time":"2015-08-26T21:18:09.827214429Z","version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:18:19.827644928Z","trace.duration":122072,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"cec88efd-d04b-48f9-af6f-ac31ab69b9f3","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:18:29.82772882Z","trace.duration":197430,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"58963d25-7b0a-47af-b891-35eb36bcd48f","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:18:39.827697945Z","trace.duration":200714,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"4b811ea0-73f0-44b5-808c-17fffd0df9ba","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:18:49.827682992Z","trace.duration":184451,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"9f80cbbe-8633-47af-b5cf-76010ea9502a","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:18:59.827662225Z","trace.duration":168832,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"85c13b19-0d53-415f-9eff-a915e4ee5a68","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:19:09.827687271Z","trace.duration":191433,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"b57041f2-4e98-42e2-8d93-acb7112e8d62","trace.line":123,"version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"cca7e90e-23a3-493c-972e-c78e06c44d3e","http.request.method":"GET","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"authorizing request","service":"registry","time":"2015-08-26T21:19:16.542094733Z","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"cca7e90e-23a3-493c-972e-c78e06c44d3e","http.request.method":"GET","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","http.response.contenttype":"application/json; charset=utf-8","http.response.duration":"5.7588ms","http.response.status":200,"http.response.written":2,"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"info","msg":"response completed","service":"registry","time":"2015-08-26T21:19:16.542432021Z","version":"v2.1.1"}
<IP_ADDRESS> - - [26/Aug/2015:21:19:16 +0000] "GET /v2/ HTTP/1.0" 200 2 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64"
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"b2c7360a-df1a-4f8e-9422-7c562f415253","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"authorizing request","service":"registry","time":"2015-08-26T21:19:16.931548168Z","vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"b2c7360a-df1a-4f8e-9422-7c562f415253","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"GetBlob","service":"registry","time":"2015-08-26T21:19:16.931883917Z","vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"b2c7360a-df1a-4f8e-9422-7c562f415253","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.GetContent(\"/docker/registry/v2/repositories/ubuntu2/_layers/sha256/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4/link\")","service":"registry","time":"2015-08-26T21:19:16.932317739Z","trace.duration":155744,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).GetContent","trace.id":"7beea316-9318-4e37-aef5-53bcd2e74c25","trace.line":55,"vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
{"err.code":"BLOB_UNKNOWN","err.detail":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","err.message":"blob unknown to registry","http.request.host":"ceca.codefast.geocent.com","http.request.id":"b2c7360a-df1a-4f8e-9422-7c562f415253","http.request.method":"HEAD","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","http.response.contenttype":"application/json; charset=utf-8","http.response.duration":"7.070528ms","http.response.status":404,"http.response.written":157,"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"error","msg":"response completed with error","service":"registry","time":"2015-08-26T21:19:16.932804709Z","vars.digest":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4","vars.name":"ubuntu2","version":"v2.1.1"}
<IP_ADDRESS> - - [26/Aug/2015:21:19:16 +0000] "HEAD /v2/ubuntu2/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 HTTP/1.0" 404 157 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64"
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"f9588c85-0550-44d6-9c6b-27b803fccdd5","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"authorizing request","service":"registry","time":"2015-08-26T21:19:17.317968232Z","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"f9588c85-0550-44d6-9c6b-27b803fccdd5","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"(*linkedBlobStore).Writer","service":"registry","time":"2015-08-26T21:19:17.318388199Z","vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"f9588c85-0550-44d6-9c6b-27b803fccdd5","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.PutContent(\"/docker/registry/v2/repositories/ubuntu2/_uploads/6354aefd-8169-4a96-83bb-546b9619b755/startedat\")","service":"registry","time":"2015-08-26T21:19:17.319128149Z","trace.duration":463574,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).PutContent","trace.id":"e82334c8-da6c-4364-9f1a-bb85b6763c71","trace.line":67,"vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"f9588c85-0550-44d6-9c6b-27b803fccdd5","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.Stat(\"/docker/registry/v2/repositories/ubuntu2/_uploads/6354aefd-8169-4a96-83bb-546b9619b755/data\")","service":"registry","time":"2015-08-26T21:19:17.319533344Z","trace.duration":84338,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat","trace.id":"38542f30-5ce1-42f4-b93f-194280a8b02c","trace.line":111,"vars.name":"ubuntu2","version":"v2.1.1"}
{"http.request.host":"ceca.codefast.geocent.com","http.request.id":"f9588c85-0550-44d6-9c6b-27b803fccdd5","http.request.method":"POST","http.request.remoteaddr":"<IP_ADDRESS>","http.request.uri":"/v2/ubuntu2/blobs/uploads/","http.request.useragent":"docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64","http.response.duration":"12.438717ms","http.response.status":202,"http.response.written":0,"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"info","msg":"response completed","service":"registry","time":"2015-08-26T21:19:17.324804059Z","version":"v2.1.1"}
<IP_ADDRESS> - - [26/Aug/2015:21:19:17 +0000] "POST /v2/ubuntu2/blobs/uploads/ HTTP/1.0" 202 0 "" "docker/1.8.1 go/go1.4.2 git-commit/d12ea79 kernel/3.13.0-62-generic os/linux arch/amd64"
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:19:19.827776223Z","trace.duration":213153,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"7be00d5a-c6a4-4b4d-892b-3835b62e5157","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:19:29.827740443Z","trace.duration":200842,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"5d608efc-fa63-4494-ade8-c23e8f39702a","trace.line":123,"version":"v2.1.1"}
{"instance.id":"68059e32-81a2-4378-8575-3cbc3225b85b","level":"debug","msg":"filesystem.List(\"/\")","service":"registry","time":"2015-08-26T21:19:39.827742609Z","trace.duration":241777,"trace.file":"/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go","trace.func":"github.com/docker/distribution/registry/storage/driver/base.(*Base).List","trace.id":"6c5968cc-7206-4ad9-be5e-36059cd749ca","trace.line":123,"version":"v2.1.1"}

@stevvooe @RichardScothern any idea there?

@dmp42 It looks like the error BLOB_UNKNOWN is actually working correctly. The client encounters this and then proceeds to create an upload. When the push commences, the daemon gets "blob upload unknown" reported via the cli. This error can happen when working with a blob writer via the http API. We will only see this when encountering a 404 on a blob upload endpoint.
We can see the upload creation operation completing successfully, since it returns a 202. The call to Stat for "/docker/registry/v2/repositories/ubuntu2/_uploads/6354aefd-8169-4a96-83bb-546b9619b755/data" seems to have been successful.
My theory is that something is dropping the information from the upload url on redirect.  Normally, I would suspect this is an issue with the load balancer, but the configuration looks clean. This can possibly be caused by a bug in sanitizeLocation under certain setups. @dmcgowan
@caladbolg7 I'd like to eliminate the configuration environment as a possible cause. Let's take a look at a few things:

Let's see the output of the daemon logs during the failed push. Make sure "debug" is enabled with "-D". We are looking for some hint as to what is happening with the upload.
Please send the output of tree /var/lib/registry/docker/registry/v2/repositories/ubuntu2/_uploads after doing an upload. We'll want to see the uploads represented in the filesystem and correlate them with the log traces.

@caladbolg7 There may be an issue with having two levels of nginx and correctly resolving the protocol scheme and host. It is possible that the scheme is being incorrectly set by the inner nginx instance. Based on your configuration, you may not even need the second nginx instance.
DEBU[0000] Registering DELETE, /images/{name:.*}
DEBU[0000] Registering OPTIONS,
DEBU[0000] Registering HEAD, /containers/{name:.*}/archive
DEBU[0000] docker group found. gid: 999
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
INFO[0000] [graphdriver] using prior storage driver "aufs"
DEBU[0000] Using graph driver aufs
DEBU[0000] Using default logging driver json-file
DEBU[0000] Migrating existing containers
DEBU[0000] Creating images graph
DEBU[0000] Restored 78 elements
DEBU[0000] Reloaded graph with 3 grants expiring at 2017-03-22 19:04:46.713978458 +0000 UTC
DEBU[0000] Creating repository list
INFO[0000] Option DefaultDriver: bridge
INFO[0000] Option DefaultNetwork: bridge
WARN[0000] Running modprobe bridge nf_nat br_netfilter failed with message: modprobe: WARNING: Module br_netfil
ter not found.
, error: exit status 1
INFO[0000] Firewalld running: false
DEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst <IP_ADDRESS>/8 -j DOCKER]

DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]
DEBU[0000] /sbin/iptables, [--wait -t nat -D PREROUTING]
DEBU[0000] /sbin/iptables, [--wait -t nat -D OUTPUT]
DEBU[0000] /sbin/iptables, [--wait -t nat -F DOCKER]
DEBU[0000] /sbin/iptables, [--wait -t nat -X DOCKER]
DEBU[0000] Failed to Initialize Datastore due to datastore initialization requires a valid configuration.

At this point, it is pretty safe to say the upload is actually there. Given the bug we've identified in the client library, I am pretty confident that may be the cause.
Although, I am slightly worried that you may still run into problems with the "double nginx" setup. If you are willing to continue troubleshooting, let's confirm the root cause of this particular issue. Do you happen to have the logs during the failure? These logs look like they only contain daemon startup. You'll have to restart the daemon in debug mode then perform the push.

That's all I got while attempting a push. The upload itself is starting, but only a 32B layer is moving. If I attempt to pull the same image back, it errors as unknown.

@caladbolg7 I don't think the push is actually succeeding at all, based on the registry logs. I think the upload request is getting corrupted and getting that 404. We'll get the patch in and give this a try.

I'm seeing something similar, but it only seems to happen intermittently. I have 3 servers running registry:2.1.1, all using the same NFS mount for storage. Seemingly randomly, I'll get an error like:
The push refers to a repository [docker-atl1.turn.com/tops-software/opentsdb] (len: 1)
afdb739b082d: Buffering to Disk
afdb739b082d: Image successfully pushed
afdb739b082d: Image already exists
...
9000446d7e36: Buffering to Disk
9000446d7e36: Image successfully pushed
9accf256f939: Buffering to Disk
9accf256f939: Image successfully pushed
6a7b54515901: Image already exists
47d44cb6f252: Image already exists
Error pushing to registry: Server error: 404 trying to push tops-software/opentsdb:latest manifest

and the corresponding logs from the registry:
time="2015-09-10T00:19:38.169310226Z" level=warning msg="the ResponseWriter does not implement CloseNotifier" http.request.host="localhost:5000" http.request.id=6516b3a2-12c7-43dd-9083-d46020d4597d http.request.method=PUT http.request.remoteaddr="<IP_ADDRESS>:50415" http.request.uri="/v2/tops-software/opentsdb/manifests/latest" http.request.useragent="docker/1.7.1 go/go1.4.2 git-commit/786b29d kernel/2.6.32-573.3.1.el6.x86_64 os/linux arch/amd64" instance.id=15c05e4b-1402-4e57-91a3-0414d0969c0c vars.name="tops-software/opentsdb" vars.reference=latest version=v2.1.1
time="2015-09-10T00:19:38.173998321Z" level=error msg="response completed with error" err.code="BLOB_UNKNOWN" err.detail=sha256:ec46c816489d99bd6a68c0f34e11c10f2d9891addb2fc2ca246d2b5b2f2180cb err.message="blob unknown to registry" http.request.host="localhost:5000" http.request.id=6516b3a2-12c7-43dd-9083-d46020d4597d http.request.method=PUT http.request.remoteaddr="<IP_ADDRESS>:50415" http.request.uri="/v2/tops-software/opentsdb/manifests/latest" http.request.useragent="docker/1.7.1 go/go1.4.2 git-commit/786b29d kernel/2.6.32-573.3.1.el6.x86_64 os/linux arch/amd64" http.response.contenttype="application/json; charset=utf-8" http.response.duration=5.803492ms http.response.status=404 http.response.written=157 instance.id=15c05e4b-1402-4e57-91a3-0414d0969c0c vars.name="tops-software/opentsdb" vars.reference=latest version=v2.1.1
<IP_ADDRESS> - - [10/Sep/2015:00:19:38 +0000] "PUT /v2/tops-software/opentsdb/manifests/latest HTTP/1.0" 404 157 "" "docker/1.7.1 go/go1.4.2 git-commit/786b29d kernel/2.6.32-573.3.1.el6.x86_64 os/linux arch/amd64"

Running the 'docker push' command again will usually succeed. I've seen this happen twice so far, and it's been on a different registry instance each time.
It probably doesn't matter, but these registry instances are sitting behind nginx with a simple proxy_pass directive.

Hi @agaffney this is a closed issue and we discourage continued conversations within them.  We will probably issue a patch release with this and other bug fixes.  If your problem persists you can open a new issue.

Sorry, I didn't notice that the issue had been closed.


Add single param get/update for step, pipeline

Description
This PR expands the Orchest SDK to add single parameter get and update operations for both step and pipeline parameters.
It's still possible to get or update parameters in a batched manner by using the get_params and update_params functions.
Signatures:
def get_step_param(key: str) -> Any:
def get_pipeline_param(key: str) -> Any:
def update_step_param(key: str, value: Any) -> None:
def update_pipeline_param(key: str, value: Any) -> None:
Checklist

[ ] The documentation reflects the changes.
[X] I have manually tested the application to make sure the changes don’t cause any downstream issues.
[X] In case I changed one of the services’ models.py I have performed the appropriate database migrations.

A few minor wording changes have to be made.
On another note, shouldn't we go for something like a class instead of defining all these functions? For example:
class Params:
  def get(name: str) -> Any

Although this is less inline with the transfer module. Just wanted to share my thought of taking a more class oriented approach.

Given the limited scope of the parameters module I think we can leave it as it is right now.

Note, we should have incremented the SDK version to reflect the API change.


Make negative delays throw exceptions

Tickets addressed: Fixes #526
Review: By commit
Merge strategy: Merge (no squash)

Description

This PR adds a check that when a Task delays, it does so with a non-negative duration. This use to be the behavior of the simulation engine, until it got inadvertently lost during a refactoring.
Verification

I did write a unit test for this, but did not include it in this PR because I wasn't thrilled with how it turned out. This gist contains that test: https://gist.github.com/mattdailis/1f0d747a5505f0a10db23b37449c7e41
Documentation

[ ] TODO make a ticket to document this behavior

Future work

None

I did write a unit test for this, but did not include it in this PR because I wasn't thrilled with how it turned out. This gist contains that test: https://gist.github.com/mattdailis/1f0d747a5505f0a10db23b37449c7e41

yet more evidence that our simulation API is hot garbage. (it's my fault :) )

fix/prevent-time-travel

excellent branch name


Tactical graphics labels should be more readable

Labels are currently in affiliation color and sometimes hard to read.  They should be black with white outline.


Flip / Mirror with BOTH vertical and horizontal parameters as true adds margin to image bounds

Expected Behavior
Calling flip() or mirror() on an image with both vertical and horizontal parameters as true should flip the image vertically and horizontally, without introducing artifacts to the flipped image.
Current Behavior
Calling flip (or mirror) on an image with both vertical and horizontal parameters set to true adds a small white (2-3 pixels) margin around the border of the final image.
Failure Information (for bugs)
n/a -- see steps to reproduce

Steps to Reproduce
Using this code snippet:
      Jimp.read('some/local/image/url/from/assets/dir').then(img => {
        const topLeft = img.clone().crop(0, 0, img.getWidth() / 2, img.getHeight() / 2).flip(true, true);
        const topLeft2 = img.clone().crop(0, 0, img.getWidth() / 2, img.getHeight() / 2).flip(true, false).flip(false, true);
}

See screenshots below.
Left is the source image. I'm extracting quadrants from the image using crop, then flip each quadrant vertically and horizontally.
The center image is topLeft (method above).
The right-most image is topLeft2 (method above).
I'm using a thick CSS border around each image to emphasize the white space issue I'm seeing. Calling the first method chain for "topLeft" introduces that white margin. Specifically, calling flip(true, true), results in the artifact. When calling flip(true, false).flip(false, true), I get the desired result, with no white "margin" around the image.
I've used three separate images, and this occurs on each of them.
Screenshots

Context

Jimp Version: "jimp": "^0.9.3", (browser version, typescript, with Angular 8
Operating System: Windows 10
Node version: 10.16.3

Failure Logs
none

:rocket: Issue was released in v0.10.3 :rocket:

:rocket: Issue was released in v0.10.3 :rocket:


Added optional regex support

Hi,
I've just added optional regex support which doesn't break anything, totally compatible with the previous version but you can add a third optional regex to break by that regex instead of breaking into letters. It is particularly useful for Indic languages(e.g. Bengali, Hindi, Tamil) and Arabic.

Coverage decreased (-1.09%) to 98.913% when pulling 767df663b1b44e2efd9216968a3652a658d56f4f on uroybd:master into 1a1eae14d6b2a8df3d113ae95dedd3c75c7e97ea on yuanqing:master.

Coverage decreased (-1.09%) to 98.913% when pulling 767df663b1b44e2efd9216968a3652a658d56f4f on uroybd:master into 1a1eae14d6b2a8df3d113ae95dedd3c75c7e97ea on yuanqing:master.

Hello, changed as you proposed except the regex test. It is the simplest for Bengali.

Thanks @uroybd!

You are welcome! @yuanqing

Just cut a 2.2.0


Dev question regarding authentication

Laravel Version: 5
Voyager Version:
PHP Version:
Database Driver &

Hello, dev question..
Is there a way to allow to restrict access to CRUD entries to only the user that created this entries??
Thank you

Only if you override the controller(s) and add that functionality yourself.  Voyager's permissions system currently does not allow such fine-grained control.


Limit the maximum and minimum zoom level

Keep zooming in or zooming out,  demo will crash.
🤔 Expected Behavior
Need to limit maximum and minimum zoom level
😯 Current Behavior
Keep zooming in until crashed
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 30.42
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 30.52
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 30.71
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 30.96
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 31.21
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 31.36
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 31.53
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 31.85
[2022-07-18T12:36:49Z INFO  maplibre::context] zoom: 32.16
thread 'main' panicked at 'attempt to add with overflow', maplibre/src/coords.rs:584:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2022-07-18T12:36:49Z INFO  wgpu_core::hub] Dropping Global
[2022-07-18T12:36:49Z INFO  wgpu_core::device] Destroying 12 command encoders

Keep zooming out until crashed
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -30.15
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -30.41
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -30.66
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -30.9
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -31.13
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -31.35
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -31.56
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -31.76
[2022-07-18T12:35:05Z INFO  maplibre::context] zoom: -31.95
thread 'main' panicked at 'attempt to add with overflow', maplibre/src/coords.rs:584:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2022-07-18T12:35:05Z INFO  wgpu_core::hub] Dropping Global
[2022-07-18T12:35:05Z INFO  wgpu_core::device] Destroying 5 command encoders

🌍 Your Environment

Desktop

Operating System: macOS 12.2.1

Oops, I started with this and commented in the wrong Issue #73

Alright no worries!

We should also directly address the overflows. E.g. returning errors/options when we would hit the overflows.


POC: lazy hydrated Cls.from_name

Quick hack/draft to see if I could make Cls.from_name lazy, which seems doable. My hope is that we can do it much more cleanly letting us get rid of a bunch of the complicated logic in Cls/Obj...
Keeping this as a draft for now
Describe your changes

Provide Linear issue reference (e.g. MOD-1234) if available.

 Backward/forward compatibility checks

Check these boxes or delete any item (or this section) if not relevant for this PR.

[ ] Client+Server: this change is compatible with old servers
[ ] Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.

Changelog

Very cool!
It's been a while since I looked at this code, but could we remove most of the getattr hacks at this point? Now that there's just one function serving all methods on a class, there's no need for getattr to do much logic and figure out which method we're calling right – we could just return a _Function object with a method name bound to it. If that method doesn't exist on the class, we can let it fail in runtime.
Btw if we introduce a _RemoteObj I wonder if we should also go ahead and turn the _Obj into a _LocalObj. We've talked about it in the past and I think it would simplify a few things if we separate the two cases.

Took another look at this. There is a small caveat with this way of implementing RemoteObj.
It will basically assume all attributes accessed on the Obj are methods, and if they aren't it will fail at load-time. Attributes on the instance can't be accessed lazily for this reason, but afaik we should be able to just provide whatever was set in the constructor keyword args without having to load anything (explicit constructors could still set other attributes, but I think we should deprecate that)


refresh single chart draft

Hello there,
I made some changes to support the refresh of a single chart. With this feature, we are able to upload a chart into a chart repo and trigger the refresh in monocular automatically right after, in a programmatic way. To resume, this provides a way to see the chart in monocular immediately after it was uploaded in the repo.
an example call to the api would be:
curl -X POST http://localhost:8080/v1/charts/incubator/zookeeper/refresh
This is a first draft. If the feature is ok for you, I can proceed with polishing the PR's code.
Thanks

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.
After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

One or more commits are not associated with a GitHub user. The email used in the Git commit must match a verified email address in a GitHub user profile. For more information, please see https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/

Regards,
CLA GitHub bot

this is great, thanks @samifruit514! I'm wondering though if it makes sense to only do this for a single chart? Wouldn't it make more sense to refresh the repo as a whole? Otherwise we're fetching the index but ignoring every other chart.
I can see this might be useful in larger repositories though, as downloading the missing tarballs might take some time otherwise.

Thanks for your quick feedback @prydonius ! Indeed the whole yaml file is fetched for a single chart update. Short term, the only part we would win is when it verifies if the chart folder exists which is trivial I think...
Long term, if some day the helm repo spec allows to fetch specific charts from the big index, this would make more sense and this refresh route would be already setup.
In my last commit, I extracted common code from the Refresh and RefreshChart to put it in a new helper package I added: repohelpers
Let me know what you think!
Thanks a lot!

Thanks a lot @samifruit514!


top_navbar: Improve logged out layout, colors, and icons.

This PR does three primary things:

It unifies the color of the icons and buttons across the top navbar
It introduces new button styles for the Sign up and Log in buttons
It places new log in and log out icons across the entire UI

CZO discussions: logged out users, gear menu log in icon
Screenshots and screen captures:

Wide view, before
Wide view, after

Narrow view, before
Narrow view, after

Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[x] Explains differences from previous plans (e.g., issue description).
[x] Highlights technical choices and bugs encountered.
[x] Calls out remaining decisions and concerns.
[x] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[x] Visual appearance of the changes.
[x] Responsiveness and internationalization.
[x] Strings and tooltips.
[x] End-to-end functionality of buttons, interactions and flows.
[x] Corner cases, error conditions, and easily imagined bugs.

Looks good to me!

Merged, thanks @karlstolley!


Accidental tag using 0.30.0

The recent release commit for 10.0.0 got tagged with the bitcoin version.

Oops, sorry. Fixed.