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 customFields to Alert #87

Merged
merged 1 commit into from
Oct 10, 2018
Merged

Conversation

zpriddy
Copy link

@zpriddy zpriddy commented Oct 8, 2018

No description provided.

@nadouani nadouani changed the base branch from master to develop October 10, 2018 09:23
@nadouani nadouani merged commit a64b5ca into TheHive-Project:develop Oct 10, 2018
@nadouani nadouani added this to the 1.5.1 milestone Oct 10, 2018
nadouani added a commit that referenced this pull request Oct 10, 2018
@rolinh
Copy link

rolinh commented Oct 12, 2018

@nadouani This change breaks compatibility with TheHive 3.0.10 and earlier versions. It is unfortunate that such a change is part of a patch release (ie 1.5.1).

[info] o.e.ErrorHandler - POST /api/alert returned 400
org.elastic4play.AttributeCheckingError: [Unknown attribute alert.customFields: {"type":"JsonInputValue","value":{}}]
        at org.elastic4play.services.FieldsSrv.$anonfun$parse$7(FieldsSrv.scala:30)
        at org.scalactic.Bad.transform(Or.scala:1386)
        at org.elastic4play.services.FieldsSrv.parse(FieldsSrv.scala:30)
        at org.elastic4play.services.CreateSrv.create(CreateSrv.scala:108)
        at org.elastic4play.services.CreateSrv.apply(CreateSrv.scala:67)
        at services.AlertSrv.$anonfun$create$3(AlertSrv.scala:108)
        at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:304)
        at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
        at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)

@nadouani
Copy link
Contributor

nadouani commented Oct 12, 2018

Hi @rolinh thanks for the remark. It's 100% valid. I personally didn't test that with TheHive 3.0.10 so forgot the breaking change.

Please stick with the 1.5.0 version, since we cannot remove supporting custom fields in alerts.

@saadkadhi
Copy link

@nadouani you mean 3.0.10 :)

@nadouani
Copy link
Contributor

Well, looks like I'm still sleeping!

@rolinh
Copy link

rolinh commented Oct 12, 2018

@nadouani Yup, I'm sticking with 1.5.0 until I upgrade TheHive to v3.1.x. It's probably worth a HEADS UP in your blog post about TheHive4py 1.5 though ;)

@nadouani
Copy link
Contributor

@rolinh Yes, we will update the blog post accordingly.

@saadkadhi
Copy link

@saadkadhi
Copy link

Blog post updated and @nadouani is going to offer tasteful croissants to the core team

@nadouani
Copy link
Contributor

I'd offer that to all the community!

@saadkadhi
Copy link

By my last count, the community is about 100000 people spread across all the continents. Hope you have a very deep pocket :)

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