1
0
Fork 0
Commit Graph

20 Commits (63ce423ebbd7afd4575fb02677e5e81c681b037d)

Author SHA1 Message Date
q3k 94d96497b5 hswaw/site: implement recurring events
Change-Id: Ib3c570d058141c4d8441801010f0f1755ccfc0e7
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1624
Reviewed-by: radex <radex@hackerspace.pl>
2023-09-22 22:50:39 +00:00
q3k 97b5cd7b58 go: re-do the entire thing
This is a mega-change, but attempting to split this up further is
probably not worth the effort.

Summary:

1. Bump up bazel, rules_go, and others.
2. Switch to new go target naming (bye bye go_default_library)
3. Move go deps to go.mod/go.sum, use make gazelle generate from that
4. Bump up Python deps a bit

And also whatever was required to actually get things to work - loads of
small useless changes.

Tested to work on NixOS and Ubuntu 20.04:

   $ bazel build //...
   $ bazel test //...

Change-Id: I8364bdaa1406b9ae4d0385a6b607f3e7989f98a9
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1583
Reviewed-by: q3k <q3k@hackerspace.pl>
2023-09-22 21:50:19 +00:00
q3k 8100a2de97 third_party: replace jq with gojq
Building jq portably is annoying, and the way we were doing it (which we
iirc stole from some google project?) sucked. Let's use a Go jq clone
instead.

This is an alternative for 1535. jq is currently used only in one
script, which could really be replaced by a Go program, but let's keep
it simple for now.

Change-Id: Ie25dffadd545df143490f510e9b75a74adf81492
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1540
Reviewed-by: palid <palid@hackerspace.pl>
2023-07-24 14:47:54 +00:00
patryk 28742b8106 Make golang deps fetching go faster
This commit aims to increase the speed of hscloud rebuild process
by optimizing the behavior of Go dependency fetching routines.

Gazelle v0.25.0 introduced a new dependency resolution mode
where it does not reach out for external dependencies; instead,
it operates solely on what is contained inside the workspace.

Because static dependency resolution mode is now the default
behavior in go_repository() rules, we are also updating the
contents of //third_party/go/repositories.bzl.

Also, I changed some of the bigger Go dependencies to be downloaded
by a tarball fetch in order to speed up the rebuild process.

Other changes:
  * Bump nixpkgs to a fresh snapshot
  * Upgrade to Bazel v5

Change-Id: Icfe752411b3128bcd5b25fa28bb76bec45ae2f71
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1441
Reviewed-by: q3k <q3k@hackerspace.pl>
2022-11-27 16:27:53 +00:00
q3k 3e2a5a5957 third_party/go: add filippo.io/age
You can test this using:

   bazel run '@io_filippo_age//cmd/age'

The same target can now be used in data dependencies for secretstore
(you'll need to hardcode the runfile path, or use some
Bazel-runfile-resolving library for Python).

This required adding a few dependencies to
third_party/go/repositories.bzl, but also moving golang.org/x/crypto
from that file into WORKSPACE, before gazelle_deps gets loaded (as the
version requested by gazelle_deps is too old). We also moved shlex that
shouldn't have been in WORKSPACE into third_party/go/repositories.bzl.

Otherwise, this was just a few small deps - bumped golang.org/x/crypto,
new golang.org/x/term, new filippo.io/edwards25519. Hooray low
dependency code.

Change-Id: I0e684d88efffde13a3b4e253860aabcb35a3c94d
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1158
Reviewed-by: patryk <patryk@hackerspace.pl>
2021-10-07 20:18:25 +00:00
q3k d01f9e5fa2 WORKSPACE,third_party/go: reformat
Change-Id: If263013bd9a544696ee2530688f7f7d4ded49a92
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1159
Reviewed-by: patryk <patryk@hackerspace.pl>
2021-10-07 20:17:12 +00:00
q3k c429b5385a third_party/go: bump go-netbox
Change-Id: If88259dc10529b45d108c61f1ebfa097844b5bc6
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1154
Reviewed-by: q3k <q3k@hackerspace.pl>
2021-10-07 18:50:27 +00:00
q3k c35d52b19e *: update build_naming_convention for new rules_go
Change-Id: Ib1604a46d24969ae0110985cda156d31b7cc27aa
2021-08-30 18:21:03 +00:00
q3k cd5533e02d third_party/go: fix vbom.ml dependency
Looks like .ml DNS servers are currently down, and this repository
import path is deprecated anyway. Really, we should bump Kubernetes...

Change-Id: I3e0c834a49ccf1111b9412371489bae5f80ff6ab
2021-08-11 16:50:30 +00:00
q3k 8ef457feee hswaw/site: add calendar/event library
This will let us populate upcoming events server-side on the website (or
serve this data in a format that can be more easily consumed by JS).

Change-Id: I0f6b5bf9831f4d07acebb4eb77a7d88b63fe8e46
2021-07-11 17:17:33 +00:00
q3k 50e987cb68 third_party/go: move some repositories from WORKSPACE
Change-Id: Icc23c741512d148c9b3dfb19c52b205d4c0150bd
2021-07-11 17:17:33 +00:00
q3k 87801be432 third_party/go: add minio client lib
This adds github.com/minio/minio-go, a library that can be used to
access S3-like storage, eg. our own radosgw. It's significantly lighter
than the entire Go AWS SDK, and seems to also be more idiomatic than it.

Change-Id: I1e18c7665b58480fb72e789692aa7f37816cd28f
2021-03-20 12:05:34 +00:00
q3k 301435f3c3 third_party/go: pay off some technical debt and hide the bodies
This is an amalgamation of a handful of small changes to Go deps.
Notably:

 - we remove our opencensus-proto fork, use upstream, use exclude=src to
   fix the build
 - unvendorify some deps
 - bump io_rules_go to fix WKT resolution

Notably, we now do not have the 'protoc-gen-go' error when running
kubecfg/kubectl anymore.

Change-Id: I34fb9e78b2b12e4543142183d601d01987076f32
2020-11-03 21:15:41 +01:00
q3k e23717d520 third_party/go/kubernetes: fix version reported in kubectl
Change-Id: I5a45158004280c8ce6ba04c18af93e8dbbc300e4
2020-11-03 21:15:41 +01:00
q3k c3f36e9bf1 third_party/go: bump kubernetes to 1.19.3
Change-Id: Id9245765936997088e94135fde409ff4c1539bba
2020-11-03 21:15:41 +01:00
q3k 79b506bcc2 third_party/go: unbreak build
This was missed in gerrit/486. Whoops, we should CI sooner than later.

Change-Id: Ic70b742c75d52dd615d4e2f946233783d156cead
2020-10-24 17:36:25 +02:00
q3k b4c3f342e4 third_party/go: add gostatic
To test:

    bazel run '@com_github_piranha_gostatic//:gostatic'

Change-Id: Ie846429df0d1f1914f2734735591edebd5d29094
2020-10-24 17:30:44 +02:00
q3k 0c3b9a570e WORKSPACE: cleanup
This removes some old skylib/zlib deps, moves all Go repositories to a
separate file, and in general does a small cleanup pass on external
repository magic.

Change-Id: Ic9700ee4c40cdb2e5a68e4fc7c6b3e386a109f8a
2020-06-25 19:54:25 +02:00
q3k 9d738cedc3 k8s.io/apimachinery: bypass https://github.com/kubernetes/kubernetes/issues/87675
For us this manifests when doing

   kubecfg update cluster/kube/cluster.libsonnet

To be precise: when hitting the Ceph/Rook CRD definition.

This is a weird bug. I've seen it manifest earlier on NixOS, but I am
now also seeing it on Gentoo. I've thought that it was because of Go API
breakage, but I've quickly tried to specify older toolchain versions,
but that didn't seem to help? :/

Regardless, I've applied a patch by rnb [1] that seems to fix this. I
also have a suspicion that updating to a newer k8s version might just
fix this, that's why I'm not not too concerned about this for now.

[1] - a32521024f

Change-Id: Id66e3c0bd56e84d785e1baeca86373aa2d0eb6f9
2020-02-21 12:54:05 +01:00
q3k e5a956a1c8 *: bump to q3k's kubecfg, kubernetes 1.16
Change-Id: I302876d5a45cbfb63d87ad9f6ea9aaeff7bec17d
2019-11-17 22:38:40 +01:00