Implement media service#8
Open
adrianpk wants to merge 29 commits into
Open
Conversation
- Provide context helpers and middleware to guarantee X-Request-ID on inbound calls - Propagate correlation identifiers in core HTTP client requests, including health probes - Register the middleware across admin, authn, authz, and estate routers - Document the tracing and correlation approach for future gateways
- Apply shared chi middleware stack with tracing, recovery, compression, and timeouts across services - Emit structured request logs through the chi RequestLogger backed by the core logger - Provide lightweight CORS helpers and enable credentialled calls for API services - Disable browser caching on admin responses to reduce inadvertent form resubmissions
- Switch handler log helpers to use core.RequestIDFrom so correlation IDs never drop to empty strings - Remove remaining chi RequestID middleware dependency across authn, authz, and estate handlers
- Introduce NewXParams across services so logger and config are mandatory while tracer defaults to core.NoopTracer() - Add SetTracer helper to opt into custom tracing later without touching struct fields - Update all callers/tests to use the accessors and seed the constructor - Wire golangci-lint forbidigo rule to ban struct literals
- Move HTTP middleware helpers into pkg/lib/core so services import a single package - Re-export ApplyStack/RedirectNotFound/DefaultCORSOptions directly from core and update all main entrypoints - Add RedirectNotFound usage to admin and adjust tracing docs to the new file path
- Add core.NewRouter/NewWebRouter to preconfigure chi stacks from XParams providers - Switch admin to web router variant (NoCache + RedirectNotFound) and APIs to the standard router factory
- Make NewRouter/NewWebRouter accept XParams - Update service mains to call the new helpers
- Replace log.Fatal with explicit os.Exit(1) after logging structured errors
- Add core.Metrics with noop implementation and wire request metrics middleware into ApplyStack - Extend XParams with Metrics()/SetMetrics() so services can pass real collectors - Update router helpers to default StackOptions.Metrics from XParams
- Introduce Health Registry with dynamic liveness/readiness checks and richer probe responses - Update Setup to return the registry and auto-register component checks
Integrate basic panic capture and reporter hook into core flow. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Fri Oct 24 17:06:17 2025 +0200 # # interactive rebase in progress; onto 65ca7b1 # Last command done (1 command done): # reword e405fa9 # Add error reporter plumbing # Next commands to do (3 remaining commands): # reword 0bcf86e # Normalize core filenames # reword 48e26ff # Consolidate middleware into existing core files # You are currently editing a commit while rebasing branch 'new/wip' on '65ca7b1'. # # Changes to be committed: # modified: docs/draft/observability.md # new file: pkg/lib/core/error_reporter.go # new file: pkg/lib/core/error_reporting_middleware.go # modified: pkg/lib/core/http_stack.go # modified: pkg/lib/core/router.go # modified: services/admin/internal/config/xparams.go # modified: services/authn/internal/config/xparams.go # modified: services/authz/internal/config/xparams.go # modified: services/estate/internal/config/xparams.go #
- Rename core helpers - Update documentation reference accordingly
Estate Service: - Add Classification, Location, Features, Price value objects - Implement dictionary client interface with fake seed data Admin Service: - Add property CRUD operations in admin panel - Create PropertyRepo interface with Fake and API implementations
- Add complete dictionary service for managing Sets and Options with hierarchical support. - Include admin UI with CRUD operations for both entities.
85de401 to
da975d5
Compare
da975d5 to
d5737f8
Compare
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.