-
Notifications
You must be signed in to change notification settings - Fork 94
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
Rethinking the web-vault repository #137
Comments
I think this way of working has been mentioned a few times before. I also think the patch files make it a bit more transparent into what is going to be patched. That might be easier for small changes and sometimes also for some larger, but i think it will loose a good way to see what has been patched. specifically for Vaultwarden. It might be that i overlook something, so please let me know, or explain it better or even graphically explain it which might help others also to understand it. |
Hm, I think you overestimate the clarity of the patch files a bit. Sure, I can see what gets patched but since the patch file is for the most part not annotated, I will not understand why a patch has been applied (and most of the time I won't care about older patches either, so the accumulating list of patch files is more confusing than helpful). And having the changeset in a single patch file, which are sorted by filename instead of being grouped logically is not the best user experience either. By splitting the changes into more manageable chunks, I also have better context for the change. And if we approach it more like my I'll try to explain it graphically. Upstream has different branches, e.g.
Where Our fork would have the same base but adding additional branches to keep track of our changes.
The changes from I think this would be an improvement to the current way of doing things, as when the application of a patch fails, I have to manually apply the missing changes from the Managing the changes in the forked repository we can easily create a new release (by creating a new branch And as demonstrated in my post you can easily view the differences between the released tag (upstream) and our changed branches, and you could also create a diff file for each branch. For example, in the v2023.5.1 branch I've first applied the v2023.5.1.patch you can see that, if you compare it to the diff file of the first commit). If you really want to, it's also possible to show the differences between two changesets by using something like Furhermore, by actually using the And lastly, I think working with patch files is a bit limiting in what we can do. Not only because it's bit involved, keeping the patches up to date (e.g. when we want to introduce multiple changes concurrently). Having the changes in more manageable chunks might allows us to discuss changes separately and also in the long term to maybe have different web-vault version. Eg. for users that have push notifications or sso enabled (once it has been added). |
2 cents: As a maintainer of the downstream debian packaging both ways would work for me. Currently the original git upstream is referenced and whenever theres a new release here I update that reference, copy the matching patch and let the deb build tooling apply it since it offers such mechanism. If I can reference a maintained soft-fork, I could spare the copying of the patch and would only need to update the git reference. In any way I have some minor steps to do - could be automated. |
Hey not sure if the change is still considered or if you want additional feedback, but since I opened some PR, and I'm maintaining an equivalent distribution. Issues I have with the current system:
I switched to committing the patch on top of the
|
Ill have to dive into this a bit more, but as mentioned before, I'm not against a change though. So basically, we would need a fork of the That would also make it a bit more easier to add and maintain our own github build-scripts for example. |
I don't think so since the goal would be to commit on top of it.
I think for this, the simplest is probably to have a commit which delete all unnecessary folders/files. |
Would it help if i would create a fork in our new vaultwarden repo both of you (@stefan0xC and @Timshel) take a look at this? Since i know both of you have done some work on this already? Ill probably also name it |
Sounds good :). |
Repo is created and can be found here: https://github.com/vaultwarden/vw_web_builds |
@BlackDex I have a slightly different workflow. Like I said I create a new branch for every web-vault release and cherry-pick all changes from the previous release/branch. E.g. for the release Once upon a time I rebase the commits to clean up the changes or add some history (cf. the changes upon web-v2023.5.1 with web-v2023.9.1 or web-v2024.12.1). If you can create a As to how we want to work with this repo in the future I have not thought that far ahead. I think it might be possible to move the build scripts from this repo to the vaultwarden repository and reference the web-vault repo as a submodule. |
I will remark that if not using the From the merged PR:
I think it makes sense to delete it, and when rebasing if some files were modified a
I think it would make sense to replace all the Bitwarden releaselogic with the script used here and keep only one repository. |
Well, referencing it as a submodule will not point to the branch but a specific commit. Cf. https://github.com/stefan0xC/bw_web_builds where I have it pointing to clients @ ef9c943 which is currently the top commit on the v2024.12.1 branch. Updating which commit this submodule points to is part of keeping the version up to date but if we change our build process accordingly we could keep the development between releases separate (e.g. have a branch which targets the currently supported web-vault version and one which targets the next one).
That's true, but it's even less work if we don't have to
So integrate everything in the main vaultwarden repository? |
Yes when I answered it was with the assumption to only use https://github.com/vaultwarden/vw_web_builds to build the front package. Which is what I meant too when I mentioned moving the release logic 😅 . An alternative could be to add all the build logic to the |
I've been working on a soft fork of the clients repository where the changes to the web-vault can be directly applied. The idea is to having a separate branch for each web-vault release, which is likely easier to manage than the way we currently do with the patch files. And we could manage the releases using that repository as a submodule in this repository like this.
While this is a proof of concept right now, I believe it would make it easier to keep track of the changes in the future because the changes can be annotated in the commits (cf. my v2023.7.1 branch).
If we want we could also add the old patch files more or less unmodified like I've done in v2023.5.1.patch.
By using something like
git cherry-pick v2023.7.1~4..v2023.7.1
(which I've tested on therc
branch) it's easy to re-apply the changeset to a new release (and it's also more comfortable to use in case of merge conflicts).Keeping the changes to the bitwarden/clients repository separate from this repository would also make it possible to just change the
version
inapp/web/package.json
so we could get rid of thevw-version.json
file entirely.The obvious drawback is that we'd have to maintain a fork but I think that it would be worth it.
The text was updated successfully, but these errors were encountered: