gocd / gocd-analytics-plugin

Analytics plugin for GoCD
https://www.gocd.org/analytics/
Apache License 2.0
9 stars 10 forks source link

jdbc error "Could not set parameters for mapping: ParameterMapping {property='startDate' ...}" #480

Closed srdjan-catalyst closed 2 years ago

srdjan-catalyst commented 3 years ago

Hi,

I'm trying to run gocd-analytics-plugin in a gocd/gocd-server:v21.3.0 container, in the prescribed manner: -e GOCD_PLUGIN_INSTALL_gocd-analytics-plugin=[url]

There's only one pipeline that is failing at the first stage after fetching materials (trying to run a non-existing command, but that should be irrelevant)

The plugin installs fine, but following error is thrown and no records are created in the database:

https://gist.github.com/srdjan-catalyst/5c6bf0affe89d25814790ea98e89a983

schema_version table looks fine.

Any help appreciated. Thanks, Srdjan

chadlwilson commented 3 years ago

Is this a new setup or something that was working correctly earlier and now broken?

I'm not deeply familiar with the analytics plugin, however this sounds rather odd. If I understand you correctly, most pipelines are working fine generating analytics, but one of them produces this error. Is there anything different about this pipeline compared to others that seem to be working fine?

pedrocarrico commented 2 years ago

@chadlwilson I seem to be having this issue as well.

I'm running the latest v3.1.0-206-exp and I'm also running with postgres version 12.8.

The recommended postgres (9.6) version is currently being deprecated in AWS RDS and it should be unavailable in January so I've tried with the latest.

Do you think this might be related to the postgres version?

chadlwilson commented 2 years ago

@pedrocarrico Is it the same stack trace as for the OP? Is the problem as described (only one pipeline fails, no obvious pattern)? If so, can you answer my questions I asked the original poster?

I don't know if it's related to the Postgres version, I don't have enough information to help currently.

pedrocarrico commented 2 years ago

@chadlwilson yeah same stack trace.

It's something with the latest version, I've rolled back to the 3.0.0-2 version and tried with postgres versions 9.6 and 12.8 and it works. I have a clean installation from scratch.

chadlwilson commented 2 years ago

Do you mean the 3.0.0-3 version (3.0.0-2 was an experimental release)? In any case, there is no code difference between these versions, so I don't think that explains any differences here.

pedrocarrico commented 2 years ago

I mean 3.0.0-2 version so yeah the first experimental one in releases.

chadlwilson commented 2 years ago

Even so, there are no differences, so there's no reason that would fix any problem. It seems likely it is something else that is causing this, and you perhaps just got lucky with the reinstalls or your GoCD env.

pedrocarrico commented 2 years ago

Ah ok, I tried with latest experimental, perhaps the dependency version bumps from dependabot broke something as this seems something related to the ORM.

I can try with version v3.0.0-5 and report ASAP.

chadlwilson commented 2 years ago

Ahh, OK, that's interesting - I wonder if the OP used an experimental version also. I apologise - I missed that in your original comment 😢

chadlwilson commented 2 years ago

Was able to replicate this within the automated integration tests, which for some reason were prevented from running at some point recently, allowing the experimental builds to give false confidence of things working at some point since the last official release.

While I wouldn't generally recommend experimental versions in general, you could try v3.1.0-214-exp against PG 9.6 which likely addresses the issue by downgrading MyBatis back to the same version as the last official release.

Will assume the OP's issue was also caused by using one of the experimental releases and close this now.