Skip to content

fmt: bump up version + related changes#58990

Merged
Matan-B merged 11 commits intoceph:mainfrom
Matan-B:wip-matanb-fmt-draft
Aug 22, 2024
Merged

fmt: bump up version + related changes#58990
Matan-B merged 11 commits intoceph:mainfrom
Matan-B:wip-matanb-fmt-draft

Conversation

@Matan-B
Copy link
Contributor

@Matan-B Matan-B commented Aug 1, 2024

For now I commented out all the problematic fmt usages that caused FTBFS on fmt 11.
This version compiles and we should fix the comments gradually.

I have separated commits into components:

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@Matan-B Matan-B changed the title fmt 11 adjustments [WIP] fmt 11 adjustments Aug 1, 2024
@Matan-B Matan-B requested review from Svelar and ronen-fr August 1, 2024 13:32
@Matan-B Matan-B mentioned this pull request Aug 1, 2024
14 tasks
@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 1, 2024

jenkins test make check

1 similar comment
@Svelar
Copy link
Member

Svelar commented Aug 2, 2024

jenkins test make check

@Matan-B Matan-B force-pushed the wip-matanb-fmt-draft branch from 46f0381 to 977c2a8 Compare August 6, 2024 09:43
@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 6, 2024

@ronen-fr, I've pulled https://github.com/ronen-fr/ceph/commits/wip-rf-matan-fmt/. Thank you!

@Matan-B Matan-B force-pushed the wip-matanb-fmt-draft branch 4 times, most recently from 174b9af to 9f681d6 Compare August 6, 2024 15:51
@Matan-B Matan-B changed the title [WIP] fmt 11 adjustments fmt: bump up version + related changes Aug 6, 2024
@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 6, 2024

