Skip to content

fix: Handle undefined owner in NavigatorDataQueryOpts Zod schema#4043

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/zod-owner-undefined
Open

fix: Handle undefined owner in NavigatorDataQueryOpts Zod schema#4043
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/zod-owner-undefined

Conversation

@sentry

@sentry sentry Bot commented Jul 13, 2026

Copy link
Copy Markdown

Description

This PR addresses a ZodError occurring in NavigatorDataQueryOpts when the GraphQL API returns no data for an untracked repository. Previously, the owner field in RequestSchema was defined as .nullable(), which accepts null but not undefined.

When the API returns an empty or null response for an unknown repository, the owner field would be undefined, leading to a Zod validation failure.

This change updates the owner field in RequestSchema from .nullable() to .nullish(). This allows the schema to correctly handle both null and undefined values for the owner field, preventing the ZodError and ensuring robust data parsing.

Code Example

Notable Changes

Updated the owner field in RequestSchema from .nullable() to .nullish() to correctly handle undefined values returned by the GraphQL API for untracked repositories.

Screenshots

Link to Sample Entry

Legal Boilerplate

Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.

Fixes GAZEBO-182N

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 2 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-esm 5.89MB -1 bytes (-0.0%) ⬇️
gazebo-production-system 5.81MB -1 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: gazebo-production-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index.*.js -1 bytes 577.75kB -0.0%

Files in assets/index.*.js:

  • ./src/layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts → Total Size: 1.63kB
view changes for bundle: gazebo-production-system

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-legacy.*.js -1 bytes 657.7kB -0.0%

Files in assets/index-legacy.*.js:

  • ./src/layouts/BaseLayout/hooks/NavigatorDataQueryOpts.ts → Total Size: 1.63kB

@codecov-public-qa

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1857 1 1856 0
View the top 1 failed test(s) by shortest run time
src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/BillingOptions/BillingOptions.test.tsx > BillingOptions > when rendered > planString is set to annual plan > renders annual button as "selected"
Stack Traces | 0.16s run time
Error: expect(element).toBeChecked()

Received element is not checked:
  <button
  aria-checked="false"
  class="relative flex-1 w-32"
  data-radix-collection-item=""
  data-state="unchecked"
  data-testid="radio-annual"
  id=":r0:"
  role="radio"
  tabindex="-1"
  type="button"
  value="Annual"
/>
 ❯ .../TeamPlanController/BillingOptions/BillingOptions.test.tsx:142:27

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2536 1 2535 0
View the top 1 failed test(s) by shortest run time
src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradeForm/Controllers/TeamPlanController/BillingOptions/BillingOptions.test.tsx > BillingOptions > when rendered > planString is set to annual plan > renders annual button as "selected"
Stack Traces | 0.16s run time
Error: expect(element).toBeChecked()

Received element is not checked:
  <button
  aria-checked="false"
  class="relative flex-1 w-32"
  data-radix-collection-item=""
  data-state="unchecked"
  data-testid="radio-annual"
  id=":r0:"
  role="radio"
  tabindex="-1"
  type="button"
  value="Annual"
/>
 ❯ .../TeamPlanController/BillingOptions/BillingOptions.test.tsx:142:27

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@codecov-releaser

Copy link
Copy Markdown
Collaborator

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
3ea1f96 Mon, 13 Jul 2026 19:23:43 GMT Cloud Enterprise

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