feat: Unified repository servers - #82
Draft
hhvrc wants to merge 17 commits into
Draft
Conversation
…support Rename DesktopRepositoryServer to RepositoryServer with unified namespace OpenShock.RepositoryServer. Reorganize controllers into V1 (backwards-compat desktop endpoints at /v1/) and V2 (desktop at /v2/desktop/, firmware at /v2/firmware/). Add full firmware repository with chips, boards, versions, artifacts, and release notes backed by PostgreSQL enums and EF Core entities. Includes public OTA endpoints and admin CRUD with token auth. Update Docker, CI/CD workflows, and generate AddFirmwareTables migration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add PUT /v2/firmware/admin/versions/{version}/boards/{board}/upload
endpoint that accepts multipart binary uploads, computes SHA256,
uploads to BunnyCDN via HTTP API, and stores artifact metadata
- Add CdnStorageService wrapping BunnyCDN Storage HTTP API
- Extend FirmwareConfig with CdnStorageUrl and CdnStorageApiKey
- Update LatestController to return all artifact types (not just Merged)
and add optional ?board= query filter
- Unify FirmwareLatestResponse to use List<FirmwareArtifactDto> matching
FirmwareVersionResponse shape
- Make artifacts optional in CreateFirmwareVersionRequest
- Extract shared GetArtifactFileName into FirmwareArtifactFileNames util
- Delete unused FirmwareBoardArtifact model
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…penshock/RepositoryServers into feature/unified-repository-server
Restores RepoServerDb/Module.cs, RepoServerDb/Version.cs and V1/CiCdController.cs to their pre-firmware-rewrite state. The firmware work should not be modifying desktop module code.
- Test fixture now injects config via UseSetting so values reach Program.cs before ApiConfig validation (ConfigureAppConfiguration overlays only apply at Build() in minimal hosting) - Make RepoServerContext.MapEnums the single source of enum mappings with pinned DB names; drop the duplicate HasPostgresEnum block and map enums in the migration-tool path too - Register only the pooled DbContext factory and derive scoped contexts from it; the AddDbContextPool + AddPooledDbContextFactory combo applied MapEnums twice and broke type mapping on first model use - Order advisories by CLR severity rank in memory since MapEnum creates PG enum labels alphabetically - Opt into the Microsoft.Testing.Platform dotnet test runner via global.json and update the documented test command
…erable transitives - Generate the firmware/USB/repositories schema migration (enums, 14 new tables, unique constraints); desktop tables intentionally untouched - Declare the usb_serial_filters unique (vid, pid) NULLS NOT DISTINCT index fluently via AreNullsDistinct(false) instead of the never-written raw-SQL migration the model comment referenced - Test fixture now applies real migrations through MigrationOpenShockContext instead of EnsureCreated, so the suite validates the migration chain - Enable CPM transitive pinning and pin Microsoft.OpenApi 2.7.5 (GHSA-v5pm-xwqc-g5wc) and OpenTelemetry.Api 1.15.3 (GHSA-g94r-2vxg-569j)
- Replace deprecated HasCount(n) assertions with Count().IsEqualTo(n) - Pass the Postgres image via the PostgreSqlBuilder constructor instead of the obsolete parameterless constructor + WithImage
C# mirrors of the ReleaseData/ChangeEntry/NoticeEntry/ReleaseNoteEntry/ Repository structs emitted by the OpenShock release-tool (schema_version 1). Not consumed yet — ingestion wiring lands separately once the integration point is decided.
…pository-server # Conflicts: # .github/workflows/ci-build.yml # Directory.Packages.props # RepositoryServer/Controllers/V1/RepoController.cs # RepositoryServer/ExceptionHandler/ExceptionHandler.cs # RepositoryServer/appsettings.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.