Fix docker-compose storage env mismatch and internal port publish - #87
Merged
Conversation
…t publish - FILESTORAGE_HOST/FILESTORAGE_PORT -> STORAGE_HOST/STORAGE_PORT (config reads the latter; old names were silently ignored, falling back to defaults) - drop host publish of file-storage internal server (8081): internal API is network-only; expose only public signed-URL port 8888 - add required SIGNING_SECRET + port envs to file-storage service - use ghcr image (was local-only image with pull_policy: never)
- test files: replace repeated string literals with constants (goconst) - pin golangci-lint to v2.12.2 in pre-commit workflow (was @latest)
SendSolutionPackage uploads with the full FileLocation.Path as the object key (since 'fix: packager path upload'); tests still expected parent dirs.
GetState/GetProcessingMessageID/UpdateStatus raced with ProcessTask's state mutations (worker goroutine vs scheduler/status reads). Guard state with RWMutex; use local messageID/responseQueue params in ProcessTask instead of re-reading shared state. Add concurrent-access regression test. Found via go test -race ./...
- go-unit-tests and golangci-lint hooks now pass_filenames: false (were run once per .go file, spawning concurrent 'go test ./...' that shared /tmp/<msgID> package dirs and corrupted each other) - packager tests use unique msgID per invocation (t.TempDir parent basename) instead of fixed '001' / per-test-name, so concurrent runs don't collide - align SendSolutionPackage test expectations with uploadNonEmptyFile full path behavior (changed in 'fix: packager path upload' 7b7da51)
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.
Closes #86.
Changes
FILESTORAGE_HOST/FILESTORAGE_PORT→STORAGE_HOST/STORAGE_PORTindocker-compose.yaml. Config reads the latter (internal/config/worker_config.go); old names were silently ignored and defaults used.8081:8081). Internal API (writes +/sign) is network-only; only public signed-URL port8888is exposed for local testing.SIGNING_SECRET, port vars) so the service boots under current config.ghcr.io/mini-maxit/file-storage:latest(was local-only image withpull_policy: never).WORKER_QUEUE_NAME/MAX_WORKERSto worker env.Verification
go build ./...andgo test ./internal/config/pass.