fix: enhance API key handling and logging in middleware #627

Merged
argoyle merged 5 commits from enhance-api-key-handling-logging into main 2025-11-20 20:26:23 +00:00
argoyle commented 2025-11-20 07:10:03 +00:00 (Migrated from gitlab.com)

Refactor API key processing to improve clarity and reduce code
duplication. Introduce detailed logging for schema updates and
initializations, capturing relevant context information. Use
background context for async operations to avoid blocking.
Implement organization lookup logic in the WebSocket init
function for consistent API key handling across connections.

Refactor API key processing to improve clarity and reduce code duplication. Introduce detailed logging for schema updates and initializations, capturing relevant context information. Use background context for async operations to avoid blocking. Implement organization lookup logic in the WebSocket init function for consistent API key handling across connections.
argoyle (Migrated from gitlab.com) scheduled this pull request to auto merge when all checks succeed 2025-11-20 07:10:13 +00:00
argoyle commented 2025-11-20 07:24:01 +00:00 (Migrated from gitlab.com)

Codecov Report

Patch coverage is 25.40541% with 138 lines in your changes missing coverage. Please review.
Project coverage is 7.74%. Comparing base (a9a47c1) to head (47dbf82).

Files with missing lines Patch % Lines
graph/schema.resolvers.go 0.00% 104 Missing ⚠️
cmd/service/service.go 0.00% 17 Missing ⚠️
graph/cosmo.go 72.13% 13 Missing and 4 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #623      +/-   ##
========================================
+ Coverage   4.11%   7.74%   +3.62%     
========================================
  Files         44      44              
  Lines       2139    2299     +160     
========================================
+ Hits          88     178      +90     
- Misses      2050    2116      +66     
- Partials       1       5       +4     

View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
## [Codecov](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) Report :x: Patch coverage is `25.40541%` with `138 lines` in your changes missing coverage. Please review. :white_check_mark: Project coverage is 7.74%. Comparing base ([`a9a47c1`](https://app.codecov.io/gl/unboundsoftware/schemas/commit/a9a47c16902da348947622c5667062052d903dd6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware)) to head ([`47dbf82`](https://app.codecov.io/gl/unboundsoftware/schemas/commit/47dbf827f2cf994074c5e792767c55f60fd6da0e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware)). | [Files with missing lines](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) | Patch % | Lines | |---|---|---| | [graph/schema.resolvers.go](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?src=pr&el=tree&filepath=graph%2Fschema.resolvers.go&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware#diff-Z3JhcGgvc2NoZW1hLnJlc29sdmVycy5nbw==) | 0.00% | [104 Missing :warning: ](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?src=pr&el=tree&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) | | [cmd/service/service.go](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?src=pr&el=tree&filepath=cmd%2Fservice%2Fservice.go&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware#diff-Y21kL3NlcnZpY2Uvc2VydmljZS5nbw==) | 0.00% | [17 Missing :warning: ](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?src=pr&el=tree&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) | | [graph/cosmo.go](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?src=pr&el=tree&filepath=graph%2Fcosmo.go&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware#diff-Z3JhcGgvY29zbW8uZ28=) | 72.13% | [13 Missing and 4 partials :warning: ](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?src=pr&el=tree&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware) | <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## main #623 +/- ## ======================================== + Coverage 4.11% 7.74% +3.62% ======================================== Files 44 44 Lines 2139 2299 +160 ======================================== + Hits 88 178 +90 - Misses 2050 2116 +66 - Partials 1 5 +4 ``` </details> [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gl/unboundsoftware/schemas/pull/623?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=gitlab&utm_content=comment&utm_campaign=pr+comments&utm_term=unboundsoftware). :loudspeaker: Have feedback on the report? [Share it here](https://gitlab.com/codecov-open-source/codecov-user-feedback/-/issues/4). <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. </details>
argoyle commented 2025-11-20 17:25:04 +00:00 (Migrated from gitlab.com)

aborted the automatic merge because the source branch was updated. Learn more.

aborted the automatic merge because the source branch was updated. [Learn more](https://gitlab.com/help/ci/pipelines/merge_trains.md#merge-request-dropped-from-the-merge-train).
argoyle commented 2025-11-20 17:25:05 +00:00 (Migrated from gitlab.com)

added 6 commits

  • 900b594c...a9a47c16 - 2 commits from branch main
  • bb0c08be - fix: enhance API key handling and logging in middleware
  • 4d18cf41 - feat(tests): add unit tests for WebSocket initialization logic
  • 9368d77b - feat: add latestSchema query for retrieving schema updates
  • df44ddbb - test: enhance assertions for version and subscription config

Compare with previous version

added 6 commits <ul><li>900b594c...a9a47c16 - 2 commits from branch <code>main</code></li><li>bb0c08be - fix: enhance API key handling and logging in middleware</li><li>4d18cf41 - feat(tests): add unit tests for WebSocket initialization logic</li><li>9368d77b - feat: add latestSchema query for retrieving schema updates</li><li>df44ddbb - test: enhance assertions for version and subscription config</li></ul> [Compare with previous version](/unboundsoftware/schemas/-/merge_requests/623/diffs?diff_id=1572971841&start_sha=900b594cade9251500a359dfe05bec9518fe3751)
argoyle commented 2025-11-20 20:09:12 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 47dbf827 - fix: add command executor interface for better testing

Compare with previous version

added 1 commit <ul><li>47dbf827 - fix: add command executor interface for better testing</li></ul> [Compare with previous version](/unboundsoftware/schemas/-/merge_requests/623/diffs?diff_id=1573185173&start_sha=df44ddbb8ed406913a282c821295baf19d518d43)
argoyle commented 2025-11-20 20:26:23 +00:00 (Migrated from gitlab.com)

mentioned in commit b1a46f9d4e

mentioned in commit b1a46f9d4e26d27da192e7ed62d7cf426f7559dd
argoyle (Migrated from gitlab.com) merged commit b1a46f9d4e into main 2025-11-20 20:26:23 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unboundsoftware/schemas#627