Skip to content

Conversation

@leoromanovsky
Copy link
Contributor

Add microsecond-date-test flag with 6-digit fractional seconds to verify that SDKs correctly parse ISO 8601 dates with variable precision.

The backend may send dates with microsecond precision (e.g., from PostgreSQL) which is valid ISO 8601 but was not being handled by all SDKs.

Motivation

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

Add microsecond-date-test flag with 6-digit fractional seconds to verify
that SDKs correctly parse ISO 8601 dates with variable precision.

The backend may send dates with microsecond precision (e.g., from PostgreSQL)
which is valid ISO 8601 but was not being handled by all SDKs.
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

tests/parametric/test_ffe/test-case-microsecond-date-flag.json          @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
tests/parametric/test_ffe/flags-v1.json                                 @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core

@datadog-official
Copy link

datadog-official bot commented Jan 22, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 1 Test failed

tests.parametric.test_ffe.test_dynamic_evaluation.Test_Feature_Flag_Dynamic_Evaluation.test_ffe_flag_evaluation[test-case-microsecond-date-flag.json-library_env0, parametric-java] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: Test case 0 in test-case-microsecond-date-flag.json failed: flag='microsecond-date-test', targetingKey='alice', expected=active, actual=expired
assert 'expired' == 'active'
  - active
  + expired

self = <tests.parametric.test_ffe.test_dynamic_evaluation.Test_Feature_Flag_Dynamic_Evaluation object at 0x7fa3e3969f70>
test_case_file = 'test-case-microsecond-date-flag.json'
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7fa3b15cf950>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7fa3b1786960>

...

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 35521bd | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@dd-oleksii
Copy link
Member

Shall we add a bug annotation for java and dotnet and merge this?

I'm generally in favor of merging new system tests before fixes to tracers:

  • This propagates to dashboard and shows that there's a bug in these tracers.
  • Tests start testing other tracers earlier.
  • Less in-progress PRs, less coordination needed. We can tackle fixes at any pace.

The only downside is that we need a follow up PR to system tests to (re)enable tests after the fix.

leoromanovsky added a commit to DataDog/dd-trace-dotnet that referenced this pull request Jan 23, 2026
…on (#8094)

The date parser was using TryParseExact with a fixed 3-digit millisecond
format, causing PARSE_ERROR for dates with 6-digit microsecond precision
(e.g., "2025-09-23T15:48:37.235982Z") sent by the backend.

Changed to use DateTime.TryParse with DateTimeStyles.RoundtripKind which
correctly handles all valid ISO 8601 date formats including:
- No fractional seconds: 2020-01-01T00:00:00Z
- 1-7 digit fractional seconds (beyond 7 digits truncated by .NET)

Added comprehensive unit tests for various date precisions and invalid
date handling. Also added microsecond-date-test flag and test cases to
the bundled test data.

## Summary of changes

## Reason for change

## Implementation details

## Test coverage

Associating a new system test (also discovered this condition in java):
DataDog/system-tests#6087

## Other details
<!-- Fixes #{issue} -->


<!--  ⚠️ Note:

Where possible, please obtain 2 approvals prior to merging. Unless
CODEOWNERS specifies otherwise, for external teams it is typically best
to have one review from a team member, and one review from apm-dotnet.
Trivial changes do not require 2 reviews.

MergeQueue is NOT enabled in this repository. If you have write access
to the repo, the PR has 1-2 approvals (see above), and all of the
required checks have passed, you can use the Squash and Merge button to
merge the PR. If you don't have write access, or you need help, reach
out in the #apm-dotnet channel in Slack.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants