Skip to content

fix(release): allow null values in schema of dockerVersion#34171

Merged
jaysoo merged 1 commit intonrwl:masterfrom
mpsanchis:null-docker-version
Feb 25, 2026
Merged

fix(release): allow null values in schema of dockerVersion#34171
jaysoo merged 1 commit intonrwl:masterfrom
mpsanchis:null-docker-version

Conversation

@mpsanchis
Copy link
Copy Markdown
Contributor

@mpsanchis mpsanchis commented Jan 21, 2026

Current Behavior

TS file documents projectVersionData.dockerVersion as having type string | undefined. However, code behaves differently. For instance, here and here it is setting as and comparing against null.

Expected Behavior

Schema has value that code sets (null)

Related Issue(s)

Fixes #34172

@mpsanchis mpsanchis requested review from a team and Coly010 as code owners January 21, 2026 14:23
@netlify
Copy link
Copy Markdown

netlify bot commented Jan 21, 2026

Deploy Preview for nx-docs canceled.

Name Link
🔨 Latest commit e759e16
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6970e1589fc6960008913f3f

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Jan 29, 2026 0:36am

Request Review

@mpsanchis
Copy link
Copy Markdown
Contributor Author

Hi @JamesHenry :D Could you take a quick look at this? It's a small one

@mpsanchis
Copy link
Copy Markdown
Contributor Author

Note to maintainers: I have rebased my branch, and allowed dockerVersion to be undefined again, after verifying (empirically, but also see bumpVersionForProject) that it can indeed be undefined.

However, I haven't fully explored why sometimes it will be null and sometimes undefined. My guess is that in bumpVersionForProject, we should be spreading the original project instead of redefining it, therefore keeping the null, but I let it to you.

Would be great to have some feedback to define the schema file properly. I guess in the future we'd drop one of the two options.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Feb 24, 2026

View your CI Pipeline Execution ↗ for commit adfda34

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 11m 46s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 47s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-25 02:34:44 UTC

@jaysoo jaysoo merged commit b72a203 into nrwl:master Feb 25, 2026
22 of 23 checks passed
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

TS file documents `projectVersionData.dockerVersion` as having type
`string | undefined`. However, code behaves differently. For instance,
[here](https://github.com/nrwl/nx/blob/e57848cea748b85f17e5fc704b901975a8424c4d/packages/nx/src/command-line/release/version/release-group-processor.ts#L128)
and
[here](https://github.com/nrwl/nx/blob/e57848cea748b85f17e5fc704b901975a8424c4d/packages/nx/src/command-line/release/utils/shared.ts#L294)
it is setting as and comparing against `null`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Schema has value that code sets (`null`)

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #34172

(cherry picked from commit b72a203)
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

TS file documents `projectVersionData.dockerVersion` as having type
`string | undefined`. However, code behaves differently. For instance,
[here](https://github.com/nrwl/nx/blob/e57848cea748b85f17e5fc704b901975a8424c4d/packages/nx/src/command-line/release/version/release-group-processor.ts#L128)
and
[here](https://github.com/nrwl/nx/blob/e57848cea748b85f17e5fc704b901975a8424c4d/packages/nx/src/command-line/release/utils/shared.ts#L294)
it is setting as and comparing against `null`.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Schema has value that code sets (`null`)

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #34172

(cherry picked from commit b72a203)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

interface of VersionDataEntry has wrong type for dockerVersion

2 participants