-
Notifications
You must be signed in to change notification settings - Fork 37
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
adding jfrog, conf and adding the correct publishers #258
Conversation
Additionally, I have added the JFrog extension required by the dependencies published in Bintray |
Codecov Report
@@ Coverage Diff @@
## master #258 +/- ##
=========================================
Coverage 52.41% 52.41%
Complexity 269 269
=========================================
Files 96 96
Lines 1757 1757
Branches 244 244
=========================================
Hits 921 921
Misses 760 760
Partials 76 76
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the functionality under buildplugins
, but I checked Gradle portal and plugin id
looks fine. (https://plugins.gradle.org/plugin/com.cdsap.talaiot.plugin.influxdb)
I'll be able to verify redeployed version tomorrow in the evening.
@@ -11,7 +10,7 @@ open class InfluxdbExtension(project: Project) : TalaiotExtension(project) { | |||
*/ | |||
var publishers: InfluxdbConfiguration? = null | |||
|
|||
fun publishers(block: PublishersConfiguration.() -> Unit) { | |||
fun publishers(block: InfluxdbConfiguration.() -> Unit) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is the fix for "InfluxDbPublisherConfiguration cannot be found" error, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly. Sorry about that, the test is in groovy and at the company we are using the standard version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems the same problem I've described at #245 (comment). 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @mokkun, my apologies, I went again to the comment and you were completely right. Checking my response I was testing plugins { id("com.cdsap.talaiot") version "1.4.0" }
without seeing the problem you pointed https://github.com/cdsap/Talaiot/pull/258/files#diff-05c8c3de206dc8f64274e3a9bb02c7696eb8ebbd523e30f3be4972bb235cac15L16
buildSrc/src/main/kotlin/com/talaiot/buildplugins/PublishingExtensions.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@cdsap Unfortunately, I still have an issue updating to the version 1.4. Perhaps I'm missing something obvious. This is how I declare dependencies implementation("com.cdsap:talaiot:1.4.0")
implementation("com.cdsap.talaiot.plugin:base:1.4.0")
implementation("com.cdsap.talaiot.plugin:influxdb:1.4.0") I added I created a ProjectFolderMetric custom metric It's broken because it cannot resolve I also create a custom plugin that applies Talaiot plugin It's broken because
It seems that I miss something obvious, but I cannot find out on my own what exactly :( |
Hi @MyDogTom The idea of your test project is implement a new plugin including specific configuration for metrics, filters and specific configuration for the influxdb publisher. Plugins are just the entry points to specific publisher/s implementing the core library. They extend the logic of the new "talaiot" configuration with the details of the publisher, as well they create the Talaiot Plugin of the core library. When we separated the publishers we opened the possibility to create new plugins using the existing publishers. For example, I want to create a plugin using influxdb-publisher to add some extra configuration. Taking your project the implementation would be:
Why Talaiot? Because it has the core functionality and we are creating a new Plugin, and why InfluxDb? Because is the publisher we are extending and we can reuse the conf given by the influxdb-publisher. 2- Create the Metrics, now 3- Create the plugin following the same convention used in the new ones:
4- And then setting up your default plugin:
And that's how I interpret the test repository, creating a new Plugin to be consumed by external dependencies with a default configuration for metrics and influxdb.
you have access to all dependencies included in the plugin applied(core/publishers) and you can extend the funcionality with the DSL. I want to ask you again about the opinion because I understand that adding api configurations will fix the problem, but in terms of design I think it's more clear for the plugins authors to extend from publishers and core library. Even in your use case I think creating a TalaiotPlugin with a default conf will be more clear. On the downsides, I see the complexity of the creating of a Plugin: Ah, I see you are including |
…tensions.kt Co-authored-by: Mozart Petter <[email protected]>
Thank you @cdsap ! I applied your instructions to the example project and it compiles. The only difference is that I had to add the dependency to the influxdb-publisher implementation("com.cdsap.talaiot:talaiot:1.4.0")
implementation("com.cdsap.talaiot.plugin:influxdb:1.4.0")
implementation("com.cdsap.talaiot:influxdb-publisher:1.4.0") without
|
I also tried it out in my main project and so far it looks good! |
Hi, sorry I was moving to new apartments last days, I will check these days everything |
Fixes for #256 #257
@MyDogTom I fixed the problem you mentioned, the Extension for kts for Influx, Base, Graph, Elastic Search was incorrect. Tests were building with Groovy and we were not able to catch the error.
Fixed the problem of
mavenPlugin
name artifact, now all the plugins have same id. Plugins redeployed