sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

Warnings on builds when dynamic functions are used with incremental and parallel build

Open twodrops opened this issue 4 years ago • 1 comments

Sphinx Needs creates warnings starting with second build when dynamic functions are used with incremental and parallel build. Now that's a tough one to crack :)

How to reproduce

  1. Create a need in rST
  2. Create a second need and have one option copied over from the first need

Example:

.. req-sw::
   :id: NEED_01
   :status: open

.. req-sw:: 
   :id: NEED_02
   :status: [[copy("status", "NEED_01")]]

  1. Create a validation for copied option
needs_warnings = {
  'req_with_no_status': "(type == 'req-sw') and \
        (status is not None and len(status) != 0) and \
        (status not in ['open','done'])"
}
  1. Start Sphinx Build with parallel build (Make sure no warnings are present)
  2. Start Sphinx Build a second time with parallel build (Make sure the build was incremental)
  3. Warning raised for NEED_02
WARNING: req_with_no_status: failed
                failed needs: 1 (NEED_02)
                used filter: (type == 'req-sw') and         (status is not None and len(status) != 0) and         (status not in ['open','done'])

twodrops avatar Dec 12 '21 15:12 twodrops

@danwos This one is getting more important now as the dynamic functions like tr_link from sphinx-test-reports extension does not work as well in this scenario

With all the debugging into sphinx and sphinx-needs that we did recently, it should be able to find a solution for this now I feel.

Maybe @Rubyfi can help. The issue is present in our internal sphinx-needs-basics example.

twodrops avatar Dec 09 '22 04:12 twodrops