You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ab...@apache.org on 2021/04/20 16:01:13 UTC

[nifi-minifi-cpp] branch main updated (a29b414 -> 2c51f1a)

This is an automated email from the ASF dual-hosted git repository.

aboda pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git.


    from a29b414  MINIFICPP-1535 - Support process groups
     new c759c96  MINIFICPP-1539 Check if Message Key Field is really set
     new 88f5e04  MINIFICPP-1543 Add 'brew update' to MacOS CI jobs
     new 2c51f1a  MINIFICPP-1499 - Add clcache to windows builds

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/ci.yml                          | 48 +++++++++++++++++++++--
 extensions/librdkafka/PublishKafka.cpp            |  2 +-
 extensions/librdkafka/tests/PublishKafkaTests.cpp | 16 ++++++++
 3 files changed, 62 insertions(+), 4 deletions(-)

[nifi-minifi-cpp] 03/03: MINIFICPP-1499 - Add clcache to windows builds

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 2c51f1a53bb225b5f5e05496e339f041fd0237ef
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Wed Feb 17 17:39:46 2021 +0100

    MINIFICPP-1499 - Add clcache to windows builds
    
    Signed-off-by: Arpad Boda <ab...@apache.org>
    
    This closes #1012
---
 .github/workflows/ci.yml | 40 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4c17288..a9d6197 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -69,9 +69,19 @@ jobs:
     name: "windows-vs2017"
     runs-on: windows-2016
     timeout-minutes: 120
+    env:
+      CLCACHE_DIR: ${{ GITHUB.WORKSPACE }}\clcache
     steps:
       - id: checkout
         uses: actions/checkout@v2
+      - id: cache
+        uses: actions/cache@v2
+        with:
+          path: ${{ env.CLCACHE_DIR }}
+          key: windows-vs2017-clcache-${{github.ref}}-${{github.sha}}
+          restore-keys: |
+            windows-vs2017-clcache-${{github.ref}}-
+            windows-vs2017-clcache-refs/heads/main-
       - name: Setup PATH
         uses: microsoft/setup-msbuild@v1.0.2
       - id: install-sqliteodbc-driver
@@ -79,6 +89,15 @@ jobs:
           Invoke-WebRequest -Uri "http://www.ch-werner.de/sqliteodbc/sqliteodbc.exe" -OutFile "sqliteodbc.exe"
           ./sqliteodbc.exe /S
         shell: powershell
+      - name: Setup clcache
+        run: |
+          (New-Object System.Net.WebClient).DownloadFile('https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip', "$pwd\clcache.zip")
+          $cl_exe_dir = Split-Path -parent $(vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find VC\Tools\MSVC\**\bin\Hostx86\x86\cl.exe | select-object -last 1)
+          Expand-Archive -Force -Path clcache.zip -DestinationPath "$cl_exe_dir";
+          move "$cl_exe_dir\cl.exe" "$cl_exe_dir\cl_original.exe"
+          move "$cl_exe_dir\cl.exe.config" "$cl_exe_dir\cl_original.exe.config"
+          move "$cl_exe_dir\clcache.exe" "$cl_exe_dir\cl.exe"
+          echo "CLCACHE_CL=$cl_exe_dir\cl_original.exe" >> $env:GITHUB_ENV
       - id: build
         run: |
           PATH %PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86
@@ -88,10 +107,20 @@ jobs:
   windows_VS2019:
     name: "windows-vs2019"
     runs-on: windows-2019
-    timeout-minutes: 90
+    timeout-minutes: 120
+    env:
+      CLCACHE_DIR: ${{ GITHUB.WORKSPACE }}\clcache
     steps:
       - id: checkout
         uses: actions/checkout@v2
+      - id: cache
+        uses: actions/cache@v2
+        with:
+          path: ${{ env.CLCACHE_DIR }}
+          key: windows-vs2019-clcache-${{github.ref}}-${{github.sha}}
+          restore-keys: |
+            windows-vs2019-clcache-${{github.ref}}-
+            windows-vs2019-clcache-refs/heads/main-
       - name: Setup PATH
         uses: microsoft/setup-msbuild@v1.0.2
       - id: install-sqliteodbc-driver
@@ -99,6 +128,15 @@ jobs:
           Invoke-WebRequest -Uri "http://www.ch-werner.de/sqliteodbc/sqliteodbc_w64.exe" -OutFile "sqliteodbc_w64.exe"
           ./sqliteodbc_w64.exe /S
         shell: powershell
+      - name: Setup clcache
+        run: |
+          (New-Object System.Net.WebClient).DownloadFile('https://github.com/frerich/clcache/releases/download/v4.2.0/clcache-4.2.0.zip', "$pwd\clcache.zip")
+          $cl_exe_dir = Split-Path -parent $(vswhere -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -find VC\Tools\MSVC\**\bin\Hostx64\x64\cl.exe | select-object -last 1)
+          Expand-Archive -Force -Path clcache.zip -DestinationPath "$cl_exe_dir";
+          move "$cl_exe_dir\cl.exe" "$cl_exe_dir\cl_original.exe"
+          move "$cl_exe_dir\cl.exe.config" "$cl_exe_dir\cl_original.exe.config"
+          move "$cl_exe_dir\clcache.exe" "$cl_exe_dir\cl.exe"
+          echo "CLCACHE_CL=$cl_exe_dir\cl_original.exe" >> $env:GITHUB_ENV
       - id: build
         run: |
           PATH %PATH%;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64

