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

Add mysql connector cpp lib #16429

Closed
wants to merge 13 commits into from
Closed

Add mysql connector cpp lib #16429

wants to merge 13 commits into from

Conversation

ahmed192a
Copy link

@ahmed192a ahmed192a commented Mar 7, 2023

Specify library name and version: mysql-connector-cpp/8.0.27


@CLAassistant
Copy link

CLAassistant commented Mar 7, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 11 (d9152a3a33ab395789f8020590b45a06e84a934d):

  • mysql-connector-cpp/8.0.27@:
    Error running command conan export recipes/mysql-connector-cpp/all/conanfile.py mysql-connector-cpp/8.0.27@:
    [HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK
    [HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK
    [HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK
    [HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK
    [HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 3.107421875 KB
    [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: CMakeLists.txt
    [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK
    [HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK
    [HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK
    [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK
    [HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK
    [HOOK - conan-center.py] pre_export(): ERROR: [RECIPE METADATA (KB-H003)] Conanfile doesn't have 'homepage' attribute.  (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H003-RECIPE-METADATA) 
    [HOOK - conan-center.py] pre_export(): WARN: [FPIC OPTION (KB-H006)] This recipe does not include an 'fPIC' option. Make sure you are using the right casing
    [HOOK - conan-center.py] pre_export(): ERROR: [CONAN CENTER INDEX URL (KB-H027)] The attribute 'url' should point to: https://github.com/conan-io/conan-center-index (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H027-CONAN-CENTER-INDEX-URL) 
    [HOOK - conan-center.py] pre_export(): ERROR: [CONANDATA.YML FORMAT (KB-H030)] Exception raised from hook: string indices must be integers (type=TypeError) (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H030-CONANDATA.YML-FORMAT) 
    ERROR: [HOOK - conan-center.py] pre_export(): string indices must be integers
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline (informative, not required for merge) ❌

Note: Conan v2 builds are informative and they are not required for the PR to be merged.

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Failure in build 11 (d9152a3a33ab395789f8020590b45a06e84a934d):

  • mysql-connector-cpp/8.0.27@:
    CI failed to create some packages (All logs)

    Logs for packageID 18ff221a2c98c6b3f32b0c4723988757f9ef4507:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.cppstd=gnu17
    compiler.libcxx=libstdc++11
    compiler.version=11
    os=Linux
    [options]
    */*:shared=False
    
    [...]
    Requirements
        mysql-connector-cpp/8.0.27#8d384eee866c5fc72bc966796c7f2c42:18ff221a2c98c6b3f32b0c4723988757f9ef4507 - Build
        openssl/1.1.0l#401ce70f553c8ed60586a3b2967dfac3:aaa3cbf3729901a9315aba1078813f2c82c9de5d#b5888f86ebacd49c3fe51f4b4f736513 - Download (conan-center)
    
    ======== Installing packages ========
    
    -------- Downloading 1 package --------
    openssl/1.1.0l: Retrieving package aaa3cbf3729901a9315aba1078813f2c82c9de5d from remote 'conan-center' 
    Downloading conan_package.tgz
    Decompressing conan_package.tgz
    openssl/1.1.0l: Package installed aaa3cbf3729901a9315aba1078813f2c82c9de5d
    openssl/1.1.0l: Downloaded package revision b5888f86ebacd49c3fe51f4b4f736513
    WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.build_modules' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.build_modules' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X
    mysql-connector-cpp/8.0.27: Calling source() in mysql-connector-cpp
    mysql-connector-cpp/8.0.27: RUN: git clone https://github.com/mysql/mysql-connector-cpp.git
    Cloning into 'mysql-connector-cpp'...
    
    mysql-connector-cpp/8.0.27: RUN: cd mysql-connector-cpp && git checkout 8.0.27
    Note: switching to '8.0.27'.
    
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.
    
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:
    
      git switch -c <new-branch-name>
    
    Or undo this operation with:
    
      git switch -
    
    Turn off this advice by setting config variable advice.detachedHead to false
    
    HEAD is now at e84f6a55 Bug#33352469 UT
    
    
    -------- Building package mysql-connector-cpp/8.0.27 from source (2 of 2) --------
    mysql-connector-cpp/8.0.27: Package mysql-connector-cpp/8.0.27:18ff221a2c98c6b3f32b0c4723988757f9ef4507
    mysql-connector-cpp/8.0.27: Copying sources to build folder
    ERROR: [Errno 2] No such file or directory: '/home/conan/w/prod-v2/BuildSingleReference/p/mysql974d59674bfea/s'
    Error copying sources to build folder
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@stale
Copy link

stale bot commented Apr 11, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 11, 2023
Copy link
Contributor

@jcar87 jcar87 left a comment

Choose a reason for hiding this comment

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

Hi @ahmed192a - thank you so much for your contribution! It's a good one :)

I've added some review comments, however I would greatly encourage you to review the template we have for CMake libraries and draw from there: https://github.com/conan-io/conan-center-index/tree/master/docs/package_templates/cmake_package

Please let us know if you need further assistance!

@@ -0,0 +1,3 @@
sources:
"8.0.27":
"https://github.com/mysql/mysql-connector-cpp/archive/refs/tags/8.0.27.tar.gz"
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a sha256 with the expected checksum at the time of contributing


class MysqlConnectorCppConan(ConanFile):
name = "mysql-connector-cpp"
version = "8.0.27"
Copy link
Contributor

Choose a reason for hiding this comment

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

the version attribute is not needed as the CI service will build the versions listed in config.yml

version = "8.0.27"
license = "GPLv2"
author = "Oracle"
url = "https://dev.mysql.com/doc/connector-cpp/en/"
Copy link
Contributor

Choose a reason for hiding this comment

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

for url in we use the URL of this repository (conan-center-index in GitHub), while the homepage attribute points to that of the library itself

description = "MySQL Connector/C++ is a MySQL database connector for C++."
topics = ("mysql", "database", "connector", "c++")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
Copy link
Contributor

Choose a reason for hiding this comment

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

options = {"shared": [True, False]}
default_options = {"shared": False}
generators = "CMakeToolchain"
exports_sources = "CMakeLists.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't see this file being part of the pull request - if the library already ahs its CMakeLists.txt chances are this is not needed at all

generators = "CMakeToolchain"
exports_sources = "CMakeLists.txt"
requires = "openssl/1.1.0l"
source_folder = "mysql-connector-cpp"
Copy link
Contributor

Choose a reason for hiding this comment

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

source_folder and build_folder are not needed, but please use a cmake_layout as per
https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/conanfile.py#L70-L72

source_folder = "mysql-connector-cpp"
build_folder = "build"

def config_options(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

if a method is not needed, please remove it - although I suspect it will be needed once there is an fpic option:

https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/conanfile.py#L59-L61



def source(self):
self.run("git clone https://github.com/mysql/mysql-connector-cpp.git")
Copy link
Contributor

Choose a reason for hiding this comment

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

please follow the pattern from https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/cmake_package/all/conanfile.py#L97-L98
so that the sources are retrieved from the tar.gz in conandata.yml

@stale stale bot removed stale labels May 10, 2023
@ghost
Copy link

ghost commented May 17, 2023

I detected other pull requests that are modifying mysql-connector-cpp/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@stale
Copy link

stale bot commented Jun 18, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 18, 2023
@jcar87
Copy link
Contributor

jcar87 commented Jun 27, 2023

Hi @ahmed192a - we are still waiting for your feedback on the review comments in order to proceed with this PR - gentle remidner!

@jcar87 jcar87 self-assigned this Jun 27, 2023
@stale stale bot removed the stale label Jun 27, 2023
@stale
Copy link

stale bot commented Aug 7, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 7, 2023
@stale
Copy link

stale bot commented Oct 15, 2023

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

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.

4 participants