File tree Expand file tree Collapse file tree 13 files changed +58
-43
lines changed
deployment/src/main/java/app/fyreplace/api/sentry/processors
runtime/src/main/java/app/fyreplace/api/sentry/recorders
java/app/fyreplace/api/data Expand file tree Collapse file tree 13 files changed +58
-43
lines changed Original file line number Diff line number Diff line change 1515jobs :
1616 formatting :
1717 name : Check formatting
18- runs-on : ubuntu-latest
18+ runs-on : ubuntu-24.04
1919
2020 steps :
2121 - name : Checkout repository
22- uses : actions/checkout@v4
22+ uses : actions/checkout@v5
2323
2424 - uses : actions/setup-java@v4
2525 with :
@@ -32,12 +32,12 @@ jobs:
3232
3333 test :
3434 name : Test
35- runs-on : ubuntu-latest
35+ runs-on : ubuntu-24.04
3636 environment : test
3737
3838 steps :
3939 - name : Checkout code
40- uses : actions/checkout@v4
40+ uses : actions/checkout@v5
4141
4242 - uses : actions/setup-java@v4
4343 with :
Original file line number Diff line number Diff line change 11org.gradle.jvmargs =-Xmx1024M
2- quarkusPlatformVersion =3.21.4
3- quarkusPluginVersion =3.21.4
4- sentryVersion =8.11 .1
2+ quarkusPlatformVersion =3.25.3
3+ quarkusPluginVersion =3.25.3
4+ sentryVersion =8.19 .1
55javaXtVersion =2.1.11
66twelveMonkeysVersion =3.12.0
7- spotlessPluginVersion =7.0.3
8- lombokPluginVersion =8.13.1
7+ spotlessPluginVersion =7.2.1
8+ lombokPluginVersion =8.14
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.14.3 -bin.zip
44networkTimeout =10000
55validateDistributionUrl =true
66zipStoreBase =GRADLE_USER_HOME
Original file line number Diff line number Diff line change 11package app .fyreplace .api .sentry .processors ;
22
3- import app .fyreplace .api .sentry .config .SentryConfig ;
43import app .fyreplace .api .sentry .recorders .SentryRecorder ;
54import io .quarkus .deployment .annotations .BuildStep ;
65import io .quarkus .deployment .annotations .ExecutionTime ;
@@ -33,7 +32,7 @@ SystemPropertyBuildItem setContextStorageProvider() {
3332
3433 @ BuildStep
3534 @ Record (ExecutionTime .RUNTIME_INIT )
36- LogHandlerBuildItem addSentryHandler (final SentryConfig config , final SentryRecorder recorder ) {
37- return new LogHandlerBuildItem (recorder .create (config ));
35+ LogHandlerBuildItem addSentryHandler (final SentryRecorder recorder ) {
36+ return new LogHandlerBuildItem (recorder .create ());
3837 }
3938}
Original file line number Diff line number Diff line change 1414
1515@ Recorder
1616public class SentryRecorder {
17- public RuntimeValue <Optional <Handler >> create (final SentryConfig sentryConfig ) {
17+ private final RuntimeValue <SentryConfig > pendingSentryConfig ;
18+
19+ public SentryRecorder (RuntimeValue <SentryConfig > sentryConfig ) {
20+ pendingSentryConfig = sentryConfig ;
21+ }
22+
23+ public RuntimeValue <Optional <Handler >> create () {
24+ final var sentryConfig = pendingSentryConfig .getValue ();
25+
1826 if (sentryConfig .dsn ().isEmpty ()) {
1927 return new RuntimeValue <>(Optional .empty ());
2028 }
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ pluginManagement {
1212}
1313
1414rootProject. name = " fyreplace-api"
15- include " :quarkus-sentry:runtime" , " :quarkus-sentry:deployment"
15+ include( " :quarkus-sentry:runtime" , " :quarkus-sentry:deployment" )
Original file line number Diff line number Diff line change 11package app .fyreplace .api .data ;
22
3+ import com .fasterxml .jackson .annotation .JsonGetter ;
34import com .fasterxml .jackson .annotation .JsonIgnore ;
4- import com .fasterxml .jackson .annotation .JsonProperty ;
55import jakarta .annotation .Nullable ;
66import jakarta .persistence .Column ;
77import jakarta .persistence .ManyToOne ;
@@ -22,7 +22,7 @@ public abstract class AuthoredEntityBase extends UserDependentEntityBase {
2222 public boolean anonymous = false ;
2323
2424 @ SuppressWarnings ("unused" )
25- @ JsonProperty ("author" )
25+ @ JsonGetter ("author" )
2626 @ Nullable
2727 public User .Profile getAuthorProfile () {
2828 if (anonymous && (currentUser == null || !currentUser .id .equals (author .id ))) {
Original file line number Diff line number Diff line change 11package app .fyreplace .api .data ;
22
33import com .fasterxml .jackson .annotation .JsonIgnore ;
4- import com .fasterxml .jackson .annotation .JsonProperty ;
54import jakarta .annotation .Nonnull ;
65import jakarta .persistence .Column ;
76import jakarta .persistence .Entity ;
@@ -40,8 +39,6 @@ public void scrub() {
4039 text = "" ;
4140 }
4241
43- @ SuppressWarnings ("unused" )
44- @ JsonProperty ("deleted" )
4542 public boolean isDeleted () {
4643 return deleted ;
4744 }
Original file line number Diff line number Diff line change 11package app .fyreplace .api .data ;
22
33import com .fasterxml .jackson .annotation .JsonIgnore ;
4- import com .fasterxml .jackson .annotation .JsonProperty ;
54import jakarta .persistence .Column ;
65import jakarta .persistence .Entity ;
76import jakarta .persistence .ManyToOne ;
@@ -29,7 +28,6 @@ public class Email extends EntityBase {
2928 @ Schema (required = true )
3029 public boolean verified = false ;
3130
32- @ JsonProperty ("main" )
3331 @ Schema (required = true )
3432 public boolean isMain () {
3533 return id .equals (user .mainEmail .id );
Original file line number Diff line number Diff line change 11package app .fyreplace .api .data ;
22
3- import com .fasterxml .jackson .annotation .JsonIgnore ;
4- import com .fasterxml .jackson .annotation .JsonProperty ;
3+ import com .fasterxml .jackson .databind .annotation .JsonSerialize ;
54import jakarta .persistence .Column ;
65import jakarta .persistence .Entity ;
76import jakarta .persistence .ManyToOne ;
1918public class Report extends TimestampedEntityBase {
2019 @ ManyToOne (optional = false )
2120 @ OnDelete (action = OnDeleteAction .CASCADE )
22- @ JsonIgnore
21+ @ JsonSerialize ( using = User . ProfileSerializer . class )
2322 public User source ;
2423
2524 @ Column (nullable = false )
26- @ JsonIgnore
25+ @ JsonSerialize ( using = Reportable . Serializer . class )
2726 public Class <? extends Reportable > targetModel ;
2827
2928 @ Column (nullable = false )
3029 @ Schema (required = true )
3130 public UUID targetId ;
32-
33- @ SuppressWarnings ("unused" )
34- @ JsonProperty ("source" )
35- @ Schema (required = true )
36- public User .Profile getSourceProfile () {
37- return source .getProfile ();
38- }
39-
40- @ SuppressWarnings ("unused" )
41- @ JsonProperty ("targetModel" )
42- @ Schema (required = true )
43- public String getTargetModelSimpleName () {
44- return targetModel .getSimpleName ();
45- }
4631}
You can’t perform that action at this time.
0 commit comments