Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default CATALOG_DATA_READY to OnCat #164

Merged
merged 1 commit into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions Dockerfile.catalog

This file was deleted.

14 changes: 0 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,6 @@ services:
webmon:
condition: service_healthy

catalog_process:
restart: always
build:
context: .
dockerfile: Dockerfile.catalog
network: host
environment:
ICAT_USER: "icat"
ICAT_PASSCODE: "icat"
ACTIVE_MQ_PORTS: 61613
depends_on:
activemq:
condition: service_healthy

autoheal:
restart: always
image: willfarrell/autoheal
Expand Down
34 changes: 0 additions & 34 deletions src/catalog/catalog_process.py

This file was deleted.

36 changes: 34 additions & 2 deletions src/webmon_app/reporting/fixtures/db_init.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,38 @@
"is_workflow_input": true
}
},
{
"model": "report.statusqueue",
"pk": 24,
"fields": {
"name": "CATALOG.ONCAT.DATA_READY",
"is_workflow_input": false
}
},
{
"model": "report.statusqueue",
"pk": 25,
"fields": {
"name": "CATALOG.ONCAT.STARTED",
"is_workflow_input": true
}
},
{
"model": "report.statusqueue",
"pk": 26,
"fields": {
"name": "CATALOG.ONCAT.ERROR",
"is_workflow_input": true
}
},
{
"model": "report.statusqueue",
"pk": 27,
"fields": {
"name": "CATALOG.ONCAT.COMPLETE",
"is_workflow_input": true
}
},
{
"model": "report.task",
"pk": 1,
Expand All @@ -216,11 +248,11 @@
"input_queue_id": 1,
"task_class": " ",
"task_queue_ids": [
4,
24,
7
],
"success_queue_ids": [
6,
27,
11
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/workflow_app/workflow/database/report/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ def update(self):
self.complete = False

# Look for cataloging status
if len(RunStatus.objects.status(self.run_id, "CATALOG.COMPLETE")) > 0:
if len(RunStatus.objects.status(self.run_id, "CATALOG.ONCAT.COMPLETE")) > 0:
self.cataloged = True
if len(RunStatus.objects.status(self.run_id, "CATALOG.STARTED")) > 0:
if len(RunStatus.objects.status(self.run_id, "CATALOG.ONCAT.STARTED")) > 0:
self.catalog_started = True

# Check whether we need reduction (default is no)
Expand Down
2 changes: 1 addition & 1 deletion src/workflow_app/workflow/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Default queue names
POSTPROCESS_INFO = "POSTPROCESS.INFO"
POSTPROCESS_ERROR = "POSTPROCESS.ERROR"
CATALOG_DATA_READY = "CATALOG.DATA_READY"
CATALOG_DATA_READY = "CATALOG.ONCAT.DATA_READY"
REDUCTION_DATA_READY = "REDUCTION.DATA_READY"
REDUCTION_CATALOG_DATA_READY = "REDUCTION_CATALOG.DATA_READY"

Expand Down
20 changes: 10 additions & 10 deletions src/workflow_app/workflow/tests/database_models_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def test_update_catalog(self, runStatusObjectsMock, djangoModelsMock):

def status_lookup(run_id, param_string):
vals = {
"CATALOG.COMPLETE": 1,
"CATALOG.STARTED": 0,
"CATALOG.ONCAT.COMPLETE": 1,
"CATALOG.ONCAT.STARTED": 0,
"REDUCTION.NOT_NEEDED": 0,
"REDUCTION.DISABLED": 0,
"REDUCTION.COMPLETE": 0,
Expand Down Expand Up @@ -141,8 +141,8 @@ def test_update_reduction_need(self, runStatusObjectsMock, djangoModelsMock):

def status_lookup(run_id, param_string):
vals = {
"CATALOG.COMPLETE": 0,
"CATALOG.STARTED": 0,
"CATALOG.ONCAT.COMPLETE": 0,
"CATALOG.ONCAT.STARTED": 0,
"REDUCTION.NOT_NEEDED": 1,
"REDUCTION.DISABLED": 1,
"REDUCTION.COMPLETE": 0,
Expand All @@ -169,8 +169,8 @@ def test_update_reduction_status(self, runStatusObjectsMock, djangoModelsMock):

def status_lookup(run_id, param_string):
vals = {
"CATALOG.COMPLETE": 0,
"CATALOG.STARTED": 0,
"CATALOG.ONCAT.COMPLETE": 0,
"CATALOG.ONCAT.STARTED": 0,
"REDUCTION.NOT_NEEDED": 0,
"REDUCTION.DISABLED": 0,
"REDUCTION.COMPLETE": 1,
Expand Down Expand Up @@ -198,8 +198,8 @@ def test_update_reduction_catalog(self, runStatusObjectsMock, djangoModelsMock):

def status_lookup(run_id, param_string):
vals = {
"CATALOG.COMPLETE": 0,
"CATALOG.STARTED": 0,
"CATALOG.ONCAT.COMPLETE": 0,
"CATALOG.ONCAT.STARTED": 0,
"REDUCTION.NOT_NEEDED": 0,
"REDUCTION.DISABLED": 0,
"REDUCTION.COMPLETE": 0,
Expand Down Expand Up @@ -227,8 +227,8 @@ def test_update_overall(self, runStatusObjectsMock, djangoModelsMock):

def status_lookup(run_id, param_string):
vals = {
"CATALOG.COMPLETE": 1,
"CATALOG.STARTED": 0,
"CATALOG.ONCAT.COMPLETE": 1,
"CATALOG.ONCAT.STARTED": 0,
"REDUCTION.NOT_NEEDED": 1,
"REDUCTION.DISABLED": 0,
"REDUCTION.COMPLETE": 0,
Expand Down
10 changes: 4 additions & 6 deletions tests/test_PostProcessWorkflow.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import psycopg2
import requests
import time
import pytest
from django.conf import settings
from dotenv import dotenv_values

Expand Down Expand Up @@ -74,17 +73,16 @@ def get_status_errors(self, cursor, datarun_id):
errors.append(result)
return errors

@pytest.mark.skip("Skipping due to catalog start message not sending in CI")
def test_catalog(self):
cursor = self.__class__.conn.cursor()

datarun_id = self.get_datarun_id(cursor, "arcs", "IPTS-27800", "214583")

queue_id = self.get_queue_id(cursor, "CATALOG.REQUEST")
started_id = self.get_queue_id(cursor, "CATALOG.STARTED")
ready_id = self.get_queue_id(cursor, "CATALOG.DATA_READY")
complete_id = self.get_queue_id(cursor, "CATALOG.COMPLETE")
error_id = self.get_queue_id(cursor, "CATALOG.ERROR")
started_id = self.get_queue_id(cursor, "CATALOG.ONCAT.STARTED")
ready_id = self.get_queue_id(cursor, "CATALOG.ONCAT.DATA_READY")
complete_id = self.get_queue_id(cursor, "CATALOG.ONCAT.COMPLETE")
error_id = self.get_queue_id(cursor, "CATALOG.ONCAT.ERROR")

# get current catalog status counts
queues = [queue_id, started_id, ready_id, complete_id]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_SubmitPostprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def testPostProcessingSubmitMissingRunfile(self):
self.send_request("POSTPROCESS.DATA_READY", RUN_NUMBER_MISSING, requestType="submit")

new_status_count = self.get_status_count(RUN_NUMBER_MISSING)
assert new_status_count - status_count == 6
assert new_status_count - status_count == 5

@pytest.mark.parametrize("run_number", [RUN_NUMBER_GOOD, RUN_NUMBER_MISSING])
def testPostProcessingFind(self, run_number):
Expand Down
Loading