[jira] [Commented] (NIFI-7787) Release Apache NiFi 1.12.1
[ https://issues.apache.org/jira/browse/NIFI-7787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191905#comment-17191905 ] ASF subversion and git services commented on NIFI-7787: --- Commit c9ebda061085ff18d0638cb5835e78fd0cff08cc in nifi's branch refs/heads/NIFI-7787-RC1 from Joe Witt [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=c9ebda0 ] NIFI-7787-RC1 prepare release nifi-1.12.1-RC1 > Release Apache NiFi 1.12.1 > -- > > Key: NIFI-7787 > URL: https://issues.apache.org/jira/browse/NIFI-7787 > Project: Apache NiFi > Issue Type: Task >Reporter: Joe Witt >Assignee: Joe Witt >Priority: Trivial > Fix For: 1.12.1 > > > Items in release: > NIFI-7167/mimetype: git cherry-pick 9975df8962b1f5eac7f3e1df1b69d2c64b06a40b > NIFI-7730: git cherry-pick c3cab48325a8c013f267c9ccc3a375ceb0e3c5e9 > NIFI-7767: git cherry-pick 1e6619b91f2d9a7af2d7195464d4a0f5b595b93d > NIFI-7778: git cherry-pick e884b3cdb2bf2df7c00c914edf520394081f3628 > NIFI-7740: git cherry-pick 45470b0984ab83750155e9c7a540c79bfe862817 > NIFI-7779: git cherry-pick 943904c12c56a1f658ae7144e7c2bbb29d746659 > NIFI-7762: git cherry-pick bdead4d040dab7c7b23328dcd3208627183b3506 > NIFI-7661: git cherry-pick 87685dd4e16f0ab6edda571a7bde819b14117dc7 > NIFI-6767: git cherry-pick 483af3a46023a8c7d44af634b70372c8bb75d0e3 > NIFI-7309: git cherry-pick 861b83f31429645abf84ba25ebe3f4af1908ed7d > NIFI-7714: git cherry-pick ca43615702eabddc6f7bbf280f0d181d7aa0b0d4 > NIFI-7766: git cherry-pick bdfe1f23705a3df86eafed12ac8839ee76662730 > NIFI-7760: git cherry-pick aaab9ee0cfbd52cba2fd7ecdcada39c96b1169cc > NIFI-7751: git cherry-pick d0c0f9704c7b9261b84f662373dc289f81d55bf1 > NIFI-7758: git cherry-pick 11a4127a9f89474a42f182c0b83e365a6b468e71 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-7787) Release Apache NiFi 1.12.1
[ https://issues.apache.org/jira/browse/NIFI-7787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191906#comment-17191906 ] ASF subversion and git services commented on NIFI-7787: --- Commit 68bd623a6a6ee7de85144e051a50ffb3ffa8b04b in nifi's branch refs/heads/NIFI-7787-RC1 from Joe Witt [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=68bd623 ] NIFI-7787-RC1 prepare for next development iteration > Release Apache NiFi 1.12.1 > -- > > Key: NIFI-7787 > URL: https://issues.apache.org/jira/browse/NIFI-7787 > Project: Apache NiFi > Issue Type: Task >Reporter: Joe Witt >Assignee: Joe Witt >Priority: Trivial > Fix For: 1.12.1 > > > Items in release: > NIFI-7167/mimetype: git cherry-pick 9975df8962b1f5eac7f3e1df1b69d2c64b06a40b > NIFI-7730: git cherry-pick c3cab48325a8c013f267c9ccc3a375ceb0e3c5e9 > NIFI-7767: git cherry-pick 1e6619b91f2d9a7af2d7195464d4a0f5b595b93d > NIFI-7778: git cherry-pick e884b3cdb2bf2df7c00c914edf520394081f3628 > NIFI-7740: git cherry-pick 45470b0984ab83750155e9c7a540c79bfe862817 > NIFI-7779: git cherry-pick 943904c12c56a1f658ae7144e7c2bbb29d746659 > NIFI-7762: git cherry-pick bdead4d040dab7c7b23328dcd3208627183b3506 > NIFI-7661: git cherry-pick 87685dd4e16f0ab6edda571a7bde819b14117dc7 > NIFI-6767: git cherry-pick 483af3a46023a8c7d44af634b70372c8bb75d0e3 > NIFI-7309: git cherry-pick 861b83f31429645abf84ba25ebe3f4af1908ed7d > NIFI-7714: git cherry-pick ca43615702eabddc6f7bbf280f0d181d7aa0b0d4 > NIFI-7766: git cherry-pick bdfe1f23705a3df86eafed12ac8839ee76662730 > NIFI-7760: git cherry-pick aaab9ee0cfbd52cba2fd7ecdcada39c96b1169cc > NIFI-7751: git cherry-pick d0c0f9704c7b9261b84f662373dc289f81d55bf1 > NIFI-7758: git cherry-pick 11a4127a9f89474a42f182c0b83e365a6b468e71 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi] MikeThomsen commented on pull request #4514: NIFI-7768 Added support for monogdb+srv connection strings.
MikeThomsen commented on pull request #4514: URL: https://github.com/apache/nifi/pull/4514#issuecomment-688551004 @jfrazee I do most of my development on my company laptop (with management's strong approval), but we installed a MITM tool that wrecks havoc on me testing this with Atlas. Will see if I can set things up on another device if I get time. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] MikeThomsen opened a new pull request #4514: NIFI-7768 Added support for monogdb+srv connection strings.
MikeThomsen opened a new pull request #4514: URL: https://github.com/apache/nifi/pull/4514 Thank you for submitting a contribution to Apache NiFi. Please provide a short description of the PR here: Description of PR _Enables X functionality; fixes bug NIFI-._ In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with **NIFI-** where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically `main`)? - [ ] Is your initial contribution a single, squashed commit? _Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not `squash` or use `--force` when pushing to allow for clean monitoring of changes._ ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via `mvn -Pcontrib-check clean install` at the root `nifi` folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] Have you verified that the full build is successful on JDK 8? - [ ] Have you verified that the full build is successful on JDK 11? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE` file, including the main `LICENSE` file under `nifi-assembly`? - [ ] If applicable, have you updated the `NOTICE` file, including the main `NOTICE` file found under `nifi-assembly`? - [ ] If adding new Properties, have you added `.displayName` in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (NIFI-7754) JettyWebSocketClient to support HTTP Proxy
[ https://issues.apache.org/jira/browse/NIFI-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191885#comment-17191885 ] ASF subversion and git services commented on NIFI-7754: --- Commit 4937e2dba811735833265252a06db63dd3bcfcc8 in nifi's branch refs/heads/support/nifi-1.12.x from Andreas Schöneck [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4937e2d ] NIFI-7754 - Support HTTP Proxy for JettyWebSocketClient Signed-off-by: Pierre Villard This closes #4502. > JettyWebSocketClient to support HTTP Proxy > -- > > Key: NIFI-7754 > URL: https://issues.apache.org/jira/browse/NIFI-7754 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.11.4 >Reporter: Andreas Schöneck >Priority: Minor > Fix For: 1.13.0, 1.12.1 > > Time Spent: 1h > Remaining Estimate: 0h > > In our corporate environment, we consume the Internet through a proxy (IIRC > it is Squid). > Websockets can also be consumed through it. > > Nifi's JettyWebSocketClient does not currently allow for specifying a proxy. > Can this scenario be supported without having to globally specify HTTP > proxies through system properties? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-7506) CompressContent Add Snappy-Hadoop
[ https://issues.apache.org/jira/browse/NIFI-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191884#comment-17191884 ] ASF subversion and git services commented on NIFI-7506: --- Commit d18c52041504bd6d4efeb05d2fd1b7918709 in nifi's branch refs/heads/support/nifi-1.12.x from noedetore [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=d18c520 ] NIFI-7506 add snappy-hadoop to CompressContent Signed-off-by: Pierre Villard This closes #4321. > CompressContent Add Snappy-Hadoop > - > > Key: NIFI-7506 > URL: https://issues.apache.org/jira/browse/NIFI-7506 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Reporter: Noe >Priority: Major > Fix For: 1.13.0, 1.12.1 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > I have been using this recommendation for a few months now and want to > contribute it back > Bryan Bende > Nov 26, 2019, 12:54 PM > to users > Not sure if this is relevant, but snappy-java has a specific > SnappyHadoopCompatibleOutputStream so CompressContent could offer a > third snappy option like "snappy-hadoop" which used that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (NIFI-7754) JettyWebSocketClient to support HTTP Proxy
[ https://issues.apache.org/jira/browse/NIFI-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Witt updated NIFI-7754: --- Fix Version/s: 1.12.1 > JettyWebSocketClient to support HTTP Proxy > -- > > Key: NIFI-7754 > URL: https://issues.apache.org/jira/browse/NIFI-7754 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.11.4 >Reporter: Andreas Schöneck >Priority: Minor > Fix For: 1.13.0, 1.12.1 > > Time Spent: 1h > Remaining Estimate: 0h > > In our corporate environment, we consume the Internet through a proxy (IIRC > it is Squid). > Websockets can also be consumed through it. > > Nifi's JettyWebSocketClient does not currently allow for specifying a proxy. > Can this scenario be supported without having to globally specify HTTP > proxies through system properties? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (NIFI-7506) CompressContent Add Snappy-Hadoop
[ https://issues.apache.org/jira/browse/NIFI-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Witt updated NIFI-7506: --- Fix Version/s: 1.12.1 > CompressContent Add Snappy-Hadoop > - > > Key: NIFI-7506 > URL: https://issues.apache.org/jira/browse/NIFI-7506 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Reporter: Noe >Priority: Major > Fix For: 1.13.0, 1.12.1 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > I have been using this recommendation for a few months now and want to > contribute it back > Bryan Bende > Nov 26, 2019, 12:54 PM > to users > Not sure if this is relevant, but snappy-java has a specific > SnappyHadoopCompatibleOutputStream so CompressContent could offer a > third snappy option like "snappy-hadoop" which used that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #889: MINIFICPP-952 remove travis and appveyor
arpadboda closed pull request #889: URL: https://github.com/apache/nifi-minifi-cpp/pull/889 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #888: MINIFICPP-1347 Do not override MergeContent output attributes
arpadboda closed pull request #888: URL: https://github.com/apache/nifi-minifi-cpp/pull/888 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #878: MINIFICPP-1104 Add SSL docker tests for PublishKafka and automate them in CI
arpadboda commented on a change in pull request #878: URL: https://github.com/apache/nifi-minifi-cpp/pull/878#discussion_r484555099 ## File path: docker/test/integration/minifi/test/__init__.py ## @@ -166,20 +184,33 @@ def log_nifi_output(self): stats = container.stats(stream=False) logging.info('Container stats:\n%s', stats) -def check_output(self, timeout=5, **kwargs): Review comment: Okay, works for me. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #878: MINIFICPP-1104 Add SSL docker tests for PublishKafka and automate them in CI
arpadboda commented on a change in pull request #878: URL: https://github.com/apache/nifi-minifi-cpp/pull/878#discussion_r484555055 ## File path: docker/test/integration/minifi/__init__.py ## @@ -413,7 +426,7 @@ def __init__(self, self.controller_services = controller_services self.schedule = { -'scheduling strategy': 'EVENT_DRIVEN', +'scheduling strategy': 'TIMER_DRIVEN', Review comment: A follow-up is perfectly fine. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #882: MINIFICPP-1343 Create a minimal docker image target
arpadboda commented on a change in pull request #882: URL: https://github.com/apache/nifi-minifi-cpp/pull/882#discussion_r484554812 ## File path: docker/Dockerfile ## @@ -16,113 +16,144 @@ # under the License. # -# First stage: the build environment -# Edge required for rocksdb -FROM alpine:3.8 AS builder -MAINTAINER Apache NiFi +# First stage: the common build environment dependencies +FROM alpine:3.12 AS build_deps +LABEL maintainer="Apache NiFi " -ARG UID -ARG GID ARG MINIFI_VERSION ARG MINIFI_SOURCE_CODE +ARG UID=1000 +ARG GID=1000 # Install the system dependencies needed for a build RUN apk --update --no-cache upgrade && apk --update --no-cache add gcc \ - g++ \ - make \ - bison \ - flex \ - flex-dev \ - maven \ - openjdk8-jre-base \ - openjdk8 \ - autoconf \ - libtool \ - wget \ - gdb \ - musl-dev \ - boost-dev \ - vim \ - util-linux-dev \ - curl-dev \ - cmake \ - git \ - nss \ - nss-dev \ - unzip \ - gpsd-dev \ - libressl-dev \ - zlib-dev \ - bzip2-dev \ - python3-dev + g++ \ + make \ + bison \ + flex \ + flex-dev \ + maven \ + openjdk8-jre-base \ + openjdk8 \ + autoconf \ + libtool \ + wget \ + gdb \ + musl-dev \ + boost-dev \ + vim \ + util-linux-dev \ + curl-dev \ + cmake \ + git \ + nss \ + nss-dev \ + unzip \ + gpsd-dev \ + libressl-dev \ + zlib-dev \ + bzip2-dev \ + python3-dev \ + patch \ + doxygen ENV USER minificpp ENV MINIFI_BASE_DIR /opt/minifi +ENV JAVA_HOME /usr/lib/jvm/default-jvm +ENV PATH ${PATH}:/usr/lib/jvm/default-jvm/bin +ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-${MINIFI_VERSION} # Setup minificpp user RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G ${USER} -g "" ${USER} -RUN mkdir -p ${MINIFI_BASE_DIR} -ENV JAVA_HOME /usr/lib/jvm/default-jvm -ENV PATH ${PATH}:/usr/lib/jvm/default-jvm/bin -ADD ${MINIFI_SOURCE_CODE} ${MINIFI_BASE_DIR} -RUN chown -R ${USER}:${USER} ${MINIFI_BASE_DIR} +RUN install -d -o ${USER} -g ${USER} ${MINIFI_BASE_DIR} +COPY --chown=${USER}:${USER} ${MINIFI_SOURCE_CODE} ${MINIFI_BASE_DIR} USER ${USER} -ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-${MINIFI_VERSION} -# Perform the build +# Build stage of the minimal image +FROM build_deps AS build_minimal RUN cd ${MINIFI_BASE_DIR} \ - && mkdir build \ - && cd build \ - && cmake -DDISABLE_JEMALLOC=ON -DSTATIC_BUILD= -DSKIP_TESTS=true -DENABLE_JNI=ON -DENABLE_LIBRDKAFKA=ON .. \ - && make -j8 package \ - && tar -xzvf ${MINIFI_BASE_DIR}/build/nifi-minifi-cpp-${MINIFI_VERSION}-bin.tar.gz -C ${MINIFI_BASE_DIR} + && mkdir build \ + && cd build \ + && cmake -DDISABLE_LIBARCHIVE=ON -DDISABLE_SCRIPTING=ON -DENABLE_LIBRDKAFKA=ON -DSKIP_TESTS=true -DCMAKE_BUILD_TYPE=MinSizeRel .. \ + && make -j$(nproc) package \ + && tar -xzvf ${MINIFI_BASE_DIR}/build/nifi-minifi-cpp-${MINIFI_VERSION}-bin.tar.gz -C ${MINIFI_BASE_DIR} -# Second stage: the runtime image + +# Build stage of normal image +FROM build_deps AS build_release +RUN cd ${MINIFI_BASE_DIR} \ + && mkdir build \ + && cd build \ + && cmake -DDISABLE_JEMALLOC=ON -DSTATIC_BUILD= -DSKIP_TESTS=true -DENABLE_JNI=ON -DENABLE_LIBRDKAFKA=ON .. \ + && make -j$(nproc) package \ + && tar -xzvf ${MINIFI_BASE_DIR}/build/nifi-minifi-cpp-${MINIFI_VERSION}-bin.tar.gz -C ${MINIFI_BASE_DIR} + + +# Common runtime image dependencies # Edge required for rocksdb -FROM alpine:3.8 +FROM alpine:3.12 AS common_runtime_deps -ARG UID -ARG GID +ARG UID=1000 +ARG GID=1000 ARG MINIFI_VERSION ARG MINIFI_SOURCE_CODE # Add testing repo for rocksdb RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories -RUN apk --update --no-cache upgrade && apk add --update --no-cache \ - util-linux \ - curl \ - unzip \ - gpsd \ - openjdk8-jre-base \ - openjdk8 \ - nss \ - nss-dev \ - libressl \ - python3 \ - zlib - ENV USER minificpp ENV MINIFI_BASE_DIR /opt/minifi ENV MINIFI_HOME ${MINIFI_BASE_DIR}/minifi-current ENV MINIFI_VERSIONED_HOME ${MINIFI_BASE_DIR}/nifi-minifi-cpp-${MINIFI_VERSION} - ENV JAVA_HOME /usr/lib/jvm/default-jvm ENV PATH ${PATH}:/usr/lib/jvm/default-jvm/bin RUN addgroup -g ${GID} ${USER} && adduser -u ${UID} -D -G ${USER} -g "" ${USER} -RUN mkdir -p ${MINIFI_BASE_DIR} \ -&& ln -s ${MINIFI_VERSIONED_HOME} ${MINIFI_HOME} +RUN install -d -o ${USER} -g ${USER} ${MINIFI_BASE_DIR} \ + && ln -s ${MINIFI_VERSIONED_HOME} ${MINIFI_HOME} + + +# Final stage of the minimal image +FROM common_runtime_deps AS minimal + +RUN apk --update --no-cache upgrade && apk add --update --no-cache libstdc++ +RUN install -d -o ${USER} -g ${USER} ${MINIFI_VERSIONED_HOME}/bin \ + && install -d -o ${USER} -g ${USER} ${MINIFI_VERSIONED_HOME}/conf && chown ${USER}:${USER} ${MINIFI_HOME} # Copy built
[GitHub] [nifi-minifi-cpp] szaszm closed pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
szaszm closed pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] pgyori commented on a change in pull request #4481: NIFI-7624: ListenFTP processor
pgyori commented on a change in pull request #4481: URL: https://github.com/apache/nifi/pull/4481#discussion_r484541741 ## File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ftp/NifiFtpServer.java ## @@ -0,0 +1,275 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.nifi.processors.standard.ftp; + +import org.apache.ftpserver.ConnectionConfig; +import org.apache.ftpserver.ConnectionConfigFactory; +import org.apache.ftpserver.FtpServer; +import org.apache.ftpserver.FtpServerConfigurationException; +import org.apache.ftpserver.FtpServerFactory; +import org.apache.ftpserver.command.Command; +import org.apache.ftpserver.command.CommandFactory; +import org.apache.ftpserver.command.CommandFactoryFactory; +import org.apache.ftpserver.command.impl.ABOR; +import org.apache.ftpserver.command.impl.AUTH; +import org.apache.ftpserver.command.impl.CDUP; +import org.apache.ftpserver.command.impl.CWD; +import org.apache.ftpserver.command.impl.EPRT; +import org.apache.ftpserver.command.impl.EPSV; +import org.apache.ftpserver.command.impl.FEAT; +import org.apache.ftpserver.command.impl.LIST; +import org.apache.ftpserver.command.impl.MDTM; +import org.apache.ftpserver.command.impl.MKD; +import org.apache.ftpserver.command.impl.MLSD; +import org.apache.ftpserver.command.impl.MLST; +import org.apache.ftpserver.command.impl.MODE; +import org.apache.ftpserver.command.impl.NLST; +import org.apache.ftpserver.command.impl.NOOP; +import org.apache.ftpserver.command.impl.OPTS; +import org.apache.ftpserver.command.impl.PASS; +import org.apache.ftpserver.command.impl.PASV; +import org.apache.ftpserver.command.impl.PBSZ; +import org.apache.ftpserver.command.impl.PORT; +import org.apache.ftpserver.command.impl.PROT; +import org.apache.ftpserver.command.impl.PWD; +import org.apache.ftpserver.command.impl.QUIT; +import org.apache.ftpserver.command.impl.REIN; +import org.apache.ftpserver.command.impl.RMD; +import org.apache.ftpserver.command.impl.SITE; +import org.apache.ftpserver.command.impl.SITE_DESCUSER; +import org.apache.ftpserver.command.impl.SITE_HELP; +import org.apache.ftpserver.command.impl.SITE_STAT; +import org.apache.ftpserver.command.impl.SITE_WHO; +import org.apache.ftpserver.command.impl.SITE_ZONE; +import org.apache.ftpserver.command.impl.SIZE; +import org.apache.ftpserver.command.impl.STAT; +import org.apache.ftpserver.command.impl.STRU; +import org.apache.ftpserver.command.impl.SYST; +import org.apache.ftpserver.command.impl.TYPE; +import org.apache.ftpserver.command.impl.USER; +import org.apache.ftpserver.ftplet.Authority; +import org.apache.ftpserver.ftplet.User; +import org.apache.ftpserver.listener.Listener; +import org.apache.ftpserver.listener.ListenerFactory; +import org.apache.ftpserver.usermanager.impl.BaseUser; +import org.apache.ftpserver.usermanager.impl.WritePermission; +import org.apache.nifi.processor.ProcessSessionFactory; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processors.standard.ftp.commands.FtpCommandHELP; +import org.apache.nifi.processors.standard.ftp.commands.FtpCommandSTOR; +import org.apache.nifi.processors.standard.ftp.commands.NotSupportedCommand; +import org.apache.nifi.processors.standard.ftp.filesystem.DefaultVirtualFileSystem; +import org.apache.nifi.processors.standard.ftp.filesystem.VirtualFileSystem; +import org.apache.nifi.processors.standard.ftp.filesystem.VirtualFileSystemFactory; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + +public class NifiFtpServer { + +private final Map commandMap = new HashMap<>(); +private final FtpCommandHELP customHelpCommand = new FtpCommandHELP(); + +private final FtpServer server; Review comment: That's right, thanks! A CommandMapFactory has been created to take care of assembling the command map. Moved most of the preparation steps to the Builder to make the NifiFtpServer cleaner.
[GitHub] [nifi-minifi-cpp] szaszm closed pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
szaszm closed pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on pull request #890: MINIFICPP-1288 - FlowController start/load refactor
szaszm commented on pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#issuecomment-688443647 > I see what you mean, but I disagree. I would definitely avoid adding states like this to an object. I found it already quite a task to decipher in what state can we reach each of the member functions. How about either of these options: > 1. I can make the FlowController a state machine with well defined transitions between states > 2. I can add checks to the `start` method that ensure that the members set in `load` are indeed set. I don't really understand what you mean by making `FlowController` a state machine or checking members, but in either case, if you can make it hard or impossible to use `FlowController` incorrectly, that would be a big plus in my opinion. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#issuecomment-688432366 > Since the requirement of "one has to call load before start" is not documented anywhere, I would restore the `initialized_` variable to prevent invalid usage of `FlowController`. > I fell into this trap of only calling `stop`/`start` instead of `stop`,`unload`/`load`,`start` while working on #875 I see what you mean, but I disagree. I would definitely avoid adding states like this to an object. I found it already quite a task to decipher in what state can we reach each of the member functions. How about either of these options: 1. I can make the FlowController a state machine with well defined transitions between states 1. I can add checks to the `start` method that ensure that the members set in `load` are indeed set. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484517048 ## File path: libminifi/src/FlowController.cpp ## @@ -320,12 +320,12 @@ void FlowController::initializeUninitializedSchedulers() { conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); } -void FlowController::reinitializeSchedulersWithNewThreadPool() { - using ControllerServiceProvider = core::controller::ControllerServiceProvider; +void FlowController::reinitializeSchedulersWithClearedThreadPool() { + using NonNullControllerServiceProviderPtr = gsl::not_null; restartThreadPool(); - timer_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - event_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - cron_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + timer_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + event_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + cron_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); Review comment: What is the advantake of using `make_not_null`? It does nothing, does it? **Update:** I see what you mean now. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484517048 ## File path: libminifi/src/FlowController.cpp ## @@ -320,12 +320,12 @@ void FlowController::initializeUninitializedSchedulers() { conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); } -void FlowController::reinitializeSchedulersWithNewThreadPool() { - using ControllerServiceProvider = core::controller::ControllerServiceProvider; +void FlowController::reinitializeSchedulersWithClearedThreadPool() { + using NonNullControllerServiceProviderPtr = gsl::not_null; restartThreadPool(); - timer_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - event_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - cron_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + timer_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + event_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + cron_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); Review comment: What is the advantake of using `make_not_null`? It does nothing, does it? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
szaszm commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484513034 ## File path: libminifi/src/FlowController.cpp ## @@ -320,12 +320,12 @@ void FlowController::initializeUninitializedSchedulers() { conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); } -void FlowController::reinitializeSchedulersWithNewThreadPool() { - using ControllerServiceProvider = core::controller::ControllerServiceProvider; +void FlowController::reinitializeSchedulersWithClearedThreadPool() { + using NonNullControllerServiceProviderPtr = gsl::not_null; restartThreadPool(); - timer_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - event_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - cron_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + timer_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + event_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + cron_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); Review comment: Consider using `gsl::make_not_null` and relying on implicit conversion to base class pointer. ```suggestion timer_scheduler_ = std::make_shared(gsl::make_not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); event_scheduler_ = std::make_shared(gsl::make_not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); cron_scheduler_ = std::make_shared(gsl::make_not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484516482 ## File path: libminifi/src/FlowController.cpp ## @@ -320,12 +320,12 @@ void FlowController::initializeUninitializedSchedulers() { conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); } -void FlowController::reinitializeSchedulersWithNewThreadPool() { - using ControllerServiceProvider = core::controller::ControllerServiceProvider; +void FlowController::reinitializeSchedulersWithClearedThreadPool() { + using NonNullControllerServiceProviderPtr = gsl::not_null; restartThreadPool(); - timer_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - event_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - cron_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + timer_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + event_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + cron_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); Review comment: This is an explicit conversion. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
szaszm commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484513034 ## File path: libminifi/src/FlowController.cpp ## @@ -320,12 +320,12 @@ void FlowController::initializeUninitializedSchedulers() { conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); } -void FlowController::reinitializeSchedulersWithNewThreadPool() { - using ControllerServiceProvider = core::controller::ControllerServiceProvider; +void FlowController::reinitializeSchedulersWithClearedThreadPool() { + using NonNullControllerServiceProviderPtr = gsl::not_null; restartThreadPool(); - timer_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - event_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); - cron_scheduler_ = std::make_shared(gsl::not_null(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + timer_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + event_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); + cron_scheduler_ = std::make_shared(NonNullControllerServiceProviderPtr(this), provenance_repo_, flow_file_repo_, content_repo_, configuration_, thread_pool_); Review comment: Consider using `gsl::make_not_null` and relying on implicit conversion to base class pointer. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (MINIFICPP-1335) TailFile generates an empty flowfile in every onTrigger call when used without delimiter
[ https://issues.apache.org/jira/browse/MINIFICPP-1335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard resolved MINIFICPP-1335. --- Resolution: Fixed > TailFile generates an empty flowfile in every onTrigger call when used > without delimiter > > > Key: MINIFICPP-1335 > URL: https://issues.apache.org/jira/browse/MINIFICPP-1335 > Project: Apache NiFi MiNiFi C++ > Issue Type: Bug >Reporter: Arpad Boda >Assignee: Arpad Boda >Priority: Major > Fix For: 0.8.0 > > Time Spent: 20m > Remaining Estimate: 0h > > When the file doesn't change and no delimiter is set, TailFile seeks to the > last position (which is actually EOF), reads 0 byte and creates a new > flowfile. > This should be avoided by online reading the file in case its size has > changed. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi-minifi-cpp] arpadboda closed pull request #896: MINIFICPP-1353 Fix a heap-use-after-free error
arpadboda closed pull request #896: URL: https://github.com/apache/nifi-minifi-cpp/pull/896 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Resolved] (NIFI-7754) JettyWebSocketClient to support HTTP Proxy
[ https://issues.apache.org/jira/browse/NIFI-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard resolved NIFI-7754. -- Fix Version/s: 1.13.0 Resolution: Fixed > JettyWebSocketClient to support HTTP Proxy > -- > > Key: NIFI-7754 > URL: https://issues.apache.org/jira/browse/NIFI-7754 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.11.4 >Reporter: Andreas Schöneck >Priority: Minor > Fix For: 1.13.0 > > Time Spent: 1h > Remaining Estimate: 0h > > In our corporate environment, we consume the Internet through a proxy (IIRC > it is Squid). > Websockets can also be consumed through it. > > Nifi's JettyWebSocketClient does not currently allow for specifying a proxy. > Can this scenario be supported without having to globally specify HTTP > proxies through system properties? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi] pvillard31 commented on pull request #4502: NIFI-7754 Support HTTP Proxy for JettyWebSocketClient
pvillard31 commented on pull request #4502: URL: https://github.com/apache/nifi/pull/4502#issuecomment-688384440 Merged to main, thanks @xasx ! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (NIFI-7754) JettyWebSocketClient to support HTTP Proxy
[ https://issues.apache.org/jira/browse/NIFI-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard updated NIFI-7754: - Issue Type: Improvement (was: Bug) > JettyWebSocketClient to support HTTP Proxy > -- > > Key: NIFI-7754 > URL: https://issues.apache.org/jira/browse/NIFI-7754 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.11.4 >Reporter: Andreas Schöneck >Priority: Minor > Time Spent: 1h > Remaining Estimate: 0h > > In our corporate environment, we consume the Internet through a proxy (IIRC > it is Squid). > Websockets can also be consumed through it. > > Nifi's JettyWebSocketClient does not currently allow for specifying a proxy. > Can this scenario be supported without having to globally specify HTTP > proxies through system properties? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (NIFI-7754) JettyWebSocketClient to support HTTP Proxy
[ https://issues.apache.org/jira/browse/NIFI-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard updated NIFI-7754: - Component/s: Extensions > JettyWebSocketClient to support HTTP Proxy > -- > > Key: NIFI-7754 > URL: https://issues.apache.org/jira/browse/NIFI-7754 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.11.4 >Reporter: Andreas Schöneck >Priority: Minor > Time Spent: 1h > Remaining Estimate: 0h > > In our corporate environment, we consume the Internet through a proxy (IIRC > it is Squid). > Websockets can also be consumed through it. > > Nifi's JettyWebSocketClient does not currently allow for specifying a proxy. > Can this scenario be supported without having to globally specify HTTP > proxies through system properties? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-7754) JettyWebSocketClient to support HTTP Proxy
[ https://issues.apache.org/jira/browse/NIFI-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191750#comment-17191750 ] ASF subversion and git services commented on NIFI-7754: --- Commit 44738b72cd4c63521cc9a61a7339eb9420936d09 in nifi's branch refs/heads/main from Andreas Schöneck [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=44738b7 ] NIFI-7754 - Support HTTP Proxy for JettyWebSocketClient Signed-off-by: Pierre Villard This closes #4502. > JettyWebSocketClient to support HTTP Proxy > -- > > Key: NIFI-7754 > URL: https://issues.apache.org/jira/browse/NIFI-7754 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.11.4 >Reporter: Andreas Schöneck >Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > In our corporate environment, we consume the Internet through a proxy (IIRC > it is Squid). > Websockets can also be consumed through it. > > Nifi's JettyWebSocketClient does not currently allow for specifying a proxy. > Can this scenario be supported without having to globally specify HTTP > proxies through system properties? -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi] asfgit closed pull request #4502: NIFI-7754 Support HTTP Proxy for JettyWebSocketClient
asfgit closed pull request #4502: URL: https://github.com/apache/nifi/pull/4502 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484451982 ## File path: docker/test/integration/test_http.py ## @@ -34,3 +33,26 @@ def test_invoke_listen(): cluster.deploy_flow(invoke_flow, name='minifi-invoke') assert cluster.check_output() + +def test_invoke_listen_with_proxy(): +""" +Verify sending through a proxy using InvokeHTTP to a receiver using ListenHTTP. +""" +invoke_flow = (GetFile('/tmp/input') + >> LogAttribute() + >> InvokeHTTP('http://minifi-listen:8080/contentListener', + method='POST', + proxy_host='http-proxy', + proxy_port='3128', + proxy_username='admin', + proxy_password='test101')) + +listen_flow = ListenHTTP(8080) >> LogAttribute() >> PutFile('/tmp/output') + +with DockerTestCluster(SingleFileOutputValidator('test')) as cluster: +cluster.put_test_data('test') +cluster.deploy_flow(None, engine='http-proxy') +cluster.deploy_flow(listen_flow, name='minifi-listen') +cluster.deploy_flow(invoke_flow, name='minifi-invoke') + +assert cluster.check_output() Review comment: Added check in [5047001](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/504700148228b571ee69a2d58322c235d5f71428) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484451198 ## File path: libminifi/include/utils/ByteArrayCallback.h ## @@ -65,7 +66,7 @@ class ByteInputCallBack : public InputStreamCallback { } virtual char *getBuffer(size_t pos) { -return ptr + pos; +return reinterpret_cast([0]) + pos; Review comment: Done in [839ed47](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/839ed47d2c3618a1fb1443f0929bfc8908051a87) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
szaszm commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484405587 ## File path: libminifi/include/utils/ByteArrayCallback.h ## @@ -65,7 +66,7 @@ class ByteInputCallBack : public InputStreamCallback { } virtual char *getBuffer(size_t pos) { -return ptr + pos; +return reinterpret_cast([0]) + pos; Review comment: Please use `vec.data()` to avoid out-of-bounds indexing when `vec` is empty, or index with pos. ```suggestion return [pos]; ``` or ```suggestion return vec.data() + pos; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Updated] (MINIFICPP-1359) FollowRedirects feature is unavailable in InvokeHTTP
[ https://issues.apache.org/jira/browse/MINIFICPP-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gabor Gyimesi updated MINIFICPP-1359: - Description: InvokeHTTP processor does not use FollowRedirects property, so if a HTTP request is moved, it does not follow the redirect. In Nifi and Java MiNiFi this feature is turned on by default, which means we have a different default behavior than other NiFi projects. (was: InvokeHTTP processor does not use FollowRedirects property, so if a HTTP request is moved, it does not follow the redirect. In Nifi and Java MiNiFi this feature is turned on by default, which means we have a different default behavior then other NiFi projects.) > FollowRedirects feature is unavailable in InvokeHTTP > > > Key: MINIFICPP-1359 > URL: https://issues.apache.org/jira/browse/MINIFICPP-1359 > Project: Apache NiFi MiNiFi C++ > Issue Type: New Feature >Reporter: Gabor Gyimesi >Priority: Minor > > InvokeHTTP processor does not use FollowRedirects property, so if a HTTP > request is moved, it does not follow the redirect. In Nifi and Java MiNiFi > this feature is turned on by default, which means we have a different default > behavior than other NiFi projects. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (MINIFICPP-1359) FollowRedirects feature is unavailable in InvokeHTTP
Gabor Gyimesi created MINIFICPP-1359: Summary: FollowRedirects feature is unavailable in InvokeHTTP Key: MINIFICPP-1359 URL: https://issues.apache.org/jira/browse/MINIFICPP-1359 Project: Apache NiFi MiNiFi C++ Issue Type: New Feature Reporter: Gabor Gyimesi InvokeHTTP processor does not use FollowRedirects property, so if a HTTP request is moved, it does not follow the redirect. In Nifi and Java MiNiFi this feature is turned on by default, which means we have a different default behavior then other NiFi projects. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (MINIFICPP-1358) SendBody property is unused in InvokeHTTP
Gabor Gyimesi created MINIFICPP-1358: Summary: SendBody property is unused in InvokeHTTP Key: MINIFICPP-1358 URL: https://issues.apache.org/jira/browse/MINIFICPP-1358 Project: Apache NiFi MiNiFi C++ Issue Type: Bug Reporter: Gabor Gyimesi SendBody attribute is defined but never used in InvokeHTTP processor. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484405469 ## File path: extensions/http-curl/processors/InvokeHTTP.cpp ## @@ -246,6 +246,20 @@ void InvokeHTTP::onSchedule(const std::shared_ptr if (context->getProperty(DisablePeerVerification.getName(), disablePeerVerification)) { utils::StringUtils::StringToBool(disablePeerVerification, disable_peer_verification_); } + + std::string proxy_value; + if (context->getProperty(ProxyHost.getName(), proxy_value) && !proxy_value.empty()) { +proxy_.host = proxy_value; + } + if (context->getProperty(ProxyPort.getName(), proxy_value) && !proxy_value.empty()) { +proxy_.port = std::stoi(proxy_value); Review comment: Done in [2bc2b75](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/429675f5d9a526c529080f4468d170e320f21dca) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Comment Edited] (NIFI-7749) listSFTP - Failed "Should not reach here"
[ https://issues.apache.org/jira/browse/NIFI-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191663#comment-17191663 ] Wiktor Kubicki edited comment on NIFI-7749 at 9/7/20, 12:01 PM: Same on nifi 1.11.4 and openjdk 11.0.8 2020-07-14 LTS. I have dump socks packages and saw, the user for proxy connection is nifi system user, not user from processor configuration. was (Author: kirhold): Same on nifi 1.11.4 and openjdk 11.0.8 2020-07-14 LTS > listSFTP - Failed "Should not reach here" > - > > Key: NIFI-7749 > URL: https://issues.apache.org/jira/browse/NIFI-7749 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.11.4 > Environment: Windows 10 + Java8 + One standalone NIFI >Reporter: Firenz >Priority: Major > Attachments: listSFTP.xml > > > Connecting to a B2B SFTP over HTTPs proxy : > > ListSFTP[id=9e4976a8-7457-3ded-7ddd-28cbf73202c8] > ListSFTP[id=9e4976a8-7457-3ded-7ddd-28cbf73202c8] failed to process session > due to {color:#FF}Should not reach here{color}; Processor > Administratively Yielded for 1 sec: java.lang.InternalError: Should not reach > here > > I cant find a clue in github for the keyword "Should not reach here". > Template with "masked" URLs/credentials. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Resolved] (NIFI-7506) CompressContent Add Snappy-Hadoop
[ https://issues.apache.org/jira/browse/NIFI-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard resolved NIFI-7506. -- Fix Version/s: 1.13.0 Resolution: Fixed > CompressContent Add Snappy-Hadoop > - > > Key: NIFI-7506 > URL: https://issues.apache.org/jira/browse/NIFI-7506 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Noe >Priority: Major > Fix For: 1.13.0 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > I have been using this recommendation for a few months now and want to > contribute it back > Bryan Bende > Nov 26, 2019, 12:54 PM > to users > Not sure if this is relevant, but snappy-java has a specific > SnappyHadoopCompatibleOutputStream so CompressContent could offer a > third snappy option like "snappy-hadoop" which used that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (NIFI-7506) CompressContent Add Snappy-Hadoop
[ https://issues.apache.org/jira/browse/NIFI-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pierre Villard updated NIFI-7506: - Component/s: Extensions > CompressContent Add Snappy-Hadoop > - > > Key: NIFI-7506 > URL: https://issues.apache.org/jira/browse/NIFI-7506 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Reporter: Noe >Priority: Major > Fix For: 1.13.0 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > I have been using this recommendation for a few months now and want to > contribute it back > Bryan Bende > Nov 26, 2019, 12:54 PM > to users > Not sure if this is relevant, but snappy-java has a specific > SnappyHadoopCompatibleOutputStream so CompressContent could offer a > third snappy option like "snappy-hadoop" which used that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-7749) listSFTP - Failed "Should not reach here"
[ https://issues.apache.org/jira/browse/NIFI-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191663#comment-17191663 ] Wiktor Kubicki commented on NIFI-7749: -- Same on nifi 1.11.4 and openjdk 11.0.8 2020-07-14 LTS > listSFTP - Failed "Should not reach here" > - > > Key: NIFI-7749 > URL: https://issues.apache.org/jira/browse/NIFI-7749 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions >Affects Versions: 1.11.4 > Environment: Windows 10 + Java8 + One standalone NIFI >Reporter: Firenz >Priority: Major > Attachments: listSFTP.xml > > > Connecting to a B2B SFTP over HTTPs proxy : > > ListSFTP[id=9e4976a8-7457-3ded-7ddd-28cbf73202c8] > ListSFTP[id=9e4976a8-7457-3ded-7ddd-28cbf73202c8] failed to process session > due to {color:#FF}Should not reach here{color}; Processor > Administratively Yielded for 1 sec: java.lang.InternalError: Should not reach > here > > I cant find a clue in github for the keyword "Should not reach here". > Template with "masked" URLs/credentials. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi] pvillard31 commented on pull request #4321: NIFI-7506 - CompressContent Add Snappy-Hadoop
pvillard31 commented on pull request #4321: URL: https://github.com/apache/nifi/pull/4321#issuecomment-688276758 Merged to main, thanks @noedetore This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484384960 ## File path: libminifi/src/FlowController.cpp ## @@ -311,56 +302,62 @@ void FlowController::unload() { if (running_) { stop(); } - if (initialized_) { -logger_->log_info("Unload Flow Controller"); -initialized_ = false; -name_ = ""; - } + logger_->log_info("Unload Flow Controller"); + name_ = ""; } -void FlowController::load(const std::shared_ptr , bool reload) { +void FlowController::restartThreadPool() { + auto base_shared_ptr = std::dynamic_pointer_cast(shared_from_this()); + thread_pool_.shutdown(); + thread_pool_.setMaxConcurrentTasks(configuration_->getInt(Configure::nifi_flow_engine_threads, 2)); + thread_pool_.setControllerServiceProvider(base_shared_ptr); + thread_pool_.start(); +} + +void FlowController::initializeUninitializedSchedulers() { + conditionalReloadScheduler(timer_scheduler_, !timer_scheduler_); + conditionalReloadScheduler(event_scheduler_, !event_scheduler_); + conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); +} + +void FlowController::reinitializeSchedulersWithNewThreadPool() { + using ControllerServiceProvider = core::controller::ControllerServiceProvider; Review comment: The reason I introduced this was actually because the lines were too long otherwise, and my ocd wanted them to align :D. Will add an alias for the `gsl::not_null`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] asfgit closed pull request #4321: NIFI-7506 - CompressContent Add Snappy-Hadoop
asfgit closed pull request #4321: URL: https://github.com/apache/nifi/pull/4321 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Commented] (NIFI-7506) CompressContent Add Snappy-Hadoop
[ https://issues.apache.org/jira/browse/NIFI-7506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191660#comment-17191660 ] ASF subversion and git services commented on NIFI-7506: --- Commit 85501e08e620caf9a668271e28d8bc99dc8307ba in nifi's branch refs/heads/main from noedetore [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=85501e0 ] NIFI-7506 add snappy-hadoop to CompressContent Signed-off-by: Pierre Villard This closes #4321. > CompressContent Add Snappy-Hadoop > - > > Key: NIFI-7506 > URL: https://issues.apache.org/jira/browse/NIFI-7506 > Project: Apache NiFi > Issue Type: Improvement >Reporter: Noe >Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > > I have been using this recommendation for a few months now and want to > contribute it back > Bryan Bende > Nov 26, 2019, 12:54 PM > to users > Not sure if this is relevant, but snappy-java has a specific > SnappyHadoopCompatibleOutputStream so CompressContent could offer a > third snappy option like "snappy-hadoop" which used that. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484382473 ## File path: libminifi/include/FlowController.h ## @@ -338,6 +335,10 @@ class FlowController : public core::controller::ControllerServiceProvider, publi utils::optional loadShutdownTimeoutFromConfiguration(); private: + void restartThreadPool(); + void initializeUninitializedSchedulers(); + void reinitializeSchedulersWithNewThreadPool(); Review comment: It calls `ThreadPool::shutdown` which clears any running activities, joins all threads, and clears all worker threads as well (also resets config). The `ThreadPool` object is not new as in newly allocated, but new as the pool brand new threads. I agree that it is not the best name, will rename it to `reinitializeSchedulersWithClearedThreadPool()`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
hunyadi-dev commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484376022 ## File path: libminifi/include/FlowController.h ## @@ -100,18 +100,15 @@ class FlowController : public core::controller::ControllerServiceProvider, publi } // Load flow xml from disk, after that, create the root process group and its children, initialize the flows - virtual void load(const std::shared_ptr = nullptr, bool reload = false); + virtual void load(const std::shared_ptr = nullptr); // Whether the Flow Controller is start running bool isRunning() override { return running_.load() || updating_.load(); } - // Whether the Flow Controller has already been initialized (loaded flow XML) - virtual bool isInitialized() { -return initialized_.load(); - } // Start to run the Flow Controller which internally start the root process group and all its children + // int16_t start() override; Review comment: It is a leftover from the refactoring, will be removed. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #890: MINIFICPP-1288 - FlowController start/load refactor
arpadboda commented on a change in pull request #890: URL: https://github.com/apache/nifi-minifi-cpp/pull/890#discussion_r484368876 ## File path: libminifi/include/FlowController.h ## @@ -338,6 +335,10 @@ class FlowController : public core::controller::ControllerServiceProvider, publi utils::optional loadShutdownTimeoutFromConfiguration(); private: + void restartThreadPool(); + void initializeUninitializedSchedulers(); + void reinitializeSchedulersWithNewThreadPool(); Review comment: I'm not sure if the name of this function actually reflect what it does. There is no new threadpool, as far as I see it's created only once and stopped/started according to usage later. ## File path: libminifi/include/FlowController.h ## @@ -100,18 +100,15 @@ class FlowController : public core::controller::ControllerServiceProvider, publi } // Load flow xml from disk, after that, create the root process group and its children, initialize the flows - virtual void load(const std::shared_ptr = nullptr, bool reload = false); + virtual void load(const std::shared_ptr = nullptr); // Whether the Flow Controller is start running bool isRunning() override { return running_.load() || updating_.load(); } - // Whether the Flow Controller has already been initialized (loaded flow XML) - virtual bool isInitialized() { -return initialized_.load(); - } // Start to run the Flow Controller which internally start the root process group and all its children + // int16_t start() override; Review comment: What's the purpose of this new comment here? ## File path: libminifi/src/FlowController.cpp ## @@ -311,56 +302,62 @@ void FlowController::unload() { if (running_) { stop(); } - if (initialized_) { -logger_->log_info("Unload Flow Controller"); -initialized_ = false; -name_ = ""; - } + logger_->log_info("Unload Flow Controller"); + name_ = ""; } -void FlowController::load(const std::shared_ptr , bool reload) { +void FlowController::restartThreadPool() { + auto base_shared_ptr = std::dynamic_pointer_cast(shared_from_this()); + thread_pool_.shutdown(); + thread_pool_.setMaxConcurrentTasks(configuration_->getInt(Configure::nifi_flow_engine_threads, 2)); + thread_pool_.setControllerServiceProvider(base_shared_ptr); + thread_pool_.start(); +} + +void FlowController::initializeUninitializedSchedulers() { + conditionalReloadScheduler(timer_scheduler_, !timer_scheduler_); + conditionalReloadScheduler(event_scheduler_, !event_scheduler_); + conditionalReloadScheduler(cron_scheduler_, !cron_scheduler_); +} + +void FlowController::reinitializeSchedulersWithNewThreadPool() { + using ControllerServiceProvider = core::controller::ControllerServiceProvider; Review comment: Just fancy: in case we increase code readability this way, why don't we alias the templated gsl::not_null class instead of the parameter? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] simonbence commented on a change in pull request #4420: NIFI-7429 Adding status history for system level metrics
simonbence commented on a change in pull request #4420: URL: https://github.com/apache/nifi/pull/4420#discussion_r484373564 ## File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/status/history/VolatileComponentStatusRepository.java ## @@ -164,6 +183,182 @@ public StatusHistory getRemoteProcessGroupStatusHistory(final String remoteGroup return getStatusHistory(remoteGroupId, true, DEFAULT_RPG_METRICS, start, end, preferredDataPoints); } +@Override +public StatusHistory getNodeStatusHistory() { +final List nodeStatusList = nodeStatuses.asList(); +final List> gcStatusList = gcStatuses.asList(); +final LinkedList snapshots = new LinkedList<>(); + +final Set> metricDescriptors = new HashSet<>(DEFAULT_NODE_METRICS); +final List>> gcMetricDescriptors = new LinkedList<>(); +final List>> gcMetricDescriptorsDifferential = new LinkedList<>(); +final List> contentStorageStatusDescriptors = new LinkedList<>(); +final List> provenanceStorageStatusDescriptors = new LinkedList<>(); + +int ordinal = DEFAULT_NODE_METRICS.size() - 1; + +// Uses the first measurement as reference for repository metrics descriptors +if (nodeStatusList.size() > 0) { +final NodeStatus referenceNodeStatus = nodeStatusList.get(0); +int contentStorageNumber = 0; +int provenanceStorageNumber = 0; + +for (int i = 0; i < referenceNodeStatus.getContentRepositories().size(); i++) { +final int storageNumber = i; +final int counter = metricDescriptors.size() - 1 + NUMBER_OF_STORAGE_METRICS * contentStorageNumber; + +contentStorageStatusDescriptors.add(new StandardMetricDescriptor<>( Review comment: I reworked this part a bit. Mainly simplification. Also I extracted the descriptor creation parts to make the flow easier to read. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi] simonbence commented on a change in pull request #4420: NIFI-7429 Adding status history for system level metrics
simonbence commented on a change in pull request #4420: URL: https://github.com/apache/nifi/pull/4420#discussion_r484372894 ## File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/status/history/VolatileComponentStatusRepository.java ## @@ -164,6 +183,182 @@ public StatusHistory getRemoteProcessGroupStatusHistory(final String remoteGroup return getStatusHistory(remoteGroupId, true, DEFAULT_RPG_METRICS, start, end, preferredDataPoints); } +@Override +public StatusHistory getNodeStatusHistory() { +final List nodeStatusList = nodeStatuses.asList(); +final List> gcStatusList = gcStatuses.asList(); +final LinkedList snapshots = new LinkedList<>(); + +final Set> metricDescriptors = new HashSet<>(DEFAULT_NODE_METRICS); +final List>> gcMetricDescriptors = new LinkedList<>(); +final List>> gcMetricDescriptorsDifferential = new LinkedList<>(); +final List> contentStorageStatusDescriptors = new LinkedList<>(); +final List> provenanceStorageStatusDescriptors = new LinkedList<>(); + +int ordinal = DEFAULT_NODE_METRICS.size() - 1; Review comment: Thanks, it's simplified a bit! This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484365864 ## File path: libminifi/include/utils/HTTPClient.h ## @@ -300,6 +319,9 @@ class BaseHTTPClient { virtual void setUploadCallback(HTTPUploadCallback *callbackObj) { } + virtual void setSeekFunction(HTTPUploadCallback *callbackObj) { + } Review comment: Done in [fd3a7c6](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/fd3a7c653202c7cdd460153175d3deb13b7651ce) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484365267 ## File path: docker/test/integration/test_http.py ## @@ -34,3 +33,26 @@ def test_invoke_listen(): cluster.deploy_flow(invoke_flow, name='minifi-invoke') assert cluster.check_output() + +def test_invoke_listen_with_proxy(): +""" +Verify sending through a proxy using InvokeHTTP to a receiver using ListenHTTP. +""" +invoke_flow = (GetFile('/tmp/input') + >> LogAttribute() + >> InvokeHTTP('http://minifi-listen:8080/contentListener', + method='POST', + proxy_host='http-proxy', + proxy_port='3128', + proxy_username='admin', + proxy_password='test101')) + +listen_flow = ListenHTTP(8080) >> LogAttribute() >> PutFile('/tmp/output') + +with DockerTestCluster(SingleFileOutputValidator('test')) as cluster: +cluster.put_test_data('test') +cluster.deploy_flow(None, engine='http-proxy') +cluster.deploy_flow(listen_flow, name='minifi-listen') +cluster.deploy_flow(invoke_flow, name='minifi-invoke') + +assert cluster.check_output() Review comment: We could check the acces logs of the http-proxy, that's what I was checking manually, I will add it to the test. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484364547 ## File path: libminifi/include/utils/ByteArrayCallback.h ## @@ -57,6 +57,7 @@ class ByteInputCallBack : public InputStreamCallback { } virtual void seek(size_t pos) { +ptr = [pos]; Review comment: Curl proxy authentication requires 2 steps (getting the available authentication methods then authenticate with the chosen one) and after the first step it needs a data rewind which requires implementing the seek function. You are right, it broke the getBuffer that's what partly caused the test failures, it is fixed in [e0e31c5](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/e0e31c5e96e0ad29c54ca09230a845588664b864) ## File path: extensions/http-curl/processors/InvokeHTTP.h ## @@ -155,8 +155,10 @@ class InvokeHTTP : public core::Processor { bool use_chunked_encoding_{false}; // penalize on no retry bool penalize_no_retry_{false}; - // disable peer verification ( makes susceptible for MITM attacks ) - bool disable_peer_verification_{false}; + bool disable_peer_verification_{false}; // ( makes susceptible for MITM attacks ) + bool follow_redirects_{true}; Review comment: Fixed in [e0e31c5](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/e0e31c5e96e0ad29c54ca09230a845588664b864) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] lordgamez commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
lordgamez commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484364547 ## File path: libminifi/include/utils/ByteArrayCallback.h ## @@ -57,6 +57,7 @@ class ByteInputCallBack : public InputStreamCallback { } virtual void seek(size_t pos) { +ptr = [pos]; Review comment: Curl proxy authentication requires 2 steps (getting the available authentication methods then authenticate with the chosen one) and after the first step it needs a data rewind which requires implementing the seek function. You are right, it broke the getBuffer that's what partly caused the test failures, it is fixed in [fd3a7c6](https://github.com/apache/nifi-minifi-cpp/pull/897/commits/fd3a7c653202c7cdd460153175d3deb13b7651ce) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
szaszm commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484344801 ## File path: docker/test/integration/test_http.py ## @@ -34,3 +33,26 @@ def test_invoke_listen(): cluster.deploy_flow(invoke_flow, name='minifi-invoke') assert cluster.check_output() + +def test_invoke_listen_with_proxy(): +""" +Verify sending through a proxy using InvokeHTTP to a receiver using ListenHTTP. +""" +invoke_flow = (GetFile('/tmp/input') + >> LogAttribute() + >> InvokeHTTP('http://minifi-listen:8080/contentListener', + method='POST', + proxy_host='http-proxy', + proxy_port='3128', + proxy_username='admin', + proxy_password='test101')) + +listen_flow = ListenHTTP(8080) >> LogAttribute() >> PutFile('/tmp/output') + +with DockerTestCluster(SingleFileOutputValidator('test')) as cluster: +cluster.put_test_data('test') +cluster.deploy_flow(None, engine='http-proxy') +cluster.deploy_flow(listen_flow, name='minifi-listen') +cluster.deploy_flow(invoke_flow, name='minifi-invoke') + +assert cluster.check_output() Review comment: Do we have a way to verify that the traffic really went through the proxy and didn't bypass it like before this PR? ## File path: libminifi/include/utils/ByteArrayCallback.h ## @@ -57,6 +57,7 @@ class ByteInputCallBack : public InputStreamCallback { } virtual void seek(size_t pos) { +ptr = [pos]; Review comment: What's the purpose of this change? I think this may break `getBuffer`. ## File path: extensions/http-curl/processors/InvokeHTTP.h ## @@ -155,8 +155,10 @@ class InvokeHTTP : public core::Processor { bool use_chunked_encoding_{false}; // penalize on no retry bool penalize_no_retry_{false}; - // disable peer verification ( makes susceptible for MITM attacks ) - bool disable_peer_verification_{false}; + bool disable_peer_verification_{false}; // ( makes susceptible for MITM attacks ) + bool follow_redirects_{true}; Review comment: I think `follow_redirects_` is unused This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
hunyadi-dev commented on pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#issuecomment-688205425 Please check the CI errors, they seem related to the change. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] arpadboda commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
arpadboda commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484283890 ## File path: extensions/http-curl/processors/InvokeHTTP.cpp ## @@ -246,6 +246,20 @@ void InvokeHTTP::onSchedule(const std::shared_ptr if (context->getProperty(DisablePeerVerification.getName(), disablePeerVerification)) { utils::StringUtils::StringToBool(disablePeerVerification, disable_peer_verification_); } + + std::string proxy_value; + if (context->getProperty(ProxyHost.getName(), proxy_value) && !proxy_value.empty()) { +proxy_.host = proxy_value; + } + if (context->getProperty(ProxyPort.getName(), proxy_value) && !proxy_value.empty()) { +proxy_.port = std::stoi(proxy_value); Review comment: The other reason to remove if statements is updating the config: we should null the members, otherwise proxy properties can't be removed without restarting minifi. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
adamdebreceni commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484279314 ## File path: libminifi/include/utils/HTTPClient.h ## @@ -300,6 +319,9 @@ class BaseHTTPClient { virtual void setUploadCallback(HTTPUploadCallback *callbackObj) { } + virtual void setSeekFunction(HTTPUploadCallback *callbackObj) { + } Review comment: it seems like `HTTPClient` is the only class inheriting from it, and noone directly instantiates a `BaseHTTPClient`, could we make these noop virtual methods pure virtual? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
adamdebreceni commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484279314 ## File path: libminifi/include/utils/HTTPClient.h ## @@ -300,6 +319,9 @@ class BaseHTTPClient { virtual void setUploadCallback(HTTPUploadCallback *callbackObj) { } + virtual void setSeekFunction(HTTPUploadCallback *callbackObj) { + } Review comment: it seems like `HTTPClient` is the only class inheriting from it, and noone directly instantiates a BaseHTTPClient, could we make these noop virtual methods pure virtual? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484278690 ## File path: nanofi/src/sitetosite/CRawSocketProtocol.c ## @@ -153,7 +153,7 @@ int handShake(struct CRawSiteToSiteClient * client) { if (client->_currentVersion >= 3) { -//ret = client->_peer->writeUTF(client->_peer->getURL()); +// ret = client->_peer->writeUTF(client->_peer->getURL()); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484278402 ## File path: nanofi/src/sitetosite/CRawSocketProtocol.c ## @@ -72,10 +72,10 @@ typedef struct { int handShake(struct CRawSiteToSiteClient * client) { if (client->_peer_state != ESTABLISHED) { -//client->logger_->log_error("Site2Site peer state is not established while handshake"); +// client->logger_->log_error("Site2Site peer state is not established while handshake"); return -1; } - //client->logger_->log_debug("Site2Site Protocol Perform hand shake with destination port %s", client->_port_id_str); + // client->logger_->log_debug("Site2Site Protocol Perform hand shake with destination port %s", client->_port_id_str); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484269857 ## File path: nanofi/src/sitetosite/CRawSocketProtocol.c ## @@ -72,10 +72,10 @@ typedef struct { int handShake(struct CRawSiteToSiteClient * client) { if (client->_peer_state != ESTABLISHED) { -//client->logger_->log_error("Site2Site peer state is not established while handshake"); +// client->logger_->log_error("Site2Site peer state is not established while handshake"); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484268701 ## File path: nanofi/src/core/cstream.c ## @@ -149,7 +149,7 @@ int readUTFLen(uint32_t * utflen, cstream * stream) { } int readUTF(char * buf, uint32_t buflen, cstream * stream) { - //return stream->impl->readData((uint8_t*)buf, buflen); + // return stream->impl->readData((uint8_t*)buf, buflen); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484268088 ## File path: nanofi/include/sitetosite/CSiteToSite.h ## @@ -332,7 +332,7 @@ static int writeData(CTransaction * transaction, const uint8_t *value, int size) } static int readData(CTransaction * transaction, uint8_t *buf, int buflen) { - //int ret = transaction->_stream->read(buf, buflen); + // int ret = transaction->_stream->read(buf, buflen); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484267747 ## File path: nanofi/include/sitetosite/CSiteToSite.h ## @@ -267,7 +267,7 @@ typedef struct { // Whether received data is available int _dataAvailable; - //org::apache::nifi::minifi::io::BaseStream* _stream; + // org::apache::nifi::minifi::io::BaseStream* _stream; Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484266683 ## File path: extensions/windows-event-log/TailEventLog.cpp ## @@ -115,7 +115,7 @@ void TailEventLog::onTrigger(const std::shared_ptr flowFile->addAttribute("event_time", getTimeStamp(event_record->TimeGenerated)); flowFile->addAttribute("event_type", typeToString(event_record->EventType)); - //flowFile->addAttribute("", event_message); + // flowFile->addAttribute("", event_message); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484266987 ## File path: main/MiNiFiWindowsService.cpp ## @@ -27,7 +27,7 @@ #include "MainHelper.h" #include "core/FlowConfiguration.h" -//#define DEBUG_SERVICE +// #define DEBUG_SERVICE Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #865: MINIFICPP-1325 - Separate process group processor lookups for IDs and names, allow constructing ID-s from strings
hunyadi-dev commented on a change in pull request #865: URL: https://github.com/apache/nifi-minifi-cpp/pull/865#discussion_r484265845 ## File path: libminifi/src/utils/Id.cpp ## @@ -48,6 +48,8 @@ namespace nifi { namespace minifi { namespace utils { +const char* Identifier::UUID_FORMAT_STRING = "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"; Review comment: Made `UUID_FORMAT_STRING` `constexpr`. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a change in pull request #897: MINIFICPP-1357 Implement and test proxy handling in InvokeHTTP
adamdebreceni commented on a change in pull request #897: URL: https://github.com/apache/nifi-minifi-cpp/pull/897#discussion_r484263666 ## File path: extensions/http-curl/processors/InvokeHTTP.cpp ## @@ -246,6 +246,20 @@ void InvokeHTTP::onSchedule(const std::shared_ptr if (context->getProperty(DisablePeerVerification.getName(), disablePeerVerification)) { utils::StringUtils::StringToBool(disablePeerVerification, disable_peer_verification_); } + + std::string proxy_value; + if (context->getProperty(ProxyHost.getName(), proxy_value) && !proxy_value.empty()) { +proxy_.host = proxy_value; + } + if (context->getProperty(ProxyPort.getName(), proxy_value) && !proxy_value.empty()) { +proxy_.port = std::stoi(proxy_value); Review comment: `getProperty` is a templated method, that depending on the second argument's type carries out checks and conversions from `std::string`, so feel free to pass `proxy.port` as the second argument here, moreover I believe `getProperty` adheres to the contract "the out argument is not modified on failure, missing value", so we don't even need the "if"s here This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484263554 ## File path: extensions/sftp/tests/FetchSFTPTests.cpp ## @@ -142,7 +142,7 @@ class FetchSFTPTestsFixture { std::fstream file; std::stringstream ss; ss << src_dir << "/vfs/" << relative_path; - utils::file::FileUtils::create_dir(utils::file::FileUtils::get_parent_path(ss.str())); // TODO + utils::file::FileUtils::create_dir(utils::file::FileUtils::get_parent_path(ss.str())); // TODO Review comment: I would refrain from deleting `TODO`-s, someone might know what they stand for. I could not trace it back what it could mean, it was added along with the function by Daniel Bakai. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484260676 ## File path: extensions/libarchive/FocusArchiveEntry.cpp ## @@ -130,7 +130,7 @@ void FocusArchiveEntry::onTrigger(core::ProcessContext *context, core::ProcessSe } archiveStack.push(archiveMetadata); -//logger_->log_debug(archiveMetadata.toJsonString()); +// logger_->log_debug(archiveMetadata.toJsonString()); Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484260410 ## File path: extensions/jni/jvm/JniProcessContext.h ## @@ -69,8 +69,8 @@ DLL_EXPORT jstring JNICALL Java_org_apache_nifi_processor_JniProcessContext_getN DLL_EXPORT jobject JNICALL Java_org_apache_nifi_processor_JniProcessContext_getControllerServiceLookup(JNIEnv *env, jobject obj); -//getname -//getControllerservicelookup +// getname +// getControllerservicelookup Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484259906 ## File path: extensions/http-curl/tests/HTTPHandlers.h ## @@ -428,7 +428,7 @@ class HeartbeatHandler : public ServerAwareHandler { void verify(struct mg_connection *conn) { auto post_data = readPayload(conn); -//std::cerr << post_data << std::endl; +// std::cerr << post_data << std::endl; Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #884: MINIFICPP-1203 - Correct linter reported missing spaces around comments
hunyadi-dev commented on a change in pull request #884: URL: https://github.com/apache/nifi-minifi-cpp/pull/884#discussion_r484259666 ## File path: extensions/http-curl/tests/CivetStream.h ## @@ -119,7 +119,7 @@ class CivetStream : public io::BaseStream { return readData(reinterpret_cast([0]), sizeof(t)); } - //size_t pos; + // size_t pos; Review comment: Deleted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[jira] [Created] (MINIFICPP-1357) Proxy properties of invokehttp are not respected
Gabor Gyimesi created MINIFICPP-1357: Summary: Proxy properties of invokehttp are not respected Key: MINIFICPP-1357 URL: https://issues.apache.org/jira/browse/MINIFICPP-1357 Project: Apache NiFi MiNiFi C++ Issue Type: Bug Reporter: Gabor Gyimesi Assignee: Gabor Gyimesi All the proxy properties (host, port, use, pass) are ignored. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (NIFI-7761) Allow HandleHttpRequest to add specified form data to FlowFile attributes
[ https://issues.apache.org/jira/browse/NIFI-7761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17191462#comment-17191462 ] Otto Fowler commented on NIFI-7761: --- PR is up with implementation as mentioned. > Allow HandleHttpRequest to add specified form data to FlowFile attributes > - > > Key: NIFI-7761 > URL: https://issues.apache.org/jira/browse/NIFI-7761 > Project: Apache NiFi > Issue Type: Improvement >Affects Versions: 1.12.0 >Reporter: Matt Gregory >Assignee: Otto Fowler >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > NIFI-7420 changed the behavior of HandleHttpRequest to no longer add > http.param.* attributes for all parts of a multipart request. This was nice > for scenarios when a single file + form data was being sent in a multipart as > the form data was readily accessible as FlowFile attributes. > > A nice approach suggested by ottobackwards [in > Slack|https://apachenifi.slack.com/archives/C0L9VCD47/p1598295952058200] is > to allow a list of form fields to be specified to the HandleHttpRequest > processor as a property. I would imagine this working similarly to how > LogAttribute specifies Attributes to Log, with a simple comma-separated list. > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[GitHub] [nifi] ottobackwards opened a new pull request #4513: NIFI-7761 Allow HandleHttpRequest to add specified form data to FlowF…
ottobackwards opened a new pull request #4513: URL: https://github.com/apache/nifi/pull/4513 …ile attributes To verify: - add the attached template - configure the HandleHttpRequest `Parameters to Attributes List` property to have `data1,DataTwo` - Enable the context service run the flow. Observe the new attributes in the nifi-app.log Thank you for submitting a contribution to Apache NiFi. Please provide a short description of the PR here: Description of PR _Enables X functionality; fixes bug NIFI-._ In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [x] Does your PR title start with **NIFI-** where 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 `main`)? - [x] Is your initial contribution a single, squashed commit? _Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not `squash` or use `--force` when pushing to allow for clean monitoring of changes._ ### For code changes: - [x] Have you ensured that the full suite of tests is executed via `mvn -Pcontrib-check clean install` at the root `nifi` folder? - [-] Have you written or updated unit tests to verify your changes? - [x] Have you verified that the full build is successful on JDK 8? - [-] Have you verified that the full build is successful on JDK 11? - [-] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [-] If applicable, have you updated the `LICENSE` file, including the main `LICENSE` file under `nifi-assembly`? - [-] If applicable, have you updated the `NOTICE` file, including the main `NOTICE` file found under `nifi-assembly`? - [x] If adding new Properties, have you added `.displayName` in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [x] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check GitHub Actions CI for build issues and submit an update to your PR as soon as possible. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org