[nifi-minifi-cpp] 01/03: MINIFICPP-1539 Check if Message Key Field is really set

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit c759c96c9ab6f59a98a624dd99a9540d73d8d6b4
Author: Ferenc Gerlits <fg...@gmail.com>
AuthorDate: Fri Apr 9 18:04:47 2021 +0200

    MINIFICPP-1539 Check if Message Key Field is really set
    
    Signed-off-by: Arpad Boda <ab...@apache.org>
    
    This closes #1049
---
 extensions/librdkafka/PublishKafka.cpp            |  2 +-
 extensions/librdkafka/tests/PublishKafkaTests.cpp | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/extensions/librdkafka/PublishKafka.cpp b/extensions/librdkafka/PublishKafka.cpp
index ceb76f3..b83d028 100644
--- a/extensions/librdkafka/PublishKafka.cpp
+++ b/extensions/librdkafka/PublishKafka.cpp
@@ -544,7 +544,7 @@ void PublishKafka::onSchedule(const std::shared_ptr<core::ProcessContext> &conte
   configureNewConnection(context);
 
   std::string message_key_field;
-  if (context->getProperty(MessageKeyField.getName(), message_key_field)) {
+  if (context->getProperty(MessageKeyField.getName(), message_key_field) && !message_key_field.empty()) {
     logger_->log_error("The %s property is set. This property is DEPRECATED and has no effect; please use Kafka Key instead.", MessageKeyField.getName());
   }
 
diff --git a/extensions/librdkafka/tests/PublishKafkaTests.cpp b/extensions/librdkafka/tests/PublishKafkaTests.cpp
index ea1c4ef..db44eb3 100644
--- a/extensions/librdkafka/tests/PublishKafkaTests.cpp
+++ b/extensions/librdkafka/tests/PublishKafkaTests.cpp
@@ -190,3 +190,19 @@ TEST_CASE("PublishKafka dynamic properties can use expression language", "[Publi
 
   REQUIRE(LogTestController::getInstance().contains("PublishKafka: DynamicProperty: [retry.backoff.ms] -> [180000]"));
 }
+
+TEST_CASE("PublishKafka complains if Message Key Field is set, but only if it is set", "[PublishKafka][properties]") {
+  PublishKafkaTestRunner test_runner;
+
+  SECTION("Message Key Field is not set, so there is no error") {
+    test_runner.runProcessor();
+    REQUIRE_FALSE(LogTestController::getInstance().contains("error"));
+  }
+
+  SECTION("Message Key Field is set, so there is an error log") {
+    test_runner.setPublishKafkaProperty(processors::PublishKafka::MessageKeyField, "kafka.key");
+    test_runner.runProcessor();
+    REQUIRE(LogTestController::getInstance().contains("The " + processors::PublishKafka::MessageKeyField.getName() +
+        " property is set. This property is DEPRECATED and has no effect"));
+  }
+}

[nifi-minifi-cpp] 02/03: MINIFICPP-1543 Add 'brew update' to MacOS CI jobs

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 88f5e04a20606f3e054582f637917d68873bcd43
Author: Ferenc Gerlits <fg...@gmail.com>
AuthorDate: Mon Apr 12 19:02:35 2021 +0200

    MINIFICPP-1543 Add 'brew update' to MacOS CI jobs
    
    ... and remove packages which are already installed, because these cause
    `brew install` to return with a non-zero status, for some reason.
    
    Signed-off-by: Arpad Boda <ab...@apache.org>
    
    This closes #1051
---
 .github/workflows/ci.yml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 306ec15..4c17288 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,9 @@ jobs:
             macos-xcode11.2.1-ccache-${{github.ref}}-
             macos-xcode11.2.1-ccache-refs/heads/main-
       - id: install_dependencies
-        run: brew install ossp-uuid boost flex openssl python lua@5.3 xz libssh2 ccache sqliteodbc
+        run: |
+          brew update
+          brew install ossp-uuid boost flex lua@5.3 ccache sqliteodbc
       - id: setup_env
         run: |
           echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/bin:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
@@ -50,7 +52,9 @@ jobs:
             macos-xcode12.0-ccache-${{github.ref}}-
             macos-xcode12.0-ccache-refs/heads/main-
       - id: install_dependencies
-        run: brew install ossp-uuid boost flex openssl python lua@5.3 xz libssh2 ccache sqliteodbc
+        run: |
+          brew update
+          brew install ossp-uuid boost flex lua@5.3 ccache sqliteodbc
       - id: setup_env
         run: |
           echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/bin:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV