Skip to content

fix(shard-manager): Correctly parse when time is zero#7714

Closed
gazi-yestemirova wants to merge 1 commit intocadence-workflow:masterfrom
gazi-yestemirova:fix_time_unmarshaling
Closed

fix(shard-manager): Correctly parse when time is zero#7714
gazi-yestemirova wants to merge 1 commit intocadence-workflow:masterfrom
gazi-yestemirova:fix_time_unmarshaling

Conversation

@gazi-yestemirova
Copy link
Contributor

What changed?
Added a check in etcdtypes/time.go to detect if time equals to zero and return zero value of time.Time instead of trying to RFC3339Nano parsing.

Why?
When the last_updated field in assigned_state is equal to zero we try to parse it to RFC3339Nano format and get an error when fetching the assigned_state value.

How did you test it?
Added unit tests and checked with go test -v ./service/sharddistributor/store/etcd/etcdtypes

Potential risks
N/A

Release notes
N/A

Documentation Changes
N/A


Reviewer Validation

PR Description Quality (check these before reviewing code):

  • "What changed" provides a clear 1-2 line summary
    • Project Issue is linked
  • "Why" explains the full motivation with sufficient context
  • Testing is documented:
    • Unit test commands are included (with exact go test invocation)
    • Integration test setup/commands included (if integration tests were run)
    • Canary testing details included (if canary was mentioned)
  • Potential risks section is thoughtfully filled out (or legitimately N/A)
  • Release notes included if this completes a user-facing feature
  • Documentation needs are addressed (or noted if uncertain)

Signed-off-by: Gaziza Yestemirova <gaziza@uber.com>
@gazi-yestemirova gazi-yestemirova changed the title fix(shard-manager):Correctly parse when time is zero fix(shard-manager): Correctly parse when time is zero Feb 17, 2026
@gitar-bot
Copy link

gitar-bot bot commented Feb 17, 2026

🔍 CI failure analysis for 2903022: Two CI failures detected: 1) PR title formatting issue (missing space after colon), and 2) Replication Simulation test failed due to GitHub authentication issue when cloning submodules.

Issue 1: PR Title Format Validation Failed

The CI job "Validate PR title follows conventional commit format" failed with the error:

No release type found in pull request title "fix(shard-manager):Correctly parse when time is zero".

Root Cause

The PR title does not follow the conventional commit format specification. The validator expects a space after the colon (:) in the format type(scope): description, but the current title has fix(shard-manager):Correctly (no space after colon).

Details

According to conventional commits specification (https://www.conventionalcommits.org/), the format should be:

type(scope): description
        ^
        space required here

Current title: fix(shard-manager):Correctly parse when time is zero
Expected format: fix(shard-manager): Correctly parse when time is zero


Issue 2: Replication Simulation Test Failed (Infrastructure)

The CI job "Replication Simulation (activeactive_cron)" failed during repository initialization when attempting to clone the idls submodule.

Root Cause

GitHub authentication failure when cloning the cadence-idl submodule. The error occurred during git submodule update --init:

fatal: could not read Username for 'https://github.com': terminal prompts disabled
fatal: clone of 'https://github.com/cadence-workflow/cadence-idl.git' into submodule path failed

Details

  • This is an infrastructure/authentication issue, not related to the code changes in this PR
  • The PR only modifies files in service/sharddistributor/store/etcd/etcdtypes/ (time.go, time_test.go, state_test.go)
  • The failure occurred during the checkout/setup phase before any tests could run
  • Git attempted to clone the submodule twice and both attempts failed with authentication errors
  • This appears to be a transient GitHub Actions authentication problem with the GITHUB_TOKEN or repository access permissions
Code Review ✅ Approved

Clean, well-tested bugfix that correctly handles zero-valued timestamps in etcd storage. The implementation is minimal, backward compatible, and thoroughly tested with both string and numeric zero representations.

Rules ❌ No requirements met

Repository Rules

PR Description Quality Standards: Expand 'Why?' section to explain when/why zero timestamps occur in the system and why the zero-check solution was chosen over alternatives

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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.

1 participant