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
Initialize default theme when Halo starts up for the first time #2704
Initialize default theme when Halo starts up for the first time #2704
Conversation
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
Signed-off-by: John Niang <johnniang@fastmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: John Niang <johnniang@fastmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
#### What type of PR is this? /kind bug /kind regression /area core /milestone 2.0 #### What this PR does / why we need it: When we try to upgrade a theme, error will appear like below: ```java 2022-11-18T15:45:35.130+08:00 ERROR 18136 --- [oundedElastic-1] a.w.r.e.AbstractErrorWebExceptionHandler : [26de12d5-51] 500 Server Error for HTTP POST "/apis/api.console.halo.run/v1alpha1/themes/theme-earth/upgrade" java.io.IOException: Pipe closed at java.base/java.io.PipedInputStream.read(PipedInputStream.java:307) ~[na:na] Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Assembly trace from producer [reactor.core.publisher.MonoFlatMap] : reactor.core.publisher.Mono.flatMap(Mono.java:3080) run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:72) Error has been observed at the following site(s): *____________Mono.flatMap ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:72) |_ Mono.doOnNext ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:82) |_ Mono.map ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:88) |_ Mono.doOnNext ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:89) |_ Mono.flatMap ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:98) |_ Mono.doOnNext ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:103) |_ Mono.flatMap ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:112) |_ Mono.doFinally ⇢ at run.halo.app.core.extension.theme.ThemeServiceImpl.upgrade(ThemeServiceImpl.java:113) *____________Mono.flatMap ⇢ at run.halo.app.core.extension.theme.ThemeEndpoint.upgrade(ThemeEndpoint.java:180) |_ Mono.flatMap ⇢ at run.halo.app.core.extension.theme.ThemeEndpoint.upgrade(ThemeEndpoint.java:187) ``` This might be caused by PR <#2704>. #### Special notes for your reviewer: Steps to test: 1. Upgrade any theme #### Does this PR introduce a user-facing change? ```release-note None ```
What type of PR is this?
/kind feature
/area core
/milestone 2.0
What this PR does / why we need it:
Default theme configuration is as following:
Which issue(s) this PR fixes:
Fixes #2700
Special notes for your reviewer:
Steps to test:
~/halo-next/themes
Does this PR introduce a user-facing change?