Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.34.1 prep #1539

Merged
merged 14 commits into from
Jan 10, 2025
Merged

1.34.1 prep #1539

merged 14 commits into from
Jan 10, 2025

Conversation

ac000
Copy link
Member

@ac000 ac000 commented Jan 10, 2025

This is what I plan to merge to the 1.34 branch...

The following changes since commit 27bde184dedcbf687db2f314c60c037623318a8d:

  Add 1.34.0 CHANGES (2024-12-19 01:30:03 +0000)

are available in the Git repository at:

  git@github.com:ac000/unit.git 1.34.1-prep

for you to fetch changes up to ed6f67d14dc5d03c2b5d10d5bb6eb237f9c9b896:

  Add 1.34.1 CHANGES (2025-01-10 16:45:42 +0000)

----------------------------------------------------------------
Andrew Clayton (9):
      Version bump
      auto/otel: Make use of nxt_feature_name
      auto/make: s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/
      auto/make: Fix various issues with building OTEL
      tools/unitctl: Update for version 1.34.1
      docs/unit-openapi.yaml: Update version for 1.34.1
      pkg/docker: Update dockerfiles for 1.34.1
      docs/changes.xml: Add 1.34.1 changelog entries
      Add 1.34.1 CHANGES

Ava Hahn (2):
      otel: fix segfaults when otel not configured
      otel: remove deadcode

Konstantin Pavlov (2):
      auto/make, otel: fix linking on macOS and Ubuntu
      auto/otel: don't look for OpenSSL on Darwin

Remi Collet (1):
      auto/make: Add missing NXT_OTEL_LIB_STATIC to some C tests

 CHANGES                                 |  8 +++++++
 auto/make                               | 74 ++++++++++++++++++++++++++++++++++++-----------------------------
 auto/otel                               | 56 +++++++++++++++++++++++++++++--------------------
 docs/changes.xml                        | 45 +++++++++++++++++++++++++++++++++++++++
 docs/unit-openapi.yaml                  |  2 +-
 pkg/docker/Dockerfile.go1.22            |  4 ++--
 pkg/docker/Dockerfile.go1.23            |  4 ++--
 pkg/docker/Dockerfile.jsc11             |  4 ++--
 pkg/docker/Dockerfile.minimal           |  4 ++--
 pkg/docker/Dockerfile.node20            |  4 ++--
 pkg/docker/Dockerfile.node22            |  4 ++--
 pkg/docker/Dockerfile.perl5.38          |  4 ++--
 pkg/docker/Dockerfile.perl5.40          |  4 ++--
 pkg/docker/Dockerfile.php8.3            |  4 ++--
 pkg/docker/Dockerfile.php8.4            |  4 ++--
 pkg/docker/Dockerfile.python3.12        |  4 ++--
 pkg/docker/Dockerfile.python3.12-slim   |  4 ++--
 pkg/docker/Dockerfile.python3.13        |  4 ++--
 pkg/docker/Dockerfile.python3.13-slim   |  4 ++--
 pkg/docker/Dockerfile.ruby3.2           |  4 ++--
 pkg/docker/Dockerfile.ruby3.3           |  4 ++--
 pkg/docker/Dockerfile.wasm              |  4 ++--
 src/nxt_otel.c                          | 26 +++++++++--------------
 tools/unitctl/Cargo.lock                |  6 +++---
 tools/unitctl/openapi-config.json       |  2 +-
 tools/unitctl/unit-client-rs/Cargo.toml |  2 +-
 tools/unitctl/unit-openapi/Cargo.toml   |  2 +-
 tools/unitctl/unit-openapi/README.md    |  2 +-
 tools/unitctl/unitctl/Cargo.toml        |  2 +-
 version                                 |  4 ++--
 30 files changed, 182 insertions(+), 117 deletions(-)

ac000 and others added 14 commits January 10, 2025 16:33
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
This commit adds NULL checks for the request->otel object that
were missed in the Traceparent and Tracestate routines.

Closes: nginx#1523
Closes: nginx#1526
Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
Signed-off-by: Ava Hahn <a.hahn@f5.com>
The superfluous else condition in nxt_otel_propagate_header was dead code.
This commit removes it.

Signed-off-by: Ava Hahn <a.hahn@f5.com>
When building with --otel on macOS for example I was seeing compile
failures with the cpu_set_t stuff which should only be used under Linux.

It turned out that despite

  checking for Linux sched_getaffinity() ... not found

we were getting

  #ifndef NXT_HAVE_LINUX_SCHED_GETAFFINITY
  #define NXT_HAVE_LINUX_SCHED_GETAFFINITY  1
  #endif

in build/include/nxt_auto_config.h

It seems this was due to the

    . auto/feature

in auto/otel, this check happens right after the above. Without having

    nxt_feature_name=NXT_HAVE_OTEL

set.

Instead we were adding the define for that manually.

Doing auto/feature without having a nxt_feature_name must have used the
last set one and enabled it.

Set nxt_feature_name and remove the manual editing of nxt_auto_config.h

Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
This better matches existing naming convention, e.g NXT_LIB_STATIC

Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
The static library is supposed to be specified prior to its
dependencies.
Also, no need to put an otel static library inside libnxt static
library, as we explicitely link unit binary with otel static library
anyway.

This fixes the following build problems:

- macOS:

      Finished `release` profile [optimized] target(s) in 58.07s
    AR     build/lib/libnxt.a
    LD     build/sbin/unitd
  ld: archive member 'libotel.a' not a mach-o file in '/private/tmp/unit-20241219-8965-yb46xp/build/lib/libnxt.a'
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

- Ubuntu 22 (./configure --otel):

  LD     build/sbin/unitd
cc -Wl,-E  -o build/sbin/unitd -pipe -fPIC -fvisibility=hidden -fno-strict-overflow -funsigned-char -std=gnu11 -O -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -fno-strict-aliasing -Wmissing-prototypes -Werror -g    \
	build/src/nxt_main.o  build/lib/libnxt.a \
	-lm -lrt  -lpthread   \
                      \
                    -lpcre2-8 -lssl -lcrypto src/otel/target/release/libotel.a
/usr/bin/ld: src/otel/target/release/libotel.a(reqwest-97d1376dfb77d784.reqwest.cb371ce8e1e3945e-cgu.04.rcgu.o): in function `core::ptr::drop_in_place<alloc::vec::Vec<reqwest::tls::Certificate>>':
reqwest.cb371ce8e1e3945e-cgu.04:(.text._ZN4core3ptr69drop_in_place$LT$alloc..vec..Vec$LT$reqwest..tls..Certificate$GT$$GT$17h9b62679cc7161be5E+0x30): undefined reference to `X509_free'

Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
[ Commit subject, s/NXT_OTEL_LIB_LOC/NXT_OTEL_LIB_STATIC/ and placement
  of NXT_OTEL_LIB_STATIC tweaked as per @thresheek - Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Rust code relies on macOS-provided frameworks for TLS.

Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
[ Tweaked subject prefix. Some minor tweaks for current changes. -
  Andrew ]
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
There were at least a couple of issues with building OTEL support.

It only worked with GNU make due to the use of ifeq, even gmake had some
issues.

Debug builds were broken due to trying to pass --debug to cargo which is
the default and isn't a valid option.

This 'fixes' things by doing 'release' builds of OTEL by default.

Passing D=1 to make will generate 'debug' builds but this as previously
with D= etc, only works with GNU make.

We make use of the '--emit link=' rustc option to place the libotel.a
static library into build/lib

This is good, it consolidates the static libraries into one place and it
simplifies the build scripts.

While we're at it pretty print the cargo command by default.

Fixes: 9d3dcb8 ("otel: add build tooling to include otel code")
Link: <nginx#1520 (comment)>
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: Andrew Clayton <a.clayton@nginx.com>
This is autogenerated from docs/changes.xml by

  $ make -C docs/ changes && mv build/CHANGES .

Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
@thresheek
Copy link
Member

Looks good to me.

@ac000 ac000 merged commit ed6f67d into nginx:1.34 Jan 10, 2025
27 checks passed
@ac000 ac000 deleted the 1.34.1-prep branch January 10, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants