server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-30831 fixing, aws_key_management can compile with new aws sdk on UBUNTU 22.04, 24.04

Open csenki opened this issue 8 months ago • 2 comments

  • [x] *The Jira issue number for this PR is: MDEV-30831

Description

MDEV-30831 fixing, aws_key_management plugin can compile with new aws sdk on UBUNTU 24.04 and 22.04 Its fix working with mariadb-10.11.

Release Notes

Little changes, only change 2 CMakeLists.txt and some include added to aws_key_management_plugin.cc

How can this PR be tested?

I tested build process. cmake ../mariadb-serever -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=1 -DNOT_FOR_DISTRIBUTION=1 cd plugin/aws_key_management make I tested the plugin: Install plugin alter table .... ENGINE=INNODB encrypted=yes; alter table .... ENGINE=INNODB encrypted=no; I tested mariadb start and stop.

Basing the PR against the correct MariaDB version

  • [ ] This is a new feature or a refactoring, and the PR is based against the main branch.
  • [X] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • [ ] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

csenki avatar Apr 28 '25 05:04 csenki

Thanks for updating the submission based on feedback!

As your new commit 0d6beef modifies your own previous commit, it might be better to just amend the first commit instead of adding a new one. The end result of this PR should most likely be just one commit that fixes the build issue.

ottok avatar May 01 '25 17:05 ottok

if everything went well in f8e908d is complete (sorry but I'm not a git guru)

csenki avatar May 05 '25 10:05 csenki

Hi @csenki,

Thank you for taking the time to put together this commit — I appreciate the effort and research you put into it.

That said, I'm considering closing this PR without merging in its current form. While it addresses an issue on Linux(where the original bug was reported), this plugin has been cross-platform in the beginning, unfortunately it broke since as stopped build it on CI . Fix limited to Ubuntu, or to Linux, or to *nix with GNU linker, it isn’t sufficient.

My point, To move forward, we’d need a more robust solution that:

  • Works across platforms, with ExternalProject, but also works with package managers that include the AWS C++ SDK (I can think only of vcpkg now)

  • Avoids workarounds like the -Wl,start-group, which should be replaced with correctly specified link dependencies between AWS SDK libraries, declared as imported targets in CMake. Bulk of the logic (newly introduced intermediate SDK libraries) needs to be in aws_sdk.cmake

  • Is validated using CI, especially if you don’t have access to a Windows or macOS machine locally. I understand that current Buildbot CI is not flexible to allow you to change, but one can temporarily manipulate CMake variables (e.g do not require NOT_FOR_DISTRIBUTION) to see this plugin built on variety of OS.

If you’re interested in addressing these points, I’m happy to keep the PR open while you revise it. Otherwise, I’m okay updating the code myself, as the changes aren’t too complex.

Let me know how you’d like to proceed.

vaintroub avatar Jun 05 '25 11:06 vaintroub

closing, because a comprehensive fix dd2982dc333c05c04dac0b3970a0176bd5f809b2 was pushed.

vaintroub avatar Jun 10 '25 14:06 vaintroub