On 03.10.24 23:21, Antoine Beaupré wrote:
Yeah, I'm kind of hoping they stop doing that already with the v3. But i will note that people *are* trying to keep up with a lot of modules like this for other projects, and I think it's actually possible to give it a try already.
The v3.0.0 uses a totally different (and presumably quite new) framework called Mantine (https://mantine.dev/), so it's anybody's guess when that will be usable within Debian. I don't see any relevant ITP or RFP bugs for it. Given that the prometheus package is struggling to advance beyond a "LTS-1" version due to missing Go build-deps, it could be a while before we can even contemplate packaging v3.
I would also argue *for* vendoring the stuff that's not practical to package. We have a few special precedents in Debian for important packages that have bent the rules a little bit to ship vendored copies of source code (firefox and kubernetes, for example), and I think we could get away with shipping a couple javascript libraries like this.
If the Prometheus package gets a pass in that respect, it would surely make things a lot simpler, as we could stop de-blobbing the embedded assets, and basically not have to give any thought whatsoever to building the UI from scratch. I'm not sure how likely this is though.
You may have noticed that I recently added an install-ui.sh helper script to the prometheus package, to fetch the React web UI tarball from upstream, similar to the script that is bundled with prometheus-alertmanager. So you /can/ use the React web UI now, if you want.Yes, I've seen that! I have even tried it out, but it didn't work out so well for me, something which could perhaps be filed as a separate bug.
It only works with the sid / trixie package (>= 2.45.6+ds-2), since previous versions also had the backend Go code used by the React UI stripped out. You also need to explicitly request the "/graph" URL, since landing on the root "/" URL will redirect you to "/classic/graph". I will reinstate a link to the "new" UI in the classic UI, which upstream versions included whilst the two variants were still officially supported. Unless you have run the "install-ui.sh" script however, landing on the new UI URL will display an index.html explaining the situation (à la prometheus-alertmanager).
I will be honest and admit this is a request more than an offer, but I *might* get time to deal with this in the coming *year* (aka "2025", definitely not until January), so I wanted to see if there was at least *some* openness in dealing with it. Also, we're not alone with this: there's a bunch of people working on JavaScript stuff in Debian, and we could get some help there.
Yes, and it would be enormously appreciated if they could at least get the ball rolling in terms of what is needed to start building the React UI with the package. I have never done any JavaScript packaging in Debian, but if somebody suitably qualified lays the groundwork, I can probably maintain it in the long run.
So the question is: do we, as a golang team (and you, as an uploader for this package), want to do this? Or do we want to fundamentally object to even trying to fix this issue? Because this is essentially why i filed this issue: I don't expect anyone to just drop everything and do this. I want to see if people are okay with us trying to do this.
I have no objection to this, and it would be awesome if people can come together to make it happen. I don't have the time (or expertise) to do this single-handedly. It's been /years/ since I did any frontend development, back in the heyday of jQuery. I never got into npm / nodejs, and have not worked with React (or Typescript in general). So I would be totally outside of my comfort zone if I attempted this.
I will at least paste this list of dependencies [1], with what I _think_ are the Debian packages alongside in square brackets.
"dependencies": { "@codemirror/autocomplete": "^6.17.0", [node-codemirror-autocomplete] "@codemirror/commands": "^6.6.0", [node-codemirror-commands] "@codemirror/language": "^6.10.2", [node-codemirror-language] "@codemirror/lint": "^6.8.1", [node-codemirror-lint] "@codemirror/search": "^6.5.6", [node-codemirror-search] "@codemirror/state": "^6.3.3", [node-codemirror-state] "@codemirror/view": "^6.29.1", [node-codemirror-view] "@forevolve/bootstrap-dark": "^4.0.2", [???]"@fortawesome/fontawesome-svg-core": "6.5.2", [node-fortawesome-fontawesome-svg-core] "@fortawesome/free-solid-svg-icons": "6.5.2", [node-fortawesome-free-solid-svg-icons]
"@fortawesome/react-fontawesome": "0.2.0", [???] "@lezer/common": "^1.2.1", [node-lezer-common] "@lezer/highlight": "^1.2.0", [???] "@lezer/lr": "^1.4.2", [???] "@nexucis/fuzzy": "^0.4.1", [???] "@nexucis/kvsearch": "^0.8.1", [???] "@prometheus-io/codemirror-promql": "0.55.0-rc.0", [???] "bootstrap": "^4.6.2", [libjs-bootstrap4] "css.escape": "^1.5.1", [???] "downshift": "^9.0.6", [???] "http-proxy-middleware": "^3.0.0", [???] "jquery": "^3.7.1", [libjs-jquery] "jquery.flot.tooltip": "^0.9.0", [???] "moment": "^2.30.1", [libjs-moment] "moment-timezone": "^0.5.45", [libjs-moment-timezone] "popper.js": "^1.14.3", [libjs-popper.js] "react": "^17.0.2", [node-react] "react-copy-to-clipboard": "^5.1.0", [???] "react-dom": "^17.0.2", [node-react-dom] "react-infinite-scroll-component": "^6.1.0", [???] "react-resize-detector": "^7.1.2", [???] "react-router-dom": "^5.3.4", [???] "react-test-renderer": "^17.0.2", [node-react-test-renderer] "reactstrap": "^8.10.1", [???] "sanitize-html": "^2.13.0", [node-sanitize-html] "sass": "1.77.6", [node-node-sass] "tempusdominus-bootstrap-4": "^5.39.2", [???] "tempusdominus-core": "^5.19.3" [???] },It definitely looks better than it did a couple of years ago when I looked into this, but there are still a fair number of "[???]" occurrences, where I was not able to find any packages that resemble what is being referred to.
[1]: https://github.com/prometheus/prometheus/blob/main/web/ui/react-app/package.json
OpenPGP_signature.asc
Description: OpenPGP digital signature