Commit graph

374 commits

Author SHA1 Message Date
824cb2d30d Add conffiles erroneosly omitted previously
It should have been part of 949dbab501.
2022-06-24 12:13:25 +02:00
bc692c46c6 Update builder-web.opam
- We no longer directly depend on modulectomy and opam-graph
- We expect ocaml-solo5-elftool >= 0.3.0 that doesn't raise exceptions
  (inshallah)
2022-06-23 12:24:04 +02:00
949dbab501 Package visualization & repo scripts (#123)
The repo scripts are installed in 'share' as examples.

Reviewed-on: https://git.robur.io/robur/builder-web/pulls/123
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
2022-06-23 09:51:55 +00:00
932b0c963e create_package.sh: quote variables 2022-06-22 12:37:57 +02:00
bac3b3c64b debian: put binaries in sbin, libexec
builder-db and builder-migrations require privileges, and builder-web is
expected to be run from systemd.
2022-06-22 12:31:13 +02:00
66a9d293e6 visualizations.sh: refactoring and error handling
- Specify the sqlite3 query as a command line argument
- Fail more often
2022-06-22 10:50:26 +02:00
0be38475b7 builder-web: Inform expected version on wrong ver. (#121)
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/121
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
2022-06-22 08:20:29 +00:00
071183ff6c Add GZip support when we generate a tar archive (#119)
Fixes #116.

Co-authored-by: Romain Calascibetta <romain.calascibetta@gmail.com>
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/119
Co-authored-by: dinosaure <romain.calascibetta@gmail.com>
Co-committed-by: dinosaure <romain.calascibetta@gmail.com>
2022-06-21 15:17:50 +00:00
rand
5307a7b91a add builder-db verify-cache-dir command (#113)
Co-authored-by: rand00 <oth.rand@gmail.com>
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/113
Co-authored-by: rand <rand@r7p5.earth>
Co-committed-by: rand <rand@r7p5.earth>
2022-06-16 09:03:05 +00:00
09a180c3cd Automatic viz migration on builder-web startup (#111)
Co-authored-by: rand00 <oth.rand@gmail.com>
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/111
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
2022-06-08 10:18:46 +00:00
88c91c0856 Merge pull request 'fix version numbering for FreeBSD repository, see #114' (#115) from fix-version into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/115
2022-05-31 08:39:07 +00:00
73fbb59377 ensure version string is what we expect 2022-05-31 10:38:11 +02:00
27b40c63a1 fix version numbering for FreeBSD repository, see #114
To allow mixing of tags with git revisions, append a dummy ".0.g0000000" to
FreeBSD packages that originate from a tag.
2022-05-31 10:38:11 +02:00
15baa605a0 packaging: sha256 is encoded as hex, not base64 2022-05-19 15:12:41 +02:00
9f5cc4d156 Merge pull request 'Migration changing uuids from byte to hex format in db' (#106) from 20220509_migrating_uuids_to_hex_format_in_db into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/106
2022-05-17 13:06:31 +00:00
397eb29d81 Update database version 2022-05-17 12:24:24 +02:00
da2aa77b53 M20220509 changes
* Do not depend on the uuid representation in Builder_db.Rep; instead
  copy the custom caqti type so the migration doesn't break if
  Builder_db.Rep changes
* We don't need to recreate any indices since we don't change the
  schema: The uuid column was erroneously VARCHAR(36) before as well(!)
2022-05-17 12:14:39 +02:00
bfc4e5e64f Update m20220509 to new caqti syntax 2022-05-16 15:57:58 +02:00
rand00
bca4c80127 Creating index for uuid after migration, and dropping on rollback 2022-05-16 15:43:58 +02:00
rand00
a45b373019 Migration changing uuids from byte to hex format in db 2022-05-16 15:43:58 +02:00
9c3a4002af opam: requires dream 1.0.0~alpha4 now 2022-05-16 12:57:41 +02:00
a85be8730c Merge pull request 'Update to caqti 1.8.0 and dream 1.0.0~alpha4' (#103) from caqti-dream-update into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/103
2022-05-12 15:06:38 +00:00
702d38a6cc Use Not found for missing visualizations 2022-04-22 12:41:55 +01:00
3de78b1113 Update to dream.1.0.0~alpha4
- Dream.path is deprecated. For now the deprecation is suppressed.

- Remove unused dream_svg.

- Remove datadir global. The datadir variable is in scope already, and
  global variables were removed in alpha3.

- Dream_tar.tar_response: flush before closing. It's unclear if this is
  necessary.

- Change Builder_web.add_routes to Builder_web.routes returning a list
  of routes, and in Builder_web_app construct the router.

- Builder_web.not_found is removed due to changes in Dream.router. It
  seems an error handler might be the way forward.
2022-04-22 12:37:01 +01:00
6e75a653bc Update to caqti 1.8.0 2022-04-22 12:20:43 +01:00
c72ff72e0d Merge pull request 'use ignorelist to transmit the intention' (#105) from minor-wording into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/105
2022-04-22 11:20:01 +00:00
6190347401 use ignorelist to transmit the intention 2022-04-21 20:55:19 +02:00
rand
0f493e9b47 Removing trailing slashes (#80)
This PR solves the issue of there being both "<url>/" and "<url>" paths, that in the builder-web context shouldn't mean different things.

The slashes are now removed using a `Dream` middleware, and the request is redirected using a permanent redirect (that doesn't change the method used): https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location

Notable changes:
* Trailing slashes from the hardcoded link urls were removed, as unneccesary redirects are then avoided.
* All links in `Views` were rewritten to be absolute instead of relative.
* As `Dream` deprecated `path` - `Utils.Path` was created containing some helpers for manipulating paths. *Note that `String.split_on_char` has a different semantics.*
* A blacklist `routeprefix_blacklist_when_removing_trailing_slash` was added, containing `Dream` route-prefixes to ignore.
* Only `GET` and `HEAD` requests are redirected.
* `redirect_parent` helper was rewritten using new `Utils.Path` functions to avoid brittle string manipulation + fixed the edgecase of redirecting to `/`.
* Added `Uri` dependency to make URL manipulation safer.

Co-authored-by: rand00 <oth.rand@gmail.com>
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/80
Co-authored-by: rand <rand@r7p5.earth>
Co-committed-by: rand <rand@r7p5.earth>
2022-04-21 10:40:21 +00:00
e5a2b6fc0e Merge pull request 'Redirect /job to / and /job/:job/build to /job/:job' (#104) from redirect-job-and-build into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/104
2022-04-11 16:23:38 +00:00
rand00
010197d900 Builder_web: Fixed type-errors + usage of correct dream queries helper 2022-04-11 18:19:54 +02:00
rand00
8f173295ab Merge branch 'main' into redirect-job-and-build 2022-04-11 18:13:12 +02:00
rand00
6a1c8b0ecd Builder_web_app: Fixed type-error + some 80-column fixes 2022-04-11 18:12:23 +02:00
a132a181c8 add ? before query parameters 2022-04-11 17:08:10 +02:00
3bee8a357d add query params to redirect 2022-04-11 16:54:28 +02:00
rand
2e601ac181 Merge pull request 'builder-web: Added --cachedir CLI param for staging new vizs' (#102) from 20220329_passing_separate_cache-dir into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/102
2022-04-11 14:43:03 +00:00
1adc67c297 minor nits 2022-04-11 16:26:58 +02:00
4c3a5986d6 Redirect /job to / and /job/:job/build to /job/:job
replaces #81
2022-04-11 16:23:45 +02:00
rand00
68849fecf3 Fixed that cachedir should default to being relative to given datadir 2022-04-06 13:47:07 +02:00
rand00
1207ddbf70 Merge branch 'main' into 20220329_passing_separate_cache-dir 2022-04-06 13:31:42 +02:00
rand
08620589f0 Merge pull request 'Added usage-descriptions on mouse-over on '?' below each visualzation (not mobile compatible)' (#101) from 20220325_viz_descriptions into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/101
2022-03-30 10:28:17 +00:00
rand
258ffbd979 Merge branch 'main' into 20220325_viz_descriptions 2022-03-30 10:26:00 +00:00
rand
7b08045114 Merge pull request 'Updates related to new opam-graph nodes-sharing-color' (#100) from 20220317_opam-graph_updates into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/100
2022-03-30 10:24:58 +00:00
rand
c82e94805e Merge pull request 'packaging/visualizations.sh: Made compatible with Linux too' (#99) from 20220321_fixed_visualizations.sh_for_Linux into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/99
2022-03-30 10:24:34 +00:00
rand00
ab3be6ec8e builder-web: Added --cachedir CLI arg for staging new vizs 2022-03-29 22:27:24 +02:00
rand00
1827320f8c Builder_web: Removed boilerplate for generating vizs 2022-03-29 14:00:13 +02:00
rand00
ef253b7b87 Views: Added usage-descriptions on mouse-over on '?' below each visualzation (not mobile compatible) 2022-03-29 12:56:11 +02:00
rand00
edcfa1c8ce Merged with visualizations.sh fixes 2022-03-23 20:55:38 +01:00
rand00
9a8f902d3c packaging/visualizations.sh: Failing when unsupported platform 2022-03-23 20:54:35 +01:00
rand00
46f661ddd6 packaging/visualizations.sh: Changed todo-comments 2022-03-23 20:46:41 +01:00
rand00
d90cbea35c Views: Removed visual border from viz iframes + size fix 2022-03-23 20:38:22 +01:00