Skip to content

fix: Make OwnerSchema username nullable#4020

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

fix: Make OwnerSchema username nullable#4020
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/owner-username-nullable

Conversation

@sentry

@sentry sentry Bot commented Jul 4, 2026

Copy link
Copy Markdown

Description

This PR addresses a ZodError that occurred when parsing the response from the /internal/user API. The backend was returning null for owners[0].username for certain Bitbucket users, but the frontend's OwnerSchema (part of InternalUserSchema) expected username to be a non-nullable string.

This change updates the OwnerSchema in src/services/user/useInternalUser.ts to explicitly allow username to be null, aligning the frontend schema with the actual data returned by the backend.

Code Example

Notable Changes

Updated OwnerSchema in src/services/user/useInternalUser.ts to allow username to be null.

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-181T

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.74%. Comparing base (1e17330) to head (d99cb8f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4020   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15181    15181           
  Branches     4373     4365    -8     
=======================================
  Hits        14990    14990           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/user/useInternalUser.ts 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e17330...d99cb8f. Read the comment docs.

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 22 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gazebo-production-system 5.88MB 11 bytes (0.0%) ⬆️
gazebo-production-esm 5.96MB 11 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 11 bytes 641.66kB 0.0%

Files in assets/index.*.js:

  • ./src/services/user/useInternalUser.ts → Total Size: 1.17kB
view changes for bundle: gazebo-production-system

Assets Changed:

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

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

  • ./src/services/user/useInternalUser.ts → Total Size: 1.18kB

@codecov-notifications

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4020   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15181    15181           
  Branches     4365     4365           
=======================================
  Hits        14990    14990           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/user/useInternalUser.ts 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e17330...d99cb8f. Read the comment docs.

@codecov-public-qa

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.74%. Comparing base (1e17330) to head (d99cb8f).

✅ All tests successful. No failed tests found.

@@           Coverage Diff           @@
##             main    #4020   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15181    15181           
  Branches     4373     4365    -8     
=======================================
  Hits        14990    14990           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/user/useInternalUser.ts 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e17330...d99cb8f. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codecov-releaser

Copy link
Copy Markdown
Collaborator

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
d99cb8f Sat, 04 Jul 2026 18:48:20 GMT Cloud Enterprise

@codecov-qa

codecov-qa Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.74%. Comparing base (1e17330) to head (d99cb8f).

@@           Coverage Diff           @@
##             main    #4020   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files         831      831           
  Lines       15181    15181           
  Branches     4365     4365           
=======================================
  Hits        14990    14990           
  Misses        184      184           
  Partials        7        7           
Files with missing lines Coverage Δ
src/services/user/useInternalUser.ts 100.00% <ø> (ø)
Components Coverage Δ
Assets 100.00% <ø> (ø)
Layouts 99.71% <ø> (ø)
Pages 98.37% <ø> (ø)
Services 99.33% <ø> (ø)
Shared 98.96% <ø> (ø)
UI 99.01% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e17330...d99cb8f. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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