Skip to content

Fix generation of run_athena CI jobs

Spyros Argyropoulos requested to merge fixAthena into master

Description of bug

When log.generate.short files were after the 5th position in the DSIDs added, no athena jobs would be run as in !1460 (merged)

Changes introduced

Tests

Before fix

See !1460 (merged) - the .run_athena.yml didn't have any jobs

After fix

> rm .run_athena.yml; python scripts/generateYaml.py 5 
INFO: generate CI config for 509xxx/509403 with release 21.6.71
> cat .run_athena.yml 

stages:
  - run_athena
  - check_logParser

#-----------------------------------------------------
# RUN ATHENA: CHILD JOB 509403
#-----------------------------------------------------
run_athena_509403:
  stage: run_athena
  tags:
    - cvmfs
  # image built from ASG https://gitlab.cern.ch/atlas-sit/docker/tree/master/slc6-atlasos
  image: atlasadc/atlas-grid-centos7
  variables:
    ATLAS_LOCAL_ROOT_BASE: /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
  artifacts:
    when: always
    paths:
      - "[0-9][0-9][0-9]xxx/**/log.generate_ci"
      - "[0-9][0-9][0-9]xxx/**/log.generate"
    expire_in: 1 week
  before_script:
    - echo ${K8S_SECRET_SERVICE_PASSWORD} | kinit ${SERVICE_ACCOUNT}@CERN.CH
    - mkdir /root/.globus
    - echo $GRID_USERCERT | base64 -di > /root/.globus/usercert.pem
    - echo $GRID_USERKEY  | base64 -di > /root/.globus/userkey.pem
    - chmod 400 /root/.globus/userkey.pem
  script:
    - ./scripts/run_athena.sh 509xxx/509403

#-----------------------------------------------------
# CHECK OUTPUT: CHECK OUTPUT WITH LOGPARSER
#-----------------------------------------------------
check_logParser_509403:
  stage: check_logParser
  image:
    name: python:3.6.10 # For f-string support in logParser
    entrypoint: [""] # so that we start from bash and not from a python shell (default in image)
  needs: ["run_athena_509403"]
  script:
    - ./scripts/check_logParser.sh 509xxx/509403

Also multiple logs in different (non-consecutive) DSIDs work correctly

Issues resolved

Closes #

Blocks

Edited by Spyros Argyropoulos

Merge request reports