Fix over-strict update assertion and missing initialData in OpenTelemetry spec tests

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Component/s: Observability
    • None
    • Needed
    • Hide

      Summary of necessary driver changes

      • Resync the OpenTelemetry spec tests. Both fixes are test-only, so no driver code changes are required.
      • Drop any local patch or skip carried for the over-strict update assertion, and any local cleanup added to make the operation fixtures repeatable within a single process.
      • create_collection gained a second expected span, so a driver that hard-codes span counts for that fixture needs to pick up the new expectation.

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets
      N/A

      Show
      Summary of necessary driver changes Resync the OpenTelemetry spec tests. Both fixes are test-only, so no driver code changes are required. Drop any local patch or skip carried for the over-strict update assertion, and any local cleanup added to make the operation fixtures repeatable within a single process. create_collection gained a second expected span, so a driver that hard-codes span counts for that fixture needs to pick up the new expectation. Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) 0d6fee49 (PR #1971 ) Python POC: https://github.com/mongodb/mongo-python-driver/pull/2964 0529b08a vendors the fixed fixtures and removes both workarounds, taking the otel selection from 178 passed and 5 skipped to 180 passed and 3 skipped. c8ae168a introduced the workarounds, so the two commits bracket the deviation. Context for other referenced/linked tickets N/A
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6403 Backlog
      CXX-3546 Backlog
      CSHARP-6150 Backlog
      GODRIVER-4071 Backlog
      JAVA-6268 Needs Triage
      NODE-7742 Backlog
      PYTHON-5979 In Code Review
      PHPLIB-1922 Needs Triage
      RUBY-3926 Needs Triage
      RUST-2464 Ready for Work
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-6403 Backlog CXX-3546 Backlog CSHARP-6150 Backlog GODRIVER-4071 Backlog JAVA-6268 Needs Triage NODE-7742 Backlog PYTHON-5979 In Code Review PHPLIB-1922 Needs Triage RUBY-3926 Needs Triage RUST-2464 Ready for Work

      Summary

      Two problems in the OpenTelemetry operation spec tests make them fail or require local workarounds rather than testing what they intend to.

      The update.json assertion on the update statement requires it to contain exactly a
      query and an update document. Drivers that also send the multi and upsert fields at
      their default values fail it, even though the CRUD spec's own tests are written to
      accept both shapes. The assertion should tolerate either.

      Nine of the operation fixtures declare no initial data but modify collections. The unified runner only cleans up collections before a test when a fixture declares some, so fixtures that
      create collections leave them behind and are not repeatable. Running the suite twice in one process makes the second pass collide with the first pass's leftovers.

      Motivation

      Who is the affected end user?

      Driver teams implementing the OpenTelemetry specification, and anyone maintaining these tests. No impact on application developers.

      How does this affect the end user?

      Both problems force local deviations from the shared tests. A driver either carries
      patches to the fixtures or skips the affected tests, and a skipped test silently removes coverage of the operation it was written for.

      How likely is it that this problem or use case will occur?

      Main path for both. Any driver that sends the update fields at their defaults hits the first, and any driver that runs the fixtures more than once per process hits the second.

      If the problem does occur, what are the consequences and how severe are they?

      Minor. Spurious test failures and lost coverage, with no functional impact. The risk is that a real tracing regression goes unnoticed in an operation whose test is skipped.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes. No functional impact.

      Acceptance Criteria

      • The update assertion passes both for drivers that send multi and upsert at their default values and for drivers that omit them.
      • Fixtures that create or modify collections declare initial data so the runner cleans up beforehand, making every fixture repeatable within a single process.
      • No driver needs a local patch or a skip to run these tests, and none is left carrying one for either problem.
      • The OpenTelemetry spec tests pass on all supported server versions with no skips attributable to either problem.

            Assignee:
            Steve Silvester
            Reporter:
            Steve Silvester
            Nabil Hachicha Nabil Hachicha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: