Skip to content

Comments

Add mysql2 plugin #54

Merged
kezhenxu94 merged 4 commits intoapache:masterfrom
xdf-lab:feature/mysql
May 20, 2021
Merged

Add mysql2 plugin #54
kezhenxu94 merged 4 commits intoapache:masterfrom
xdf-lab:feature/mysql

Conversation

@tianyk
Copy link
Contributor

@tianyk tianyk commented May 19, 2021

Add mysql2 plugin

@kezhenxu94 kezhenxu94 self-requested a review May 19, 2021 03:43
@kezhenxu94
Copy link
Member

Test failed. Please recheck.

@tianyk
Copy link
Contributor Author

tianyk commented May 19, 2021

Please review.

Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

LGTM, @tom-pytel can you please do another round review?

@kezhenxu94 kezhenxu94 merged commit 4e8ea7d into apache:master May 20, 2021
This was referenced May 20, 2021
@tianyk tianyk deleted the feature/mysql branch May 23, 2021 11:03
@zyfyuanyuan6
Copy link

zyfyuanyuan6 commented Jul 6, 2021

@kezhenxu94 @tianyk when i start local server, it will throw an error 'Error installing plugin mysql 2 *', i used version skywalking-nodejs 0.3.0

@wu-sheng
Copy link
Member

wu-sheng commented Jul 6, 2021

@kezhenxu94 when i start local server, it will throw an error 'Error installing plugin mysql 2 *', i used version 3.0

Isn't this a mysql2 plugin?

@riskgod
Copy link

riskgod commented Jul 8, 2021

@kezhenxu94 when i start local server, it will throw an error 'Error installing plugin mysql 2 *', i used version 3.0

Isn't this a mysql2 plugin?

Yep, our team met this err in the same version.

@wu-sheng
Copy link
Member

wu-sheng commented Jul 8, 2021

There is no 3.0, I don't know what do you mean?

https://www.npmjs.com/package/mysql2 2.2.5 is the latest release.

@wu-sheng wu-sheng added this to the 0.3.0 milestone Jul 8, 2021
@zyfyuanyuan6
Copy link

zyfyuanyuan6 commented Jul 8, 2021

There is no 3.0, I don't know what do you mean?

https://www.npmjs.com/package/mysql2 2.2.5 is the latest release.

sorry i mean skywalking-nodejs 0.3.0 version.

@wu-sheng
Copy link
Member

wu-sheng commented Jul 8, 2021

@kezhenxu94 when i start local server, it will throw an error 'Error installing plugin mysql 2 *', i used version 0.3.0

Isn't this a mysql2 plugin?

Yep, our team met this err in the same version.

i want to know how can solve it when you meet?

This is open source project, you simply debug directly. I don't know what do you mean.

@riskgod
Copy link

riskgod commented Jul 8, 2021

version

Still not found the solution, But we can do something in https://github.com/apache/skywalking-nodejs/blob/master/src/core/PluginInstaller.ts#L48

@riskgod
Copy link

riskgod commented Jul 8, 2021

@kezhenxu94 when i start local server, it will throw an error 'Error installing plugin mysql 2 *', i used version 0.3.0

Isn't this a mysql2 plugin?

Yep, our team met this err in the same version.

i want to know how can solve it when you meet?

This is open source project, you simply debug directly. I don't know what do you mean.

Yep, try to solve it, but the problem is existed, we need try to fix it together.

@kezhenxu94
Copy link
Member

@riskgod can you print the error in

logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`);
in your local env to see what's the error?

@riskgod
Copy link

riskgod commented Jul 8, 2021

@riskgod can you print the error in

logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`);

in your local env to see what's the error?

'Error installing plugin mysql 2 *'

@kezhenxu94
Copy link
Member

I think you don't understand how to report a potential bug in an open source project and how to help the maintainer to locate it, only providing a error message helps nothing, you don't have a reproducible demo project, nor did you show the Efforts you've made to debug the problem, we are powerless to waste our time to debug this problem as we don't even know whether it's a bug or not because you gave no useful reproducible steps. This plugin is run in our tests with a typical scenario and it passed, if your scenario is different with it you have to provide your scenario in more details, otherwise we are not able to do anything.

We've been asking for more details but you always paste the same error logs, this is a waste of time and useless communication.

@riskgod can you print the error in

logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`);

in your local env to see what's the error?

'Error installing plugin mysql 2 *'

If you still want to help, try to print the e

} catch (e) {
if (plugin) {
logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`);
} else {
logger.error(`Error processing plugin ${pluginFile}`);
}
}

Something like this

      } catch (e) {
        if (plugin) {
          logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`, e); // <<===== 👈
        } else {
          logger.error(`Error processing plugin ${pluginFile}`);
        }
      }

... to see why the plugin is not installed successfully.

@riskgod
Copy link

riskgod commented Jul 8, 2021

I think you don't understand how to report a potential bug in an open source project and how to help the maintainer to locate it, only providing a error message helps nothing, you don't have a reproducible demo project, nor did you show the Efforts you've made to debug the problem, we are powerless to waste our time to debug this problem as we don't even know whether it's a bug or not because you gave no useful reproducible steps. This plugin is run in our tests with a typical scenario and it passed, if your scenario is different with it you have to provide your scenario in more details, otherwise we are not able to do anything.

We've been asking for more details but you always paste the same error logs, this is a waste of time and useless communication.

@riskgod can you print the error in

logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`);

in your local env to see what's the error?

'Error installing plugin mysql 2 *'

If you still want to help, try to print the e

} catch (e) {
if (plugin) {
logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`);
} else {
logger.error(`Error processing plugin ${pluginFile}`);
}
}

Something like this

      } catch (e) {
        if (plugin) {
          logger.error(`Error installing plugin ${plugin.module} ${plugin.versions}`, e); // <<===== 👈
        } else {
          logger.error(`Error processing plugin ${pluginFile}`);
        }
      }

... to see why the plugin is not installed successfully.

yep, found the problem. the mysql2 plugin use exports in package.json. not export commonjs in here, like this: ".": "./index.cjs", still try to fix this is in this npm module. Don't worry, I will try to covert that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants