[
https://issues.apache.org/jira/browse/SDAP-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454879#comment-16454879
]
ASF GitHub Bot commented on SDAP-65:
------------------------------------
fgreg closed pull request #7: SDAP-65 ningesterpy output not printing in docker
logs
URL: https://github.com/apache/incubator-sdap-ningesterpy/pull/7
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
new file mode 100644
index 0000000..09cc76f
--- /dev/null
+++ b/jenkins/Jenkinsfile
@@ -0,0 +1,48 @@
+#!groovy
+
+
+pipeline{
+ agent any
+
+ parameters {
+ string(defaultValue: '', description: 'Branch of the
incubator-sdap-nexusproto project to build against. Leave blank to use version
from pip specified in requirements (this does not currently work).', name:
'buildNexusprotoBranch')
+ }
+
+ stages{
+ stage("Build nexusproto From Source"){
+ agent {
+ docker {
+ image 'maven:3-jdk-8'
+ args '-v $HOME/.m2:/root/.m2'
+ }
+ }
+ when{
+ expression { return params.buildNexusprotoBranch ==~
/SDAP-\d+/ }
+ }
+ steps{
+ git branch: "${params.buildNexusprotoBranch}", credentialsId:
'fgreg-github', url: 'https://github.com/apache/incubator-sdap-nexusproto'
+ sh './gradlew clean build tarPython'
+ stash includes: 'distribution/*.tar.gz', name: 'nexusproto'
+ }
+ }
+ stage("Build"){
+ agent {
+ docker {
+ image 'continuumio/miniconda3:latest'
+ args '-v $HOME/.conda:/.conda/pkgs'
+ }
+ }
+ steps{
+ unstash 'nexusproto'
+ sh "pip install distribution/*.tar.gz"
+ git branch: "${env.BRANCH_NAME}", credentialsId:
'fgreg-github', url: 'https://github.com/apache/incubator-sdap-ningesterpy'
+ sh 'python setup.py sdist'
+ }
+ }
+ }
+ post {
+ always {
+ archiveArtifacts artifacts: 'dist/*.tar.gz', fingerprint: true,
onlyIfSuccessful: true
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdap/ningesterpy.py b/sdap/ningesterpy.py
index ff143ed..e036952 100644
--- a/sdap/ningesterpy.py
+++ b/sdap/ningesterpy.py
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
+import sys
import uuid
from flask import Flask, request, jsonify, Response
@@ -25,8 +26,9 @@
from werkzeug.exceptions import default_exceptions
from sdap.processors.processorchain import ProcessorChain, ProcessorNotFound,
MissingProcessorArguments
+
logging.basicConfig(format="%(asctime)s %(levelname)s %(process)d ---
[%(name)s.%(funcName)s:%(lineno)d] %(message)s",
- datefmt="%Y-%m-%d %H:%M:%S")
+ datefmt="%Y-%m-%d %H:%M:%S", stream=sys.stdout)
applog = logging.getLogger(__name__)
applog.setLevel(logging.INFO)
@@ -81,6 +83,11 @@ def run_processor_chain():
return Response(result, mimetype='application/octet-stream')
[email protected]('/healthcheck', methods=['GET'], )
+def health_check():
+ return ''
+
+
def handle_error(e):
error_id = uuid.uuid4()
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> ningesterpy output not printing in docker logs
> ----------------------------------------------
>
> Key: SDAP-65
> URL: https://issues.apache.org/jira/browse/SDAP-65
> Project: Apache Science Data Analytics Platform
> Issue Type: Bug
> Components: nexus
> Reporter: Frank Greguska
> Assignee: Frank Greguska
> Priority: Major
>
> The docker logs are supposed to print the stdout from the python process into
> the logs with prefix `[ningesterpy]` but this is not currently working.
> In the current ningester docker image ningesterpy is run without the `-u`
> flag meaning that stdout can be buffered. ThisĀ can cause theĀ `[ningesterpy]`
> messages to not show up in the logs.
> Need to modify the entrypoint script to add `-u` to the python command.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)