Skip to content

fix(test): upload a .txt file, not the .tmp GetTempFileName gives - #77

Merged
mogita merged 1 commit into
masterfrom
fix/file-upload-test-extension
Sep 15, 2026
Merged

mogita merged 1 commit into
masterfrom
fix/file-upload-test-extension

Conversation

@mogita

@mogita mogita commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

Test36_FileUpload has failed on master since 2026-09-10 with UploadFile failed with error: "File extension .tmp is not supported". That failure is why #74's feat: never released and NuGet is still at 16.0.0.

Solution

Path.GetTempFileName() names the file .tmp, and the shared test app's chat_allowed_file_extensions is .pdf,.doc,.txt, so the upload is rejected before it reaches anything the test is about. The temp file now gets a .txt name. Nothing else changes, including the cleanup in finally.

How to verify

dotnet restore, dotnet format --verify-no-changes and dotnet build --configuration Debug are clean locally. CI runs the suite; Test36_FileUpload should pass for the first time since 2026-09-10.

Review instructions

The other direction would be adding .tmp to the app's allowlist in the Django admin, which is worse: five SDK repos share that app and several of their suites blank and restore file_upload_config, so the allowlist is exactly the setting that keeps getting clobbered. Picking an extension the app already allows keeps this test out of that fight.

Goes in before #76, which is otherwise blocked on this same failure.

Test36_FileUpload has failed on master since 2026-09-10 with "File extension
.tmp is not supported", which is why #74's feat never released and NuGet is
still at 16.0.0. Path.GetTempFileName() names the file .tmp, and the shared test
app's chat_allowed_file_extensions is .pdf,.doc,.txt, so the upload is rejected
before it reaches anything this test is about.

Names the temp file with a .txt extension instead. Nothing else about the test
changes, including the cleanup in finally.
@mogita
mogita merged commit cb10a3d into master Sep 15, 2026
4 checks passed
@mogita
mogita deleted the fix/file-upload-test-extension branch September 15, 2026 12:00
github-actions Bot added a commit that referenced this pull request Sep 15, 2026
mogita added a commit that referenced this pull request Sep 15, 2026
src/Client.cs carries a second version literal that the deleted bump script kept
in step with the csproj. release-type simple adds no source updater, so nothing
would have bumped it: VersionName feeds the X-Stream-Client header and the
stream.sdk.version log field, and both would have frozen at 16.0.1 while the
package moved on. Covered by an extra-file with the usual marker comment.

Merging #77 fired the old release workflow, which cut v16.0.1 and shipped #74's
feat with it, so the seed and the changelog move to 16.0.1 and the changelog
header no longer promises 16.1.0.

The NuGet push took a glob with --skip-duplicate, which exits 0 and publishes
nothing when the packed version does not match the tag. It now pushes the exact
path and fails when that file is absent, and re-attaches the nupkg to the GitHub
Release, which every release before this one carried and release-please does not.

run_tests.yml gains a Release-configuration test leg. The package is packed from
Release and the old release.yml was the only place that tested it. ci.yml covers
PRs into N.x, and STREAM_API_KEY drops to required: false because the steps fall
back to the repository variable.
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