Skip to content

Conversation

@rekhoff
Copy link
Contributor

@rekhoff rekhoff commented Jan 25, 2026

Description of Changes

This PR fixes C#-related CI failures when testing against v1.12.0 before the corresponding NuGet packages are available on nuget.org.

  • CI: Ensure local C# NuGet packages are used consistently
    • Pack crates/bindings-csharp/{BSATN.Runtime,Runtime} with -c Release so the configured local package sources (bin/Release) actually contain the .nupkgs.
    • Run ./sdks/csharp/tools~/write-nuget-config.sh in CI to generate a NuGet.Config that maps SpacetimeDB.BSATN.Runtime / SpacetimeDB.Runtime to those local sources (with nuget.org as fallback for non-SpacetimeDB dependencies).
    • Add an explicit dotnet restore --configfile NuGet.Config step before tests, and run dotnet test --no-restore, so restore always uses the intended config and does not “accidentally” restore from nuget.org.
  • write-nuget-config.sh: Make NuGet config discovery + mapping deterministic
    • Write NuGet.Config (capitalized) and include <clear /> + an explicit nuget.org source to avoid inherited sources and to keep PackageSourceMapping functional.
    • Also write a repo-root NuGet.Config so dotnet publish/pack invoked from templates (outside sdks/csharp/) still discovers the same override behavior.
  • Smoketests quickstart: avoid PackageSourceMapping restore failures
    • Ensure smoketest helper packing uses Release, and when repo-root NuGet.Config exists, perform dotnet restore --configfile ... + dotnet pack --no-restore so pack/restore are evaluated with the same sources/mapping.
    • When editing configs, prefer NuGet.Config casing for Linux discovery and ensure nuget.org exists as a source for the fallback mapping.

API and ABI breaking changes

No changes

Expected complexity level and risk

1

Testing

  • Locally tested concept after simulating local repro.
  • Confirmed CI passes in this branch

@rekhoff rekhoff changed the title Broken out explicit dotnet restore for dotnet tests C# testing CI failure fixes Jan 26, 2026
@rekhoff rekhoff changed the title C# testing CI failure fixes C# test CI failure fixes Jan 26, 2026
@rekhoff rekhoff changed the title C# test CI failure fixes CI: Fix of C# tests failures Jan 26, 2026
@rekhoff rekhoff changed the base branch from jdetter/bump-version-to-v1.12.0 to master January 26, 2026 02:30
@rekhoff rekhoff marked this pull request as ready for review January 26, 2026 02:31
@rekhoff rekhoff self-assigned this Jan 26, 2026
@jdetter jdetter changed the base branch from master to jdetter/bump-version-to-v1.12.0 January 26, 2026 16:26
@jdetter jdetter mentioned this pull request Jan 26, 2026
2 tasks
@jdetter jdetter force-pushed the rekhoff/ci-testing-v1.12.0 branch from f93b269 to f0fd738 Compare January 26, 2026 16:35
@jdetter jdetter merged commit f0fd738 into jdetter/bump-version-to-v1.12.0 Jan 26, 2026
15 of 16 checks passed
@jdetter jdetter force-pushed the jdetter/bump-version-to-v1.12.0 branch from ab2fd8f to a023c85 Compare January 26, 2026 16:36
@jdetter jdetter mentioned this pull request Jan 26, 2026
2 tasks
github-merge-queue bot pushed a commit that referenced this pull request Jan 27, 2026
# Description of Changes

(jdetter): Github marked Ryan's PR as merged because I rebased it
without updating the base branch first - my bad.
Original PR: #4120

This PR fixes C#-related CI failures when testing against `v1.12.0`
before the corresponding NuGet packages are available on nuget.org.

* CI: Ensure local C# NuGet packages are used consistently
* Pack `crates/bindings-csharp/{BSATN.Runtime,Runtime}` with `-c
Release` so the configured local package sources (`bin/Release`)
actually contain the `.nupkg`s.
* Run `./sdks/csharp/tools~/write-nuget-config.sh` in CI to generate a
`NuGet.Config` that maps `SpacetimeDB.BSATN.Runtime` /
`SpacetimeDB.Runtime` to those local sources (with `nuget.org` as
fallback for non-SpacetimeDB dependencies).
* Add an explicit `dotnet restore --configfile NuGet.Config` step before
tests, and `run dotnet test --no-restore`, so restore always uses the
intended config and does not “accidentally” restore from `nuget.org`.
* `write-nuget-config.sh`: Make NuGet config discovery + mapping
deterministic
* Write `NuGet.Config` (capitalized) and include `<clear />` + an
explicit `nuget.org` source to avoid inherited sources and to keep
`PackageSourceMapping` functional.
* Also write a repo-root `NuGet.Config` so `dotnet publish/pack` invoked
from templates (outside `sdks/csharp/`) still discovers the same
override behavior.
* Smoketests quickstart: avoid `PackageSourceMapping` restore failures
* Ensure smoketest helper packing uses `Release`, and when repo-root
`NuGet.Config` exists, perform `dotnet restore --configfile ...` +
`dotnet pack --no-restore` so pack/restore are evaluated with the same
sources/mapping.
* When editing configs, prefer `NuGet.Config` casing for Linux discovery
and ensure `nuget.org` exists as a source for the fallback mapping.

# API and ABI breaking changes

No changes

# Expected complexity level and risk

1

# Testing

- [X] Locally tested concept after simulating local repro.
- [x] Confirmed CI passes in this branch

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
Centril pushed a commit that referenced this pull request Jan 27, 2026
# Description of Changes

(jdetter): Github marked Ryan's PR as merged because I rebased it
without updating the base branch first - my bad.
Original PR: #4120

This PR fixes C#-related CI failures when testing against `v1.12.0`
before the corresponding NuGet packages are available on nuget.org.

* CI: Ensure local C# NuGet packages are used consistently
* Pack `crates/bindings-csharp/{BSATN.Runtime,Runtime}` with `-c
Release` so the configured local package sources (`bin/Release`)
actually contain the `.nupkg`s.
* Run `./sdks/csharp/tools~/write-nuget-config.sh` in CI to generate a
`NuGet.Config` that maps `SpacetimeDB.BSATN.Runtime` /
`SpacetimeDB.Runtime` to those local sources (with `nuget.org` as
fallback for non-SpacetimeDB dependencies).
* Add an explicit `dotnet restore --configfile NuGet.Config` step before
tests, and `run dotnet test --no-restore`, so restore always uses the
intended config and does not “accidentally” restore from `nuget.org`.
* `write-nuget-config.sh`: Make NuGet config discovery + mapping
deterministic
* Write `NuGet.Config` (capitalized) and include `<clear />` + an
explicit `nuget.org` source to avoid inherited sources and to keep
`PackageSourceMapping` functional.
* Also write a repo-root `NuGet.Config` so `dotnet publish/pack` invoked
from templates (outside `sdks/csharp/`) still discovers the same
override behavior.
* Smoketests quickstart: avoid `PackageSourceMapping` restore failures
* Ensure smoketest helper packing uses `Release`, and when repo-root
`NuGet.Config` exists, perform `dotnet restore --configfile ...` +
`dotnet pack --no-restore` so pack/restore are evaluated with the same
sources/mapping.
* When editing configs, prefer `NuGet.Config` casing for Linux discovery
and ensure `nuget.org` exists as a source for the fallback mapping.

# API and ABI breaking changes

No changes

# Expected complexity level and risk

1

# Testing

- [X] Locally tested concept after simulating local repro.
- [x] Confirmed CI passes in this branch

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jan 27, 2026
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

Version upgrade to `v1.12.0`.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

1 - this is just a version upgrade

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

The testsuite failures are fixed by
#4120

- [x] License has been properly updated including version number and
date
- [x] CI passes

---------

Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
@jdetter jdetter mentioned this pull request Feb 2, 2026
2 tasks
github-merge-queue bot pushed a commit that referenced this pull request Feb 2, 2026
# Description of Changes

<!-- Please describe your change, mention any related tickets, and so on
here. -->

Copied from: #4084

We originally reverted this because it was causing testsuite flakes in
private. Now we have solved the issue that was causing the flakes so
this should be safe to merge.

Version upgrade to `v1.12.0`.

# API and ABI breaking changes

<!-- If this is an API or ABI breaking change, please apply the
corresponding GitHub label. -->

None

# Expected complexity level and risk

1 - this is just a version upgrade

<!--
How complicated do you think these changes are? Grade on a scale from 1
to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex
change.

This complexity rating applies not only to the complexity apparent in
the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning
ways. -->

# Testing

<!-- Describe any testing you've done, and any testing you'd like your
reviewers to do,
so that you're confident that all the changes work as expected! -->

The testsuite failures are fixed by
#4120

- [x] License has been properly updated including version number and
date
- [x] CI passes

---------

Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
Co-authored-by: rekhoff <r.ekhoff@clockworklabs.io>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
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.

2 participants