@ronen-fr, I think we should try to merge this in a single PR (instead of #58960). What do you think?
Can I cherry-pick latest #59012 as well?

@Matan-B Matan-B marked this pull request as ready for review August 6, 2024 15:58
@Matan-B Matan-B requested review from a team as code owners August 6, 2024 15:58
@Matan-B Matan-B force-pushed the wip-matanb-fmt-draft branch from 9f681d6 to 2ecec8e Compare August 6, 2024 16:00
@ronen-fr
Copy link
Contributor

ronen-fr commented Aug 6, 2024

@ronen-fr, I think we should try to merge this in a single PR (instead of #58960). What do you think?
Can I cherry-pick latest #59012 as well?

No problem with cherry-picking 59012, but I think there is a good reason to have it run in parallel as a dedicated PR, so that we can run it thru (among others) some upgrade tests. BTW - I am already running some Teu tests for it (https://pulpito.ceph.com/?branch=wip-rf-hex-snapid)

@ronen-fr
Copy link
Contributor

ronen-fr commented Aug 6, 2024

a single PR (instead of #58960).

merging with 58960 is a very good idea

@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 7, 2024

jenkins test make check

@github-actions github-actions bot added the tests label Aug 7, 2024
@Matan-B Matan-B force-pushed the wip-matanb-fmt-draft branch from c88fc05 to 40acc1a Compare August 8, 2024 11:15
@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 13, 2024

fb56eaec6348d2e7b26d35a642df19812e0ee334 debuginfo(build-id) = ff40a944543d0a9f33231f5e439da948d4904786
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Recommends: ceph-debugsource(x86-64) = 2:19.0.0-5307.g40acc1af.el9
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos9/DIST/centos9/MACHINE_SIZE/gigantic/release/19.0.0-5307-g40acc1af/rpm/el9/BUILDROOT/ceph-19.0.0-5307.g40acc1af.el9.x86_64
error: Installed (but unpackaged) file(s) found:
   /usr/include/fmt/args.h
   /usr/include/fmt/base.h
   /usr/include/fmt/chrono.h
   /usr/include/fmt/color.h
   /usr/include/fmt/compile.h
   /usr/include/fmt/core.h
   /usr/include/fmt/format-inl.h
   /usr/include/fmt/format.h
   /usr/include/fmt/os.h
   /usr/include/fmt/ostream.h
   /usr/include/fmt/printf.h
   /usr/include/fmt/ranges.h
   /usr/include/fmt/std.h
   /usr/include/fmt/xchar.h
   /usr/lib64/cmake/fmt/fmt-config-version.cmake
   /usr/lib64/cmake/fmt/fmt-config.cmake
   /usr/lib64/cmake/fmt/fmt-targets-debug.cmake
   /usr/lib64/cmake/fmt/fmt-targets.cmake
   /usr/lib64/libfmtd.a
   /usr/lib64/pkgconfig/fmt.pc


RPM build errors:
    extra tokens at the end of %else directive in line 118:  %else # not fedora/rhel

    extra tokens at the end of %else directive in line 121:  %else # not x86_64

    line 1173: It's not recommended to have unversioned Obsoletes: Obsoletes:	ceph-libcephfs
    Signature not supported. Hash algorithm SHA1 not available.
    Signature not supported. Hash algorithm SHA1 not available.
    Ignoring invalid regex ^%{_scl_prefix}/.*|%{_root_sysconfdir}/rpm/macros.gcc-toolset-12-config$
    Ignoring invalid regex ^%{_root_sysconfdir}/rpm/macros.gcc-toolset-12-config$

@Matan-B Matan-B requested a review from cbodley August 14, 2024 09:30
@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 14, 2024

@cbodley, Centos builds are failing to create package due to unpackaged files. I'm not sure why as the current fmt we use include them as well:
https://github.com/ceph/fmt/tree/a33701196adfad74917046096bf5a2aa0ab0bb50/include/fmt
Do you perhaps know what's missing? Thanks!

Relevant pieces:
CMakeLists:

option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF)
option(WITH_SYSTEM_FMT "build against system fmt" OFF)
if(WITH_SYSTEM_FMT)
  find_package(fmt 8.1.1...<10.0.0 REQUIRED)
endif()
if (WITH_FMT_HEADER_ONLY)
  message(STATUS "Using fmt header-only.")
  set(FMT_LIB fmt::fmt-header-only)
else()
  message(STATUS "Linking to fmt library.")
  set(FMT_LIB fmt::fmt)
endif()
if(fmt_FOUND)
  message(STATUS "Building with system fmt.")
else()
  message(STATUS "Building fmt as submodule")
  set(old_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
  set(BUILD_SHARED_LIBS FALSE)
  add_subdirectory(fmt)
  set(BUILD_SHARED_LIBS ${old_BUILD_SHARED_LIBS})
  unset(old_BUILD_SHARED_LIBS)
  include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/fmt/include")
endif()

-- Using fmt header-only.
-- Building fmt as submodule
-- {fmt} version: 11.0.2

Note: rebasing

@Matan-B Matan-B requested a review from tchaikov August 14, 2024 09:44
Matan-B and others added 10 commits August 14, 2024 09:56
Move fmt submodule branch to
https://github.com/ceph/fmt/commits/wip-fmt-11.0.2/

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Adding missing 'const', and placing in the fmt namespace.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Update seastar submodule to:
https://github.com/ceph/seastar/commits/wip-seastar-fmt-11-fixes/

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
i.e. - without the optional text representation of NOSNAP & SNAPDIR

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 547b67f)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
```
RPM build errors:
    extra tokens at the end of %else directive in line 118:  %else # not fedora/rhel

    extra tokens at the end of %else directive in line 121:  %else # not x86_64
```

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
@cbodley
Copy link
Contributor

cbodley commented Aug 14, 2024

@Matan-B i guess this is the relevant change from the diff in ceph/fmt@a337011...0c9fce2

-option(FMT_INSTALL "Generate the install target." ${FMT_MASTER_PROJECT})
+option(FMT_INSTALL "Generate the install target." ON)

we can either disable that option in src/CMakeLists.txt with:

+  set(FMT_INSTALL OFF)
   add_subdirectory(fmt)

or this should also work:

-  add_subdirectory(fmt)
+  add_subdirectory(fmt EXCLUDE_FROM_ALL)

@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 14, 2024

@Matan-B i guess this is the relevant change from the diff in ceph/fmt@a337011...0c9fce2

Missed that diff. Thank you!

See: fmtlib/fmt#3264

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 15, 2024

jenkins test make check

@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 15, 2024

jenkins test api

@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 19, 2024

@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 20, 2024

@Matan-B
Copy link
Contributor Author

Matan-B commented Aug 22, 2024

Testing look sane, beside infra/tracked failures. @rzarzynski, can I merge this one?

Copy link
Contributor

@rzarzynski rzarzynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one single nit.

@rzarzynski
Copy link
Contributor

Let's merge!

@Matan-B Matan-B merged commit f88d0c9 into ceph:main Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants