Uploaded image for project: 'SX Spring Python'
  1. SX Spring Python
  2. SESPRINGPYTHONPY-107

Iterating over set configurations in the container not handled properly.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.GA, 1.1.0.M1
    • Fix Version/s: 1.1.0.M2
    • Component/s: IoC
    • Labels:
      None
    • Environment:

      Description

      After picking through the code, and turning the debug message level WAY UP, found out that bug was in Set and FrozenSet processing of the IoC container.

      Sets are unordered list, and different machines order things differently. The process to replace object definitions with object actuals was coded as an iterate-remove-add procedure, since we couldn't directly write into the entry of the set. Removing and then adding to a set while iterating over it has undefined behavior. While it worked on my machine, it failed with fluctuation on the CI server.

      Proper set handling behavior is to iterate over original set, and add to new set, then replace existing set with new one.

        Activity

        Hide
        gregturn Greg Turnquist added a comment -

        Could not reproduce the error on my machine, so writing a direct unit test didn't work. Had to work this on the trunk, where I could commit and run a job on the CI server. Finally altered algorithm to create a new set, then iterate and add object actual to new set, and finally replace original set with new one. This worked.

        In the process of doing this, altered build.py to support a new --test-suite=foo parameter, and also a --debug-level=[info|debug] option, in order to more easily adjust what the CI server runs.

        Show
        gregturn Greg Turnquist added a comment - Could not reproduce the error on my machine, so writing a direct unit test didn't work. Had to work this on the trunk, where I could commit and run a job on the CI server. Finally altered algorithm to create a new set, then iterate and add object actual to new set, and finally replace original set with new one. This worked. In the process of doing this, altered build.py to support a new --test-suite=foo parameter, and also a --debug-level= [info|debug] option, in order to more easily adjust what the CI server runs.
        Hide
        gregturn Greg Turnquist added a comment -

        All code mods were completed on the trunk due to the need to interact with CI.

        Show
        gregturn Greg Turnquist added a comment - All code mods were completed on the trunk due to the need to interact with CI.

          People

          • Assignee:
            gregturn Greg Turnquist
            Reporter:
            gregturn Greg Turnquist
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: