fix(shard-manager): Correctly parse when time is zero#7714
fix(shard-manager): Correctly parse when time is zero#7714gazi-yestemirova wants to merge 1 commit intocadence-workflow:masterfrom
Conversation
Signed-off-by: Gaziza Yestemirova <gaziza@uber.com>
🔍 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 FailedThe CI job "Validate PR title follows conventional commit format" failed with the error: Root CauseThe PR title does not follow the conventional commit format specification. The validator expects a space after the colon ( DetailsAccording to conventional commits specification (https://www.conventionalcommits.org/), the format should be: Current title: Issue 2: Replication Simulation Test Failed (Infrastructure)The CI job "Replication Simulation (activeactive_cron)" failed during repository initialization when attempting to clone the Root CauseGitHub authentication failure when cloning the Details
Code Review ✅ ApprovedClean, 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 metRepository Rules
Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
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):
go testinvocation)