Skip to content

PR3/15: pic-sure-spring-commons shared library#262

Merged
Gcolon021 merged 15 commits into
api_rewrite_stablefrom
psar/03-spring-commons
Jul 16, 2026
Merged

PR3/15: pic-sure-spring-commons shared library#262
Gcolon021 merged 15 commits into
api_rewrite_stablefrom
psar/03-spring-commons

Conversation

@Gcolon021

Copy link
Copy Markdown
Contributor

Shared Spring lib: PicsureException, audit base + AuditLoggingFilter, GatewayUser identity, RequestIdFilter, actuator-security helper. Depends on logging-client + api-model. 34 tests.


📚 Stacked PR series (1–7) — part of decomposing the pic_sure_api_rewrite monorepo rewrite into sequential, independently-green PRs. Review and merge bottom-up (this PR's base is the PR below it; GitHub auto-retargets to main as each merges). Every PR builds + tests green on its own under JDK 25.

JamesPeck and others added 9 commits March 3, 2026 12:35
* Refactor LoggingClient to use Sender interface

* Refactor LoggingClient to use config in JdkHttpSender

* Add Sender interface for logging functionality

* Implement JdkHttpSender for asynchronous HTTP requests

* Add NoOpSender class for logging

* Refactor LoggingClientTest for clarity and safety

* Refactor test method signatures for consistency
* add package wf

* Format

* Add wf files

Update README.md
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dd4fad5e-0092-4d29-8a4f-2c27aac9d5aa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch psar/03-spring-commons

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Gcolon021 Gcolon021 changed the title PR3/7: pic-sure-spring-commons shared library PR3/14: pic-sure-spring-commons shared library Jul 11, 2026
@Gcolon021 Gcolon021 self-assigned this Jul 14, 2026
@Gcolon021
Gcolon021 requested a review from JamesPeck July 14, 2026 15:24
@Gcolon021 Gcolon021 assigned ramari16 and unassigned ramari16 Jul 14, 2026
@Gcolon021
Gcolon021 requested review from ramari16 and srpiatt July 14, 2026 15:26
@Gcolon021 Gcolon021 added the enhancement New feature or request label Jul 14, 2026
@Gcolon021
Gcolon021 marked this pull request as ready for review July 14, 2026 15:26
@Gcolon021
Gcolon021 force-pushed the psar/02-vendor-libs branch from afafdec to 8f3d502 Compare July 14, 2026 18:08
@Gcolon021
Gcolon021 force-pushed the psar/03-spring-commons branch from 9ee2d71 to 6bae834 Compare July 14, 2026 18:08
@Gcolon021 Gcolon021 changed the title PR3/14: pic-sure-spring-commons shared library PR3/15: pic-sure-spring-commons shared library Jul 14, 2026
* merges it into the emitted logging event's metadata. No-arg-constructable so callers can scope one instance per request without a DI
* container (e.g. a request-scoped Spring bean, or plain {@code new} in a filter chain).
*/
public class AuditContext {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the audit stuff in pic-sure-spring-commons?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the AuditLoggingFilter extends OncePerRequestFilter which is a springframework abstract class. Due to this I put all of it in the spring commons lib.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick, and would be tech debt but maybe that LoggingFilter goes in the logging lib and everything else in common? IDK not important. I know it can be very hard to untangle this stuff

@Gcolon021 Gcolon021 Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'd push back on this request. It would make the dependency graph worse. It would break a cohesive package across artifacts with no real gain. The only consumer of this package is currently the gateway and its a spring project.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair. I was thinking that this was used across projects but it's not

@Gcolon021
Gcolon021 changed the base branch from psar/02-vendor-libs to api_rewrite_stable July 16, 2026 18:06
@Gcolon021
Gcolon021 merged commit 8c7ff46 into api_rewrite_stable Jul 16, 2026
4 checks passed
@Gcolon021
Gcolon021 deleted the psar/03-spring-commons branch July 16, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants