Skip to content

Commit

Permalink
Merge pull request #452 from ARGOeu/devel
Browse files Browse the repository at this point in the history
Version 3.4.2
  • Loading branch information
themiszamani authored Jun 9, 2022
2 parents f21cedd + 6f7edc9 commit fad4548
Show file tree
Hide file tree
Showing 53 changed files with 10,121 additions and 4,203 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [3.4.2] - 2022-06-09

### Added

* ARGO-3734 Introduce topology endpoint report filters
* ARGO-3671 Introduce page for handling metric tags
* ARGO-3686 Introduce tool for local import of EOSC services

### Changed

* ARGO-3841 Bump libs
* ARGO-3733 Do not assume both types of topology exists for every tenant
* ARGO-3523 Clean webpack deprecations
* ARGO-3694 Limit number of tries of executing backend and frontend tests

### Fixed

* ARGO-3693 Fix false negative unit tests occuring occasionally
* ARGO-3730 Remove toggle of Reports WEB-API CRUD
* ARGO-3707 Bug when handling topology entities values with whitespaces

## [3.4.1] - 2022-04-07

### Added
Expand Down
50 changes: 22 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,17 @@ pipeline {
{
echo 'Executing backend tests...'
sh '''
while (( 1 ))
do
sleep 5
containers_running=$(docker ps -f name=poem-react-tests -f status=running -q)
if [ ! -z "$containers_running" ]
then
echo "running"
docker exec -i poem-react-tests-webapp /home/jenkins/execute-backend-tests.sh
exit $?
else
echo "not running"
fi
done
exit 1
sleep 5
containers_running=$(docker ps -f name=poem-react-tests -f status=running -q)
if [ ! -z "$containers_running" ]
then
echo "Backend container running"
docker exec -i poem-react-tests-webapp /home/jenkins/execute-backend-tests.sh
exit $?
else
echo "not running"
exit 1
fi
'''
}
catch (Exception err)
Expand All @@ -90,20 +87,17 @@ pipeline {
{
echo 'Executing frontend tests...'
sh '''
while (( 1 ))
do
sleep 5
containers_running=$(docker ps -f name=poem-react-tests -f status=running -q)
if [ ! -z "$containers_running" ]
then
echo "running"
docker exec -i poem-react-tests-webapp /home/jenkins/execute-frontend-tests.sh
exit $?
else
echo "not running"
fi
done
exit 1
sleep 5
containers_running=$(docker ps -f name=poem-react-tests -f status=running -q)
if [ ! -z "$containers_running" ]
then
echo "Frontend container running"
docker exec -i poem-react-tests-webapp /home/jenkins/execute-frontend-tests.sh
exit $?
else
echo "not running"
exit 1
fi
'''
}
catch (Exception err)
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ VENV = /home/pyvenv/poem/
| Security key generator | `VENV/bin/poem-genseckey` |
| Token set/create | `VENV/bin/poem-token` |
| Tenant management | `VENV/bin/poem-tenant` |
| Import services from json file | `VENV/bin/poem-importservices` |
| Django `manage.py` wrapper | `VENV/bin/poem-manage` |
| Static data served by Apache | `VENV/usr/share/poem/` |
| Main application code | `VENV/lib/python3.6/site-packages/Poem/` |
Expand Down Expand Up @@ -245,13 +246,11 @@ Part of the REST API is protected by token so for tenants that consume those API
ReportsTopologyTags = https://api.devel.argo.grnet.gr/api/v2/topology/tags
ReportsTopologyGroups = https://api.devel.argo.grnet.gr/api/v2/topology/groups
ReportsTopologyEndpoints = https://api.devel.argo.grnet.gr/api/v2/topology/endpoints
ReportsCRUD = True

This section lists WEB-API methods for the resources that are not stored in
POEM's PostgreSQL DB, but instead are consumed from ARGO WEB-API services. POEM
actively polls the PI methods and is doing the full round of CRUD operations on
them. `ReportsCRUD` enables the polling of the WEB-API method related to ARGO
Reports handling.
them.

### GENERAL_<tenant_name>

Expand Down Expand Up @@ -354,7 +353,7 @@ Tenant metadata is:
Tenant metadata should be listed in `poem.conf` with corresponding sections:
```
[SECURITY]
AllowedHosts = egi.poem.devel.argo.grnet.gr
AllowedHosts = poem.devel.argo.grnet.gr, egi.poem.devel.argo.grnet.gr
[GENERAL_EGI]
SamlLoginString = Login using EGI CHECK-IN
Expand Down
43 changes: 43 additions & 0 deletions bin/poem-importservices
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/sh

RUNASUSER="apache"
SITEPACK=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")

usage()
{
printf "Usage: %s -f <JSON file> -s <schema name>\n" $(basename $0) >&2
printf " [-f] - JSON file with services\n" >&2
printf " [-s] - schema\n" >&2
exit 2
}

if [[ $# == 0 ]]
then
usage
fi

while getopts 'f:s:h' OPTION
do
case $OPTION in
f)
jsonfile=$OPTARG
;;
s)
schema=$OPTARG
;;
h)
usage
;;
?)
usage
;;
esac
done

if [[ ! -z "$jsonfile" && ! -z "$schema" ]]
then
su -m -s /bin/sh $RUNASUSER -c \
"poem-manage import_services --json $jsonfile --schema $schema"
else
usage
fi
14 changes: 0 additions & 14 deletions bin/poem-syncmetricinstances

This file was deleted.

1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
- ../bin/poem-syncservtype:$VENV/bin/poem-syncservtype
- ../bin/poem-tenant:$VENV/bin/poem-tenant
- ../bin/poem-token:$VENV/bin/poem-token
- ../bin/poem-importservices:$VENV/bin/poem-importservices
networks:
app_net:
ipv4_address: 172.19.0.2
Expand Down
1 change: 0 additions & 1 deletion etc/poem.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Reports = https://api.devel.argo.grnet.gr/api/v2/reports
ReportsTopologyTags = https://api.devel.argo.grnet.gr/api/v2/topology/tags
ReportsTopologyGroups = https://api.devel.argo.grnet.gr/api/v2/topology/groups
ReportsTopologyEndpoints = https://api.devel.argo.grnet.gr/api/v2/topology/endpoints
ReportsCrud = True

[GENERAL_ALL]
PublicPage = tenant.com
Expand Down
1 change: 0 additions & 1 deletion poem/Poem/api/internal_views/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ def get(self, request):
options.update(version=version)
options.update(webapireports=dict(
main=settings.WEBAPI_REPORTS,
crud=settings.WEBAPI_REPORTSCRUD,
tags=settings.WEBAPI_REPORTSTAGS,
topologygroups=settings.WEBAPI_REPORTSTOPOLOGYGROUPS,
topologyendpoints=settings.WEBAPI_REPORTSTOPOLOGYENDPOINTS,
Expand Down
13 changes: 11 additions & 2 deletions poem/Poem/api/internal_views/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ def get(self, request, name=None):
else:
group = ''

mt = admin_models.MetricTemplateHistory.objects.get(
name=metric.name, probekey=metric.probekey
)

results.append(dict(
id=metric.id,
name=metric.name,
mtype=metric.mtype.name,
tags=[tag.name for tag in metric.tags.all()],
tags=[tag.name for tag in mt.tags.all()],
probeversion=probeversion,
group=group,
description=metric.description,
Expand Down Expand Up @@ -183,7 +187,12 @@ def put(self, request):
)

metric.save()
create_history(metric, request.user.username)
mt = admin_models.MetricTemplateHistory.objects.get(
name=metric.name, probekey=metric.probekey
)
create_history(
metric, request.user.username, tags=mt.tags.all()
)

return Response(status=status.HTTP_201_CREATED)

Expand Down
Loading

0 comments on commit fad4548

Please sign in to comment.