Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L LbAPCommon
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 10
    • Issues 10
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lhcb-dpa
  • Analysis Productions
  • LbAPCommon
  • Issues
  • #16
Closed
Open
Created Mar 10, 2022 by Aidan Richard Wiederhold@aiwiederOwner

Checks need to handle array branches differently

Currently if one tries to run a range check on a branch of arrays you can get the error

Traceback (most recent call last):
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/bin/lb-ap", line 8, in <module>
    sys.exit(main())
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/LbAPLocal/cli.py", line 357, in ci_checks
    check_results = run_job_checks(
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/LbAPCommon/checks.py", line 46, in run_job_checks
    check_results[check] = range_check(
  File "/cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2361/stable/linux-64/lib/python3.9/site-packages/LbAPCommon/checks.py", line 232, in range_check
    (test_array < limits["max"]) & (test_array > limits["min"])
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

so we need a way to check which events satisfy the given range and record the values when the branch to be checked is an array.

Assignee
Assign to
Time tracking