-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
kavita: 0.7.1.4 -> 0.7.13 #281236
kavita: 0.7.1.4 -> 0.7.13 #281236
Conversation
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.
I probably should have searched for these before I submitted another PR, oops. Yours seems to have a lot more fixes, but if you want it superseded I can cherry pick your changes. |
Seeing that you added yourself as a maintainer it might make more sense just to update the previous PR and get it merged, however. |
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.
We can just move forward in this PR, IMO. Tested locally on my system.
Looks good to me, I think it just needs a mention in the release notes as the module changes are breaking.
A nit, doesn't need to be addressed in this PR, but I thought it would be nice to remove the backend->frontend dependency and add some glue to pass in the correct frontend path at runtime.
It could speed up builds, and it would also speed up running the update script as it currently needs to build the frontend just to build backend.fetch-deps. Also makes patching the frontend less burdensome.
Note: https://github.com/Kareadita/Kavita/releases/tag/v0.7.13 is latest |
fea480d
to
3e79991
Compare
Changes seem OK, still needs release notes mention. |
a2bcc50
to
461d559
Compare
Rebased to solve the merge conflict |
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.
Thanks for this! Diff looks good, local testing looks nice as well.
461d559
to
a20cd5b
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1498 |
(substituteAll { | ||
src = ./change-webroot.diff; | ||
web_root = "${finalAttrs.frontend}/lib/node_modules/kavita-webui/dist"; | ||
}) | ||
./change-webroot.diff | ||
]; | ||
postPatch = '' | ||
substituteInPlace API/Services/DirectoryService.cs --replace "@NixKavitaBackendLib@" "$out/lib/kavita-backend/" | ||
substituteInPlace API/Startup.cs API/Services/LocalizationService.cs API/Controllers/FallbackController.cs \ | ||
--replace "@NixKavitaWebRoot@" "${finalAttrs.frontend}/lib/node_modules/kavita-webui/dist/browser" | ||
''; |
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.
Please keep the subsituteAll, as it is more clean
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.
Do you have an idea for how to refer to the package output rather than the patch output, in that case? I first tried to preserve the substituteAll
but couldn't figure that part out.
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.
I don't think that is possible, as $out or placeholder $out refers to the patch
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.
In that case, I have to use the bash substituteAll
- this seems like a bad choice, as the variables aren't explicitly defined, making it hard to trace what it's used for (further explained in #237216). I cleaned up the substituteInPlace
usage a little, maybe this is more palatable.
36674ab
to
5497589
Compare
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.
Tests are failing:
kavita # [ 979.738746] kavita[14893]: [Kavita] [2024-03-26 04:37:51.333 +00:00 9] [Fatal] API.Program Running MigrateLibrariesToHaveAllFileTypes migration - Completed. This is not an error
kavita # [ 979.784446] kavita[14893]: [Kavita] [2024-03-26 04:37:51.378 +00:00 9] [Information] API.Program Running Migrations - complete
kavita # [ 979.802062] kavita[14893]: [Kavita] [2024-03-26 04:37:51.385 +00:00 1] [Error] There was an error setting base url
kavita # [ 979.803021] kavita[14893]: System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/lib/kavita/@version@/index.html'.
kavita # [ 979.804095] kavita[14893]: at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
kavita # [ 979.805046] kavita[14893]: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
kavita # [ 979.806432] kavita[14893]: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
kavita # [ 979.808773] kavita[14893]: at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
kavita # [ 979.810299] kavita[14893]: at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
kavita # [ 979.811350] kavita[14893]: at System.IO.StreamReader..ctor(String path, Encoding encoding)
kavita # [ 979.812097] kavita[14893]: at HtmlAgilityPack.HtmlDocument.Load(String path)
kavita # [ 979.812736] kavita[14893]: at API.Startup.UpdateBaseUrlInIndex(String baseUrl) in /build/source/API/Startup.cs:line 409
kavita # [ 979.820871] kavita[14893]: [Kavita] [2024-03-26 04:37:51.414 +00:00 1] [Fatal] Microsoft.AspNetCore.Hosting.Diagnostics Application startup exception
kavita # [ 979.822081] kavita[14893]: System.ArgumentException: The path must be absolute. (Parameter 'root')
kavita # [ 979.823054] kavita[14893]: at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
kavita # [ 979.825072] kavita[14893]: at API.Startup.Configure(IApplicationBuilder app, IBackgroundJobClient backgroundJobs, IWebHostEnvironment env, IHostApplicationLifetime applicationLifetime, IServiceProvider serviceProvider, ICacheService cacheService, IDirectoryService directoryService, IUnitOfWork unitOfWork, IBackupService backupService, IImageService imageService) in /build/source/API/Startup.cs:line 335
kavita # [ 979.827836] kavita[14893]: at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
kavita # [ 979.828901] kavita[14893]: at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
kavita # [ 979.830210] kavita[14893]: at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
kavita # [ 979.831199] kavita[14893]: at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
kavita # [ 979.833059] kavita[14893]: [Kavita] [2024-03-26 04:37:51.419 +00:00 1] [Error] Microsoft.Extensions.Hosting.Internal.Host Hosting failed to start
kavita # [ 979.834193] kavita[14893]: System.ArgumentException: The path must be absolute. (Parameter 'root')
kavita # [ 979.834962] kavita[14893]: at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
kavita # [ 979.835978] kavita[14893]: at API.Startup.Configure(IApplicationBuilder app, IBackgroundJobClient backgroundJobs, IWebHostEnvironment env, IHostApplicationLifetime applicationLifetime, IServiceProvider serviceProvider, ICacheService cacheService, IDirectoryService directoryService, IUnitOfWork unitOfWork, IBackupService backupService, IImageService imageService) in /build/source/API/Startup.cs:line 335
kavita # [ 979.838743] kavita[14893]: at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
kavita # [ 979.840124] kavita[14893]: at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
kavita # [ 979.841437] kavita[14893]: at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
kavita # [ 979.842431] kavita[14893]: at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
kavita # [ 979.844128] kavita[14893]: at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
kavita # [ 979.845243] kavita[14893]: at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
kavita # [ 979.850599] kavita[14893]: [Kavita] [2024-03-26 04:37:51.444 +00:00 1] [Fatal] Host terminated unexpectedly
kavita # [ 979.851495] kavita[14893]: System.ArgumentException: The path must be absolute. (Parameter 'root')
kavita # [ 979.852343] kavita[14893]: at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
kavita # [ 979.854060] kavita[14893]: at API.Startup.Configure(IApplicationBuilder app, IBackgroundJobClient backgroundJobs, IWebHostEnvironment env, IHostApplicationLifetime applicationLifetime, IServiceProvider serviceProvider, ICacheService cacheService, IDirectoryService directoryService, IUnitOfWork unitOfWork, IBackupService backupService, IImageService imageService) in /build/source/API/Startup.cs:line 335
kavita # [ 979.856825] kavita[14893]: at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
kavita # [ 979.857905] kavita[14893]: at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
kavita # [ 979.859218] kavita[14893]: at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
kavita # [ 979.860215] kavita[14893]: at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
kavita # [ 979.861214] kavita[14893]: at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
kavita # [ 979.862296] kavita[14893]: at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
kavita # [ 979.863916] kavita[14893]: at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
kavita # [ 979.865123] kavita[14893]: at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
kavita # [ 979.866184] kavita[14893]: at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
kavita # [ 979.867241] kavita[14893]: at API.Program.Main(String[] args) in /build/source/API/Program.cs:line 116
kavita # [ 979.905592] systemd[1]: kavita.service: Deactivated successfully.
kavita # [ 979.908392] systemd[1]: kavita.service: Consumed 2.373s CPU time, no IP traffic.
kavita # [ 979.911450] systemd[1]: run-credentials-kavita.service.mount: Deactivated successfully.
kavita # % Total % Received % Xferd Average Speed Time Time Time Current
kavita # Dload Upload Total Spent Left Speed
kavita # 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
kavita # curl: (7) Failed to connect to kavita port 5000 after 11 ms: Couldn't connect to server
kavita # [ 980.162059] systemd[1]: kavita.service: Scheduled restart job, restart counter is at 322.
kavita # [ 980.166589] systemd[1]: Starting Kavita...
kavita # [ 980.256907] systemd[1]: Started Kavita.
kavita # % Total % Received % Xferd Average Speed Time Time Time Current
kavita # Dload Upload Total Spent Left Speed
kavita # 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
kavita # curl: (7) Failed to connect to kavita port 5000 after 22 ms: Couldn't connect to server
kavita # % Total % Received % Xferd Average Speed Time Time Time Current
kavita # Dload Upload Total Spent Left Speed
kavita # 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
kavita # curl: (7) Failed to connect to kavita port 5000 after 17 ms: Couldn't connect to server
cleanup
kill machine (pid 9)
qemu-kvm: terminating on signal 15 from pid 6 (/nix/store/7wz6hm9i8wljz0hgwz1wqmn2zlbgavrq-python3-3.11.8/bin/python3.11)
Co-authored-by: Yongun Seong <nevivurn@nevi.dev>
Tests should be passing now, after all these messy pushes. |
Description of changes
https://github.com/Kareadita/Kavita/releases/tag/v0.7.12
https://github.com/Kareadita/Kavita/releases/tag/v0.7.13
Also imported configuration changes from #263649, including switching to freeform settings.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.