-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting unknown flow for the packages missing latest version in dail…
…y ingestion report
- Loading branch information
Showing
5 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,6 @@ RUN yum install -y epel-release &&\ | |
mkdir -p ${APP_DIR} | ||
|
||
RUN pip3 install --upgrade pip | ||
RUN pip3 install git+https://github.com/fabric8-analytics/fabric8-analytics-utils.git@${F8A_UTIL_VERSION} | ||
RUN pip3 install git+https://[email protected]/fabric8-analytics/fabric8-analytics-version-comparator.git#egg=f8a_version_comparator | ||
|
||
COPY f8a_report/ ${APP_DIR}/f8a_report | ||
COPY requirements.txt ${APP_DIR} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"""Ingestion functions used to trigger a flow.""" | ||
|
||
import logging | ||
from selinon import run_flow | ||
from f8a_worker.utils import MavenCoordinates | ||
import os | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
def server_create_analysis(ecosystem, package, version, force=False, force_graph_sync=False): | ||
"""Create bayesianApiFlow handling analyses for specified EPV. | ||
:param ecosystem: ecosystem for which the flow should be run | ||
:param package: package for which should be flow run | ||
:param version: package version | ||
:param force: force run flow even specified EPV exists | ||
:param force_graph_sync: force synchronization to graph | ||
:return: dispatcher ID handling flow | ||
""" | ||
component = MavenCoordinates.normalize_str(package) if ecosystem == 'maven' else package | ||
|
||
args = { | ||
"ecosystem": ecosystem, | ||
"force": force, | ||
"force_graph_sync": force_graph_sync, | ||
"name": component, | ||
"recursive_limit": 0, | ||
"version": version | ||
} | ||
|
||
if os.environ.get("WORKER_ADMINISTRATION_REGION", "") == "api": | ||
return server_run_flow('bayesianApiFlow', args) | ||
else: | ||
return server_run_flow('bayesianFlow', args) | ||
|
||
|
||
def server_run_flow(flow_name, flow_args): | ||
"""Run a flow. | ||
:param flow_name: name of flow to be run as stated in YAML config file | ||
:param flow_args: arguments for the flow | ||
:return: dispatcher ID handling flow | ||
""" | ||
logger.info('Running flow {} for args {}'.format(flow_name, flow_args)) | ||
dispacher_id = run_flow(flow_name, flow_args) | ||
|
||
return dispacher_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters