mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
eb955e939dcebf818d55fb40407fa357d12266d7
16
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ecfbd0bf66 |
Keep FerretDB launchers standalone
Run bundled and containerized FerretDB with polling and no replica-set state. Keep replica-set setup explicit for MongoDB 7 and the Meteor 3 multitenancy deployment, including an idempotent initialization helper and scoped OpLog credentials. Thanks to xet7 ! |
||
|
|
c4cb87345b |
Reorganize documentation and repair links.
Move feature and webserver documentation into the reorganized hierarchy, update references to their new relative paths, and extend link validation across the complete documentation tree.\n\nThanks to xet7 ! |
||
|
|
33c867f4d8 |
Every platform talks sockjs, and no bundle ships uws or the legacy client.
uws is not reliable enough yet to be what a default points at, so nothing WeKan
ships selects it any more, and nothing carries the module.
DEFAULTS. Every docker-compose file, start-wekan.sh, start-wekan.bat, build.sh,
build.bat, the image's own ENV block, the snap config and the Sandstorm grain
now say sockjs. The commented-out `#- DDP_TRANSPORT=uws` alternatives beside
them are replaced by a note saying why there is no alternative, rather than
advertising a value that no longer works.
BUNDLES. Every place a built bundle is post-processed - the amd64 build, each
per-arch rebuild, the repack container, install-node-for-arch.sh and the
Dockerfile - now runs bundle-trim.mjs beside the prune it already ran:
* --transport sockjs removes uWebSockets.js entirely. 121 MiB of prebuilt
binaries for OS/CPU/ABI combinations one machine cannot use, and a sockjs
server never requires the module at all: ddp-server's
`Npm.require('uWebSockets.js')` is inside the uws transport's setup(), which
runs only for the transport that was chosen.
* --drop-legacy-client removes programs/web.browser.legacy, a whole second
copy of the client for browsers without modern JS. 81 MiB measured. Meteor
supports running with architectures excluded and says so in webapp's
categorizeRequest(): "If our preferred arch is not available, it's better to
use another client arch that is available than to guarantee the site won't
work". An old browser is served web.browser; the 404 branch below that is
reached only when NO arch matches, which cannot happen while web.browser is
there, and autoupdate iterates the programs that actually loaded.
The files are only half of it. The arch is NAMED in programs/server/config.json
and star.json, and boot.js builds a dynamic-import root for every name in the
first - so the name is removed with the files. Those manifests are mode 444
as Meteor writes them, so they are made writable, rewritten, and set back:
failing there would leave the one state that actually breaks a server, files
gone and manifests still naming the arch.
UPGRADES. An existing docker-compose.yml that says DDP_TRANSPORT=uws would ask
the new image for a module it does not have and crash-loop on the require. So
wekan-entrypoint.sh and the bundle's start-wekan.sh coerce uws back to sockjs
before starting anything, and print why - a setting silently ignored is worse
than one that fails.
tests/sockjsEverywhere.test.cjs pins all three halves together, because each is
useless or harmful without the others: a default without the coercion is an
upgrade trap, a coercion without the trim is dead weight, and a trim without
both is a crash. tests/bundleTrim.test.cjs covers the legacy removal, the
manifest deregistration and the read-only rewrite.
Thanks to xet7 !
|
||
|
|
e80009bb80 |
Board Settings: remove Card Settings, which the card and minicard menus now hold.
Every setting in that table is in the menu of the thing it is about: the card's menu has "Show on Card" and a minicard's has "Show on Minicard", each with that column of it. A board-wide entry as well is a third way to one list, and the way furthest from what it changes. The table itself is untouched - the two menus include it - so this removes the row from the board menu and the handler that opened it, nothing else. The Sandstorm and Scaling docs named the old route and now name the new one. Thanks to xet7 ! |
||
|
|
f0204ae014 |
Show on Card and Show on Minicard in the menus of the card and the minicard.
Board Settings / Card Settings is a table of twenty-four settings in two columns - what a card shows, and what a minicard shows - and it lived in one place only, four clicks from the card whose fields it decides. It is now also the first entry of the two menus it is about: the opened card's hamburger offers Show on Card, a minicard's offers Show on Minicard, each followed by a rule like every other group in those menus. Both open the SAME popup with the other column hidden by a class, so there is one list of settings and one set of handlers; a setting added to the table appears in all three places by itself. The permission is the one Board Settings already used - a board admin - asked in the menu and again where it acts. The menu is opened from two places and its data context is the card either way, so the opener records which hamburger it was in a module-level reactive value rather than a field on the card document, which a re-render throws away. "Hide minicard label text" left the right sidebar, where nothing else about a minicard is, and became the "Labels text" row of the same table, directly under Labels. It is ticked when the text is SHOWN, which is the default: the stored flag is a "hidden" one, and reading it straight through would leave the box unticked for the behaviour a board has out of the box. It is the one personal row of a board-wide table, so it shows in the minicard's view only, is offered to everybody, and a reader who is not a board admin gets that row alone. The move found a bug: the setting was written out three times and the minicard's own copy only ever wrote localStorage, so a logged-in user toggling it set something nothing reads. One module reads and writes it now. The board sidebar's Activities heading had an eye and the words "Show activities" beside it - one setting with two controls and its own name twice. It is a caret in front of the heading now, and the heading is the button, which is what every collapsible section of an opened card already is. Both take the caret's direction from one function, so it cannot point one way on a card and another in the sidebar of the same language. tests/showOnCardMenus.test.cjs pins all of it. The Sandstorm and Scaling docs name the new route beside the old one, and the developer directory structure lists the three new client/lib modules. Thanks to xet7 ! |
||
|
|
4254dfa396 |
Snap: a wait for the database is a page, not a timeout.
#6592: "We upgraded from 10.85 to 10.89 and later to 10.90 - a reload of wekan got a timeout (loading forever). ... Reload with F5 or Ctrl+F5 - opening in a new private browser tab also doesn't work." WeKan does not open its web port until the database answers, and the two waits in wekan-control are endless on purpose: a database can take minutes to come up after an update, and a snap that gave up on it would be worse than one that waits. They are not silent either - after two minutes each prints what to check. But NOTHING was listening on the web port while they waited. A browser gets a timeout, which is what "loading forever" is, and everything the script printed went to `snap logs` - the last place somebody whose site is down thinks to look. It also makes the two possible faults look identical: "WeKan does not load" is the report either way, whether WeKan is broken or FerretDB simply did not start. So the wait says so, on the web port. wekan-control serves the existing maintenance page with a new reason, `waiting-for-database`, which names the database being waited for and, in the browser, the four commands: `snap logs wekan.<service>` for the real reason (an `exec format error` is the bundled binary not running on this CPU), `snap run wekan.problems` for which copy of the data is being served, `snap start --enable` for a service left stopped by a failed migration, and `snap revert` back to the revision that worked - with the answer to the question actually being asked, which is whether the data is gone. It refreshes itself away when WeKan starts. Three things make it safe rather than merely nice, and the tests pin each: * it appears only after a grace period (WEKAN_DB_WAIT_PAGE_SECONDS, 30s), so an ordinary restart - which passes through these loops in seconds - never shows it, and proxies are not taught to cache a 503 for a healthy site; * it is stopped, and waited for, before anything else binds that port. The page is a child process and `exec` keeps children alive, so the two re-execs inside the MongoDB loop had to stop it first or the next start would die on EADDRINUSE - a worse fault than the one being fixed; * it is behind its own reason, so maintenance mode, the recovery bridge and the data-too-old stop are untouched. This does not say WHY the reporter's database did not come up - the issue has no logs, and that is the next thing to ask for. It does mean the next person sees the reason instead of a timeout. tests/snapWaitingForDatabasePage.test.cjs drives the page and reads what a browser would get. tests/cpuExecWiring.test.cjs counted the maintenance-page launches and expected two; a count says nothing about the launch that was added, so it now asks each launch line whether it goes through cpu-exec. Thanks to Alishara and xet7 ! Refs #6592 — the reporter's own logs are still needed to say what stopped their database, so this does not close it. |
||
|
|
504e450a11 |
Snap: the status report says which copy of the data is being served.
#6583, comment 5282677837: "sudo snap run wekan.database-compare brings me to: error: cannot find app "database-compare" in "wekan" It seems, that database compare is not included in wekan 10.82, we have installed. Should I upgrade to the most recent version and then try again?" Yes - the two recovery commands are snap APPS, so they exist only in the revision that ships them (v10.90). That is the smaller half of this. The larger half is what happened before it: the same instance, serving data from a migration done in July, was told "No problems detected" by `snap run wekan.problems`, and the admin had to find the command names in a GitHub thread. That report was not wrong. It reads ONE database - the one WeKan is connected to - and every check inside it passed. The question that mattered, WHICH of the two copies that is, was asked by nothing, while the docs already claimed this command answered it. So the report ends with a "Databases on this machine" section: which copy is being served and why (`bin/database-role --why`, the one helper every part of the snap asks, so the report cannot disagree with what the snap does), whether MongoDB files and a FerretDB database both exist, and - when they do - the two commands to run. It reads the files rather than a database, so it answers with WeKan down, and it declares no fault: two copies is the normal state of a migrated snap, and calling that a problem would make every migrated instance look broken. A revision without the commands says so and says to refresh, instead of leaving snapd's "cannot find app" as the last word, and says why refreshing is safe for exactly this case: it does not import an old MongoDB over a FerretDB already in use (#6585), and neither copy is ever deleted. The script ran the Node report with `exec`, which replaces the process, so this had to stop doing that; the report's exit status is still the command's. `wekan.problems migrations|login|cpu|broken-cards` are unchanged - they are used in pipes - and `wekan.help` and Migration-to-FerretDB.md now list the two commands, with the release they arrived in. tests/snapProblemsDatabases.test.cjs pins all of it, including the two negatives: no fault is declared, and the sub-commands print only what they were asked for. Thanks to waltermhl and xet7 ! Refs #6583 — the reporter still has to run the two commands, so this does not close it. |
||
|
|
e533829f5b |
Docker: publish only wekan, on all three registries. Variants commented out.
wekan-ondra and wekan-gantt-gpl are SNAP names - a snap name cannot be changed
once people have it installed - and as Docker images they were only ever a
second name for the same image. The release tagged them on all three registries
for two versions; it does not any more.
Six extra repositories across three registries, each with its own visibility and
its own push permission, is six new ways for a release to fail in order to
publish a copy of something already published, and v10.88 failed exactly that
way an hour into an emulated build:
ERROR: failed to push quay.io/wekan/wekan-ondra:v10.88:
unauthorized: access to the requested resource is not authorized
The wekan image still goes to all three: wekanteam/wekan, quay.io/wekan/wekan
and ghcr.io/wekan/wekan, version tag and latest.
The variant -t lines are COMMENTED OUT, not deleted, with what it would cost to
uncomment them written beside them, and the same for their names in the two
verification loops and the push preflight. docker-variant.yml and
releases/docker-publish-variant.sh stay for publishing one out of band; both are
started by hand and no release calls them.
The SNAPS are untouched: snap-variants still builds and publishes wekan-ondra
and wekan-gantt-gpl on amd64 and arm64, and SNAP_AUTH still carries all three
snap names. Nothing is deleted from any registry either - the tags that exist
keep working for whoever pinned them, they only stop gaining versions.
tests/dockerNoVariantImages.test.cjs replaces the two suites that pinned the
opposite decision: no active variant tag or check, the comments and their
reason present, the manual workflow still dispatch-only, and the snaps still
built.
Thanks to xet7 !
|
||
|
|
bb76e7bf10 |
Snap: remove the database setting. There is one answer, and it is FerretDB.
`snap set wekan database=mongodb|ferretdb` is gone, and so is `snap run wekan.database`. WeKan runs on FerretDB on every platform; MongoDB is in the amd64/arm64 snaps to be READ while a migration is owed. A setting could say something the data did not support, and every way it could was a report: set to mongodb it kept a site on the database the snap migrates away from, for good, because nothing ever set it back - including instances a failed migration or a wrong staleness guess had put there; set to ferretdb with no FerretDB present it would have served an empty site, so the guard against that had to exist anyway; and each script carried its own copy of "which database is this, then". snap-src/bin/database-role replaces it. One helper, asked by wekan-control, mongodb-control, ferretdb-control, migration-pending, attachment-repair and the configure hook, answering from the data: a FerretDB with something in it and a migration that has finished means ferretdb, MongoDB data with the migration still owed means mongodb. An interrupted migration is told from a finished one by the importer's checkpoint, so a partial FerretDB resumes and a finished one whose marker went missing is not migrated over again (#6585). An empty FerretDB beside a MongoDB full of boards is never served. The explanatory page is no longer a dead end: when this snap cannot read the MongoDB files but a FerretDB copy is there, the copy is served - older beats unreadable - and the page says the snap keeps trying rather than giving a command to type. A snap that still has the old setting is told once that it is ignored, and it is unset. docs/Platforms/FOSS/Container/Snap/Migration-to-FerretDB.md is the design in one page: all text data to SQLite, CollectionFS and Meteor-Files attachments to the filesystem, the card History with it, which MongoDB versions can be read, when it runs, what happens when it fails, and how two copies are reconciled. The Admin Panel, Snap and CPU-platform docs point there instead of documenting a setting that no longer exists. Nine guards updated; each says in it which decision changed and why. Thanks to xet7 ! |
||
|
|
71ba0c2dcd |
Snap: a third MongoDB reader, so a 4.x database migrates instead of stopping.
#6471 again, the other half. The previous commit stopped the crash loop and explained it; this one removes the reason for it in the case that was actually reported. A MongoDB server only starts on data whose featureCompatibilityVersion is at most one major behind it, so what the snap can READ is decided by which servers it carries: mongod 7 (FCV 6.0, 7.0) and the MongoDB 3.2 tools (3.2). Everything between was unreadable, and the WeKan snap has shipped 3.6, 4.0, 4.2, 4.4 and 5.0 over the years. The reported error, twice, is mongod 7 naming the gap: "Try MongoDB 4.2 or earlier" - FCV 4.0. So the snap now bundles mongod 4.2 as a third reader, used ONLY to read the old data during a migration and never as the running database. mongod 4.2 opens FCV 4.0 and 4.2, and the modern importer reads it with the bundled driver, which supports servers from 4.2 up - the same importer that reads a 6/7 source, not a second copy of it. The probes run newest-first: 7, then 4.2, then the 3.2 tools, then the explanatory page. amd64 and arm64 only. MongoDB publishes no 4.2 for the other architectures, and they have been FerretDB from their first boot, so there is nothing there to migrate from. IT CARRIES ITS OWN OpenSSL 1.1. The 4.2 build links libssl.so.1.1 and libcrypto.so.1.1, and core24 is Ubuntu 24.04, which ships OpenSSL 3 - without them the binary does not even load. Both come from one Debian libssl1.1 package, staged beside the binary and put on LD_LIBRARY_PATH exactly as the 3.2 tools already are. The filename is resolved by listing the pool rather than pinned, because point releases roll and a pinned name 404s the day they do; three archives are tried in turn. OPTIONAL BY DESIGN. Every failure in the part - download, checksum, OpenSSL, or the binary not running - ends it with a message and no binary, and the migration simply does not find one. A release is never failed over a migration aid, and the snap then behaves as it did before: the unreadable-database page. VERIFIED, as far as this machine allows: mongod 4.2.25 aarch64 was downloaded, staged with the Debian bullseye libssl1.1, and RUN here - "db version v4.2.25, OpenSSL version: OpenSSL 1.1.1w" - then started on a dbpath, forked, and listened on a port. That is the whole mechanism the snap will use, on a 2026 system, outside a snap. The build itself repeats the --version check and unstages the binary if it fails. What is not verified is a real snap build and a real 4.x database; the first upgrade is that test. Still unreadable, and still handled by the page rather than a migration: 3.4, 3.6, 4.4 and 5.0. Adding mongod 5.0 beside this one would close 4.4 and 5.0 the same way, at the same cost in size. Thanks to Philippe-Bentegeac, JDeepix, imlit and xet7 ! |
||
|
|
562fa02718 |
Snap: a database this snap cannot read stops and says so, instead of 502.
#6471. A snap upgraded onto a database left by a MongoDB 4.x or 5.x snap served 502 Bad Gateway forever, with the reason only in `snap logs`: This version of MongoDB is too recent to start up on the existing data files. Try MongoDB 4.2 or earlier. The snap carries two readers - mongod 7, the server it runs, and the MongoDB 3.2 tools for a 6.09-era database - and nothing in between, so 4.x data opens in neither. What the code then did is the one thing that cannot work: migration-control found neither reader could open it and handed back to mongodb-control, mongodb-control started mongod, mongod failed the same way, mongodb-control re-ran the migration, three times by its own counter, and then exited 1 for snapd to restart. Nothing in that loop can succeed - reading those files needs a binary the snap does not have - and the site was down throughout. It stops now, and says so where an admin will see it. migration-control tells "no reader for this vintage" from "unreadable/corrupt" by mongod's own words, writes $SNAP_COMMON/.mongodb-data-too-old carrying the version mongod named as still able to read the data, pauses auto-migration and exits 0 - 0, because snapd restarts a failing service forever and no restart can help. mongodb-control refuses to start a mongod it knows cannot start. wekan-control serves the maintenance page with a third reason, data-too-old, at the top of the script and from inside the database wait loop, so a WeKan already waiting switches over without a restart. The page names the version that can still read the files and gives the two ways forward - revert to the revision that worked, or dump with a MongoDB that can read it and restore into this version - says that nothing was changed and that attachments and avatars are files on disk, and drops the auto-refresh and the spinner the other two maintenance pages have: this is a stop, not a wait, and the page should not promise that something is happening. NOTHING IS DELETED OR MODIFIED on this path. The source data is exactly as it was; the marker is the only thing written, and removing it lets the snap try again. tests/snapOldMongoData.test.cjs covers the wiring in all three scripts and then RUNS the page module - it is standalone Node with no dependencies - to check what an admin actually sees: 503, the version, "untouched", both remedies, no refresh, no spinner. The snap docs gain the section an admin searching for that mongod line will find, with the commands. Thanks to Philippe-Bentegeac, JDeepix, imlit and xet7 ! Fixes #6471, |
||
|
|
cf0c347b2e |
Snap CPU platforms: what the store actually holds at 10.78, and why.
The table said "as of 10.76" and marked every empty square the same way: "built by snapcraft.yaml but that snap has no revision for it yet - uploading one is all that is needed". For eight of the twelve squares that is not true, and it points whoever reads it at the wrong job. Three marks now, because there are three situations. wekan's armhf is BUILT by the release and missing from the store: snapcraft.yaml declares it, snap-launchpad builds it, and it has been failing - most recently on Caddy, which publishes no linux_armhf archive because its asset names are Go's, fixed for the next release. The exotic squares of wekan-ondra and wekan-gantt-gpl are not pending uploads at all: the snap-variants job has four matrix entries, each variant on amd64 and arm64 on GitHub runners, and the ppc64el/s390x/riscv64/armhf builds come from snap-launchpad, which builds only the `wekan` name. Nothing will ever upload those unless the variant job learns Launchpad remote builds under the variant snap names. And wekan-ondra's armhf 0.22 stays a fossil, now said explicitly: there is no newer revision to promote AND nothing currently builds one. riscv64 moved from missing to published since 10.76, so wekan is five of six. Every published architecture is on all four channels, which is the earlier release-to-all-channels work holding. Thanks to xet7 ! |
||
|
|
5ec9f3ae5b |
Document the CPU platforms of the Docker image, beside the snap's.
"Which CPUs is this published for, and why not that one" was answerable for the snap and nowhere else, so the same page now exists for the image: docs/Platforms/FOSS/Container/Docker/CPU-platforms.md. It carries the platform matrix with each platform's TARGETARCH, TARGETVARIANT and bundle, how the set is decided on every release from what the base image publishes and which bundles landed, the three names that differ between Docker, Debian and the WeKan bundles, and one section per platform that is deliberately NOT an image: loong64 (no base image exists at any tag), armv6 (gated on a base with arm/v6), armv7 (the one 32-bit ARM slot must carry the armhf baseline) and the Windows and macOS bundles. It ends with why the FerretDB image covers more platforms than the WeKan one - FROM scratch around a static Go binary needs no userland at all. The snap's page gains the matching armv6 section - the Snap Store has no armv6 architecture, and its only 32-bit ARM is armhf, which an ARMv6 board cannot run - and a table of all fifteen bundles against which six become snaps, so "it is missing" and "it cannot be there" stop looking alike. The two pages link each other, because the answer differs between them. docs/Databases/FerretDB/1/README.md said the per-architecture FerretDB binary was embedded in the bundles "for ppc64le, s390x, riscv64". Every bundle carries one; those three are part of a longer list of platforms where it is the DEFAULT because MongoDB publishes no server. It now lists all seventeen built binaries and separates the three 32-bit ARM builds that are not variants of each other: armhf is GOARM=7, armv6 is GOARM=6, armel is GOARM=5 software floating point. Thanks to xet7 ! |
||
|
|
3c9291338c |
Snap CPU platforms: say which six, why not the other two, and all four channels.
The page listed five architectures and omitted armhf, which snapcraft.yaml has
built all along. It said the release publishes candidate, beta and edge and that
"the stable channel is published manually later" - which is no longer true and
was the reason a build reached three channels of four. And it said nothing about
the two architectures that are bundles but not snaps, so "missing" and "cannot
be there" looked identical.
The matrix is the six `build-for:` entries with the bundle name beside each,
because the two names are not always the same, and a new section explains the
three ways they differ:
ppc64le / ppc64el the same 64-bit POWER under two names - the bundles use
the kernel's, the store uses Debian's. The only rename.
armhf / armv7 NOT a rename, and getting this wrong ships a snap that
crashes. node-patches builds armhf to the Debian baseline
(hard-float, VFPv3-D16, no NEON assumed) so it runs on any
ARMv7-A, and armv7 with NEON for boards that have it. The
store has ONE 32-bit ARM architecture serving every such
device, so it must carry the BASELINE build; the NEON one
would be an illegal instruction on a board without NEON.
armv7 ships as a bundle only.
i386 cannot have a new snap at all, and this is categorically
different from a missing Node.js build. node-patches
patches SOURCE so a binary can be built; here the BASE SNAP
does not exist, because Ubuntu 24.04 has no i386 port. No
patch set can produce a base Canonical does not publish.
The last base with one was core18, end-of-life.
Then what to do about it: the three snaps, all four channels, and why stable is
possible - core24 is a released base, so the snap carries grade: stable, which a
grade: devel core26 snap cannot. A table of what each snap has in the store
today and what is still to upload, including the two fossils that channel
promotion cannot fix: wekan-ondra's armhf at 0.22 and its i386 at 0.X-ci, which
have no newer revision to promote.
And the caveat that matters when running it: without a pinned version the newest
revision of each architecture is promoted, and edge is often ahead of stable, so
a bare run publishes edge builds to stable users.
The armv7 note in models/lib/snapArchitectures.js said "different CPUs", which
was the right conclusion from the wrong reason. It now says what node-patches
actually builds, and a test cross-checks it against that repo's own workflow so
the explanation cannot drift from the binaries.
Thanks to xet7 !
|
||
|
|
354d356a0f |
Take the MongoDB Database Tools from wekan/mongo-tools-patches.
Every place that downloaded bsondump, mongodump, mongoexport, mongofiles, mongoimport, mongorestore, mongostat and mongotop from wekan/mongo-tools now downloads them from wekan/mongo-tools-patches: the amd64 base bundle, the per-arch overwrite in the Linux bundles and in repack-bundle-for-arch.sh, the Windows and macOS bundle jobs, check-arch-binaries.sh, require-binaries.sh, test-download-urls.sh, the Dockerfile, both snapcraft files, the Flatpak and AppImage workflows, the Sandstorm build-deps note and the CPU-platforms docs. wekan/mongo-tools was a fork of a large Go project that changed none of its source - its six commits were all the build workflow. wekan/mongo-tools-patches keeps that build and drops the fork: it clones the newest upstream mongodb/mongo-tools release, applies the patches in dist/ (there are none yet, which is the honest state of it), and publishes the same <tool>-<arch>[.exe] assets with a .sha256sum beside each - the same model wekan/node-patches replaced the wekan/node fork with. Nothing else changes: the asset names, the per-tool tolerance for an architecture that has no binary, and the checksum verification are what they were, because the build script came across unchanged. The new checkout is excluded from git and from Meteor's scan the same way node-patches and the old mongo-tools clone are. Thanks to xet7 ! |
||
|
|
f628a69889 |
Reorganized docs Platforms etc.
Thanks to xet7 ! |