Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check prevDescription not null to avoid NPE #38

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

nivolg
Copy link
Contributor

@nivolg nivolg commented Dec 12, 2024

We encounter an error when the source MR has an empty description. I added a check for null.
Message from log:
{"message":"GitlabEvent: '38e2b796-c896-430b-b853-edf3fefebdce' | Exception while creating auto merge request. Project: '288', User: '20', SourceBranch: 'feature-PR-7569', TargetBranch: 'release-24.4', MergeRequestNumber: '17', MergeSha: 'fed6e09508eba69a19793cdd7e69dbaf39d07e20'\njava.lang.NullPointerException: Cannot invoke "String.isBlank()" because "prevDescription" is null\n\tat service.GitLabService.buildDescription(GitLabService.java:321)\n\tat service.GitLabService.createAutoMergeRequest(GitLabService.java:276)\n\tat service.GitLabService.merge(GitLabService.java:249)\n\tat service.GitLabService.createAutoMr(GitLabService.java:219)\n\tat service.GitLabService.handleMrMergeEvent(GitLabService.java:137)\n\tat service.GitLabService.mergeRequest(GitLabService.java:96)\n\tat service.GitLabService_ClientProxy.mergeRequest(Unknown Source)\n\tat service.GitLabService_VertxInvoker_mergeRequest_a4d1c2c568052411df78f735c61ae86d3766853c.invokeBean(Unknown Source)\n\tat io.quarkus.vertx.runtime.EventConsumerInvoker.invoke(EventConsumerInvoker.java:41)\n\tat io.quarkus.vertx.runtime.VertxRecorder$3$1$1.handle(VertxRecorder.java:116)\n\tat io.quarkus.vertx.runtime.VertxRecorder$3$1$1.handle(VertxRecorder.java:112)\n\tat io.vertx.core.impl.ContextBase.lambda$null$0(ContextBase.java:137)\n\tat io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:264)\n\tat io.vertx.core.impl.ContextBase.lambda$executeBlocking$1(ContextBase.java:135)\n\tat io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)\n\tat org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)\n\tat org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)\n\tat org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)\n\tat org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Thread.java:833)\n","severity":"WARNING","timestamp":{"seconds":1733930365,"nanos":495059535},"logging.googleapis.com/sourceLocation":{"file":"GitLabService.java","line":"139","function":"service.GitLabService.handleMrMergeEvent"}}

@jmini jmini requested a review from fbpe December 13, 2024 07:17
@fbpe fbpe merged commit bd31565 into unblu:main Dec 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants