Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-39116

Please offer a way to disable coverage checks in the Jenkinsfile shared library

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I think we could use the Jenkins shared library for ts_config_x packages if there was a way to disable the coverage checks. Some possible approaches:

      • Allow module_name to be blank (Eric's original suggestion when this cropped up – but the current code rejects a blank module name). That addresses the core issue: there is no module to import so the coverage checks cannot run. I favor this (despite the fact that it is not obvious what the side effect of module_name="" would be). It would be nice if this could be done without allowing the module_name argument to be omitted (to avoid accidental omission).
      • Add an optional flag to disable anything that requires an importable library – presumably coverage tests and doc build? Or just a coverage test flag.

      I do wonder if we have any use cases for the "has_doc_site" flag for a package that can be imported. If not, the same solution might work for both (e.g. module_name="" to disable both). To put that another way: if you allow module_name="" then I think that should block doc build. And if so, you might be able to deprecate the "has_doc_site" argument.

      Also, a few other requests:

      • Please have the shared library run unit tests in verbose mode; the output would be much more useful, especially for skipped tests (at present there is no way to tell what tests were skipped). One can add a config file to force this, but it would be nice not to have to do that.
      • Is there a practical way to fail if the shared library is called with unrecognized arguments (e.g. by popping the good ones and then complaining if anything is left)? This would be useful to catch incorrect argument names.

        Attachments

          Issue Links

            Activity

            Hide
            ecoughlin Eric Coughlin added a comment -

            There's a use case of has_doc_site for the ts_pre_commit_conf repo. It has code that can be imported but the documentation resides in the TSSW Developer Guide.

            Show
            ecoughlin Eric Coughlin added a comment - There's a use case of has_doc_site for the ts_pre_commit_conf repo. It has code that can be imported but the documentation resides in the TSSW Developer Guide.
            Hide
            rowen Russell Owen added a comment - - edited

            Thanks. If you do go with module_name="" for "there is no module to import" then I think this also has to disable doc build? Or do you want users to specify has_doc_site false in that case as well (since we clearly need the flag)?

            I'm not aware of any way to handle docs if there's no module – certainly there is no obvious place to upload the docs.

            Show
            rowen Russell Owen added a comment - - edited Thanks. If you do go with module_name="" for "there is no module to import" then I think this also has to disable doc build? Or do you want users to specify has_doc_site false in that case as well (since we clearly need the flag)? I'm not aware of any way to handle docs if there's no module – certainly there is no obvious place to upload the docs.
            Show
            ecoughlin Eric Coughlin added a comment - https://github.com/lsst-ts/ts_jenkins_shared_library/pull/110 https://tssw-ci.lsst.org/view/LSST_TandS/job/LSST_Telescope-and-Site/job/ts_CBP/job/tickets%252FDM-39116/ See for testing jobs.
            Hide
            rowen Russell Owen added a comment -

            Reviewed on github

            Show
            rowen Russell Owen added a comment - Reviewed on github

              People

              Assignee:
              ecoughlin Eric Coughlin
              Reporter:
              rowen Russell Owen
              Reviewers:
              Russell Owen
              Watchers:
              Eric Coughlin, Russell Owen, Tiago Ribeiro, Wouter van Reeven
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.