James Shubin
7331d3a7ee
util: pprof: Improve pprof for ease of use
...
This makes it slightly cleaner.
2025-01-31 00:00:05 -05:00
James Shubin
95f353c6a4
modules: virtualization: Add some simpler helpers
...
You don't need much to build a vm host. Here's the start.
2025-01-30 23:04:12 -05:00
James Shubin
5044ef4e8a
engine: resources: Add a virt builder password selector
...
This is very helpful for debugging, particularly with broken Debian
installs.
2025-01-30 22:56:24 -05:00
James Shubin
3c61d088ab
test: Make sure to test the docs
...
I can't believe I forgot to enable this earlier.
2025-01-29 12:18:55 -05:00
James Shubin
315a493565
lang: Add a few more tests
2025-01-26 19:48:17 -05:00
James Shubin
6268b61a7d
lang: core: Lookup function (with default) can be more precise
2025-01-26 19:12:13 -05:00
James Shubin
3f202c6a7a
lang: core: Fix struct lookup corner case
...
We forgot to reject this corner case which could lead to a runtime error
since the expected type from the incoming struct would not match what
we're handling.
2025-01-26 19:12:13 -05:00
James Shubin
d46c43df5a
lang: core: Let lookup function specialize earlier
...
If we happen to know some information, we can specialize early and help
type unification solve things.
2025-01-26 18:21:54 -05:00
James Shubin
1538befc93
lang: ast, parser: Allow calling anonymous functions
...
I forgot to plumb this in through the parser. Pretty easy to add,
hopefully I didn't forget any weird corner scope cases here.
2025-01-26 17:21:11 -05:00
James Shubin
1af334f2ce
misc: Update to golang 1.23
...
The 1.22 version has some issues that makes it more difficult to
workaround, so we'll move right away to 1.23
2025-01-26 17:17:02 -05:00
James Shubin
d30ea571f1
misc: Update to golang 1.22
...
Ran:
go get -u ./...
go mod tidy
We also got rid of travis and simplified things a bit.
2025-01-26 17:16:40 -05:00
James Shubin
d30ff6cfae
legal: Remove year
...
Instead of constantly making these updates, let's just remove the year
since things are stored in git anyways, and this is not an actual modern
legal risk anymore.
2025-01-26 16:24:51 -05:00
James Shubin
1d3f2dbe3c
util: Add a pprof helper package
...
As it turns out, there are other helper packages out there. I wrote this
before I realized that, and it didn't take me that long anyways.
2025-01-24 03:06:31 -05:00
James Shubin
ca6e7ad432
lang: types, lang: core: strings: Add a new join_nonempty function
...
Along with a helper function for when we need a []string from a Value.
2025-01-24 00:07:23 -05:00
James Shubin
f92afe9ae4
modules: meta: Add a router meta module
...
Useful for setting up simple routers. Some auto-provisioning polish
would definitely help, but this is pretty useful already.
2025-01-18 01:22:33 -05:00
James Shubin
483cc22c32
lang: core: embedded: provisioner: Add IPXE support
...
This lets you boot from ipxe. You can run the ipxe shell from their
stock image or the netboot.xyz one. For the latter, press "m", then type
"dhcp" (machine is now pingable!) then type "route" to check the ip.
To boot type:
chain http://192.168.42.1:4280/menu.ipxe
and you're off!
Thanks to frebib for finding the workaround to the VFS bug. The answer
is you need to run the imgfree command to unblock the initrd.
2025-01-18 01:07:19 -05:00
James Shubin
2f3bd72491
lang: core: embedded: provisioner: Fix regression in Fedora 41
...
Unfortunately with Fedora 41 and DNF5, this breaks what our host machine
expects. So you now need dnf5+ to make this work, or you can revert this
commit.
2025-01-18 01:02:17 -05:00
James Shubin
6499fcb1e0
modules: dhcp: Support the authoritative setting
...
Quite useful if we plumb it all the way through!
2025-01-18 00:30:46 -05:00
James Shubin
12a0600d38
engine: resources: Improve hostname change message
...
Make it clearer where empty strings are, and that it already happened.
2025-01-17 23:58:26 -05:00
James Shubin
cace2bacb8
lang: core: embedded: provisioner: Add support for module path
...
This is needed for bigger code bases. Remember: this is consulted at the
deploy stage, and the deploy contains the entire tree (including
modules) of everything it needs to run. This is why you don't need to
add a --module-path arg when running mgmt in systemd with the "empty"
frontend.
2025-01-17 23:54:30 -05:00
James Shubin
05d440114a
lang: core: embedded: provisioner: Remove stale comment
2025-01-17 23:49:21 -05:00
James Shubin
b392285e1d
gapi, lang: gapi: Make dir to avoid errors
...
It seems we sometimes need to make the intermediate dir.
2025-01-17 23:32:13 -05:00
James Shubin
a713c08585
engine: resources: Make net and firewalld resources quieter
...
They are too noisy!
2025-01-17 23:32:13 -05:00
James Shubin
8e8e831e73
modules: misc: Switch type to list of strings
...
The DNS entry should be a list of strings. We would have caught this
earlier but this helped us find a type unification issue.
2025-01-17 23:28:05 -05:00
James Shubin
86b95b2c0b
modules: shorewall: Fix type on stoppedrules file
2025-01-17 22:12:55 -05:00
James Shubin
4a578ca40c
lang: core: embedded: provisioner: Handoff a hostname
...
This makes it easier to run config tools if the hostname is already set.
2025-01-17 19:48:23 -05:00
James Shubin
a60148f370
lang: core: net: Add more ip utilities
2025-01-17 18:58:21 -05:00
James Shubin
00366de67b
modules: purpleidea: Update my personal packages
2025-01-17 18:57:18 -05:00
James Shubin
a08ba0b0e9
engine: resources: Tar now accepts dirs without a trailing slash
...
If these are found, then the dir path itself is copied in as well.
2025-01-17 18:15:45 -05:00
James Shubin
81b102ed7f
lang: ast: Allow multiple star imports
...
If more than one star import is present in the same scope, allow it. If
one star import could overwrite something, ordering is not guaranteed.
We allow this for now, but we might create a compiler fix to stop it.
This adds a test to notice both of these behaviours.
2025-01-17 14:03:48 -05:00
James Shubin
c8f911ec5d
lang: core: embedded: provisioner: Fix panic
...
The conditions changed for this one, make it stricter.
2025-01-17 12:35:30 -05:00
James Shubin
7694da4241
lang: core: embedded: provisioner: Skip bmc if empty
2025-01-17 12:34:27 -05:00
James Shubin
a0d500a602
lang: interfaces: Remove dangerous init method
...
This can cause the source to get overwritten and changed and is usually
unnecessary.
2025-01-04 20:56:11 -05:00
James Shubin
553172992f
lang: parser: Typo fix
2025-01-04 20:55:41 -05:00
James Shubin
e6d614f4dd
engine: resources: Add a bmc resource
...
This resource manages bmc devices in servers or elsewhere. This also
integrates with the provisioner code.
2025-01-03 18:19:31 -05:00
James Shubin
3107dfbd08
modules: shorewall: Small fixups to improve the module
...
These are some common fixes and improvements for normal shorewall usage.
As we shake out more uses of this, we find small issues. This lets us
have long rules, and a better default config.
2025-01-02 15:43:27 -05:00
James Shubin
802823dcb0
modules: misc: Support VIP's in network config
2025-01-02 15:42:40 -05:00
James Shubin
5858c8b501
pgraph: Panic if vertex is nil
...
These should be caught early.
2024-12-18 13:49:13 -05:00
James Shubin
2561dba8f5
lang: Increase debugging timeout
2024-12-15 10:39:46 -05:00
James Shubin
f5806e0617
lang: funcs: structs: Add Call and CallStruct methods for composite
...
It might turn out the CallStruct is the API we want. This will depend on
the future iterations of the function engine.
2024-12-08 17:43:41 -05:00
James Shubin
e9dbb7b86c
lang: funcs: structs: Add Call method for const
2024-12-08 16:48:04 -05:00
James Shubin
28f5b8331a
lang: funcs: structs: Improve naming
...
These could print nicer for debugging.
2024-12-08 16:24:42 -05:00
James Shubin
5ff4f0456a
lang: Add mode to overwrite tests
...
This is useful if we need to reformat a bunch of previously passing
tests.
2024-12-08 15:34:28 -05:00
James Shubin
82c614f2d9
engine: resources: Workaround broken debian package when building images
2024-12-06 15:59:39 -05:00
James Shubin
50265d2303
engine: resources: Pull out a distro function for guest
2024-12-06 15:58:51 -05:00
James Shubin
ecee84aa28
docs: New blog post about modules and imports
2024-12-03 03:00:21 -05:00
James Shubin
2e146e8c8e
engine: resources: Fix up some issues with cron
...
This really needs looking at again, since it's so old and buggy or
broken.
2024-12-03 01:52:23 -05:00
James Shubin
097efdd66a
engine: graph: autoedge: Clean up redundant logs
...
They repeat themselves, this is cleaner.
2024-12-03 00:56:22 -05:00
James Shubin
5764c977f1
modules: misc: Don't ignore the router setting
...
This mistake caused us to ignore the router setting when we wanted it!
Woops =D
2024-12-03 00:43:32 -05:00
James Shubin
4d30772b3b
lang: Add test for unused include statements
...
Even if they have no side effect, they aren't legal, since it would be
surprising if suddenly something new got added in one which then broke
the imports.
2024-11-28 19:17:33 -05:00