Age | Commit message (Collapse) | Author | Files | Lines |
|
This is autogenerated from docs/changes.xml by
$ make -C docs/ changes && mv build/CHANGES .
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Ava Hahn <a.hahn@f5.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
CONTROL_SOCKET_ADDRESS is singular, adds note that the flag can be
specified multiple times, and adjusts code to print
CONTROL_SOCKET_ADDRESS as singular.
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
The correct capitalisation of the name of the software is Unit, not all
caps.
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
[ A bunch more s/UNIT/Unit/ - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
All new NGINX projects are created from the template repository which
has a SECURITY.md file in it. This adopts the file.
NOTE; We wrap the file around the 76-78 character mark for consistency
and readability.
Link: <https://github.com/nginxinc/template-repository>
Closes: https://github.com/nginx/unit/issues/1408
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
[ Tweaked commit message - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This comes after internal conversation with the NGINX security council.
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
|
|
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
|
|
Signed-off-by: Gabor Javorszky <g.javorszky@f5.com>
|
|
The two files under unit-openapi/.openapi-generator/, FILES and VERSIONS
are auto-generated.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
On some Python 3.11 systems, 3.11.9 & 3.11.10, we were seeing a crash
triggered by Py_Finalize() in nxt_python_atexit() when running one of
our pytests, namely
test/test_python_factory.py::test_python_factory_invalid_callable_value
2024/09/12 15:07:29 [alert] 5452#5452 factory "wsgi_invalid_callable" in module "wsgi" can not be called to fetch callable
Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
Python runtime state: finalizing (tstate=0x00007f560b88a718)
Current thread 0x00007f560bde7ad0 (most recent call first):
<no Python frame>
2024/09/12 15:07:29 [alert] 5451#5451 app process 5452 exited on signal 6 (core dumped)
This was due to
obj = PyDict_GetItemString(PyModule_GetDict(module), callable);
in nxt_python_set_target() which returns a *borrowed* reference, then
due to the test meaning this is a `None` object we `goto fail` and call
Py_DECREF(obj);
which then causes `Py_Finalize()` to blow up.
The simple fix is to just increment its reference count before the `goto
fail`.
Note: This problem only showed up under (the various versions of Python
we test on); 3.11.9 & 3.11.10. It doesn't show up under; 3.6, 3.7, 3.9,
3.10, 3.12
Cc: Konstantin Pavlov <thresh@nginx.com>
Closes: https://github.com/nginx/unit/issues/1413
Fixes: a9aa9e76d ("python: Support application factories")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
When the client closes the connection before the upstream,
the proxy's error handler was calling cleanup operation like
peer close and request close twice, this fix ensures the cleanup
is performed only once, improving proxy stability.
Closes: https://github.com/nginx/unit/issues/828
|
|
Suppress the output from cargo-component when we first run it to check
if it's available, otherwise you may see the following
$ pytest test/test_wasm-wasi-component.py
which: no go in (/home/andrew/.local/bin:/home/andrew/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
error: no such command: `component`
View all installed commands with `cargo --list`
Find a package to install `component` with `cargo search cargo-component
Note: This didn't stop the tests from working, just an aesthetic issue.
Closes: https://github.com/nginx/unit/issues/1410
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Don't try and run the tests that require njs if it isn't enabled.
Closes: https://github.com/nginx/unit/issues/1411
Fixes: 43c4bfdcd ("tests: "if" option in http route match")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This will catch changes to the likes of wasmtime and njs.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
With commit 9998918db ("Packages: bump wasmtime to 24.0.0 and
wasi-sysroot to 24.0.") the paths to the wasmtime C API include and lib
directories changed which broke the wasm ci tests.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Wasm module is now not built for Amazon Linux 2, Debian 11 and Ubuntu
2.0.04, since it requires cmake version newer than what's available on
those OSes. wasm-wasi-component is not affected.
|
|
- Adds `unitctl/` prefix to tags generated by manual workflow runs.
Previously, only release titles (but not tags) were prefixed.
- Omits superfluous `name` field; falls back to `tag` when absent.
- Removes unnecessary conditional from `prelease` field.
This results in the following tagging / releasing behavior:
1. Running manually creates a pre-release and tags it `unitctl/VERSION`
2. Pushing a tag formatted like `x.y.z` creates a normal release
Refines: 3501a50ffb93756e145295021ff9313ac77f1ba9
|
|
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
While the C based wasm language module inherits the process environment
the Rust based wasm-wasi-component language module did not.
One upshot of this is that with wasm-wasi-component you don't get access
to any environment variables specified in the Unit configuration.
wasm-wasi-component was based on wasmtime 17.0.0. This capability wasn't
added to the wasmtime-crate until version 20.0.0.
Now that wasm-wasi-component has been updated to a newer wasmtime-crate
we can enable this functionality.
Closes: https://github.com/nginx/unit/issues/1312
[ Commit message - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Signed-off-by: Ava Hahn <a.hahn@f5.com>
|
|
We now have tests for this module via commit cad6aed52 ("Tests: initial
"wasm-wasi-component" test").
We need to install cargo-component for this test target.
Also the only way I found I could get this test to run was by running as
non-root. The issue I was seeing was that despite cargo being installed
into /home/runner/.cargo/bin *and* that being in the path, it kept
claiming it couldn't find cargo. E.g.
$ sudo -E echo $PATH
Showed /home/runner/.cargo/bin in there.
$ sudo -E /home/runner/.cargo/bin/cargo -V
Worked.
$ sudo -E cargo -V
cargo command not found.
(Also other oddities, despite claiming to be using bash, it couldn't
find shell builtins like 'hash' and 'export', perhaps some Ubuntu
weirdness...)
However, no problem, there is *no* need for it run as root anyway so
result!
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Rename this to 'test_wasm-wasi-component.py' to match the language
module name and the name as used in the CI.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Changes are afoot... wasm32-wasi has been renamed wasm32-wasip1, there
is also a wasm32-wasip2 (seems not yet fully realised) and wasm32-wasi
is being kept clear for an eventual WASI 1.0 release.
cargo-component targets wasm32-wasip1 by default and adapts the module
to the preview2 version of WASI supported by the component model.
This means that the component is now found under
target/wasm32-wasip1/...
Link: <https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip1.html>
Link: <https://github.com/bytecodealliance/cargo-component/blob/main/README.md#wasi-support>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
We can now get list objects from the /status endpoint in the case of
having different versions of the same language module.
That led to this error
> return d1 - d2
E TypeError: unsupported operand type(s) for -: 'list' and 'list'
We already cover a similar case for when we have simple strings so add
this to that.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This directory is needed for contribs to function.
|
|
Probably not needed now...
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
This is no longer needed since GitHub is our primary repository now.
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
|
|
Closes: https://github.com/nginx/unit/issues/1352
|
|
|
|
|
|
This was found via ASan.
Given a listener address like ":" (or any address where the first
character is a colon) we can end up under-reading the addr->start
buffer here
if (nxt_slow_path(*(buf + length - 1) == '.')) {
due to length (essentially the position of the ":" in the string) being
0.
Seeing as any address that starts with a ":" is invalid Unit config
wise, we should simply reject the address if length == 0 in
nxt_sockaddr_inet_parse().
Link: <https://clang.llvm.org/docs/AddressSanitizer.html>
Signed-off-by: Arjun <pkillarjun@protonmail.com>
[ Commit message - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
False positive bug in harness due to improper use of the internal API.
Fixes: a93d878 ("fuzzing: add fuzzing targets")
Signed-off-by: Arjun <pkillarjun@protonmail.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
Add entries for the new 'backlog' and 'listen_threads' config options
introduced in commits 57c88fd40 ("router: Make the number of router
threads configurable") and 76489fb7e ("conf, router: Make the listen(2)
backlog configurable").
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
- Missing end quotes
- Wrong indentation
- Missing langMod parameter definition
- Wrong type specification
Fixes: ae4795aa1 ("docs/openapi: Add entries for the new /status/modules endpoint")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
|
|
unitctl makes use of 'docs/unit-openapi.yaml' so be sure to run these
checks if that file changes.
Fixes: 6d0880c99 ("Add unitctl build and release CI")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
|
|
|
|
This feature allows users to specify conditions to check if one
route is matched. It is used the same way as the "if" option in
the access log.
Example:
{
"match": {
"if": "`${headers['User-Agent'].split('/')[0] == 'curl'}`"
},
"action": {
"return": 204
}
}
|
|
|
|
This nxt_tstr_cond_t will be reused for the feature of adding "if"
option to the "match" object. The two "if" options have the same usage.
|
|
|
|
|
|
|
|
|
|
|