-
Notifications
You must be signed in to change notification settings - Fork 78
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
Delete a single trigger #245
Comments
I like this. I'm thinking I'd like to build it as Java code within ml-app-deployer, possibly even with ml-javaclient-util. Seems like something similar could be done for the schemas database too? |
Yes, would be great to have for other types of artifacts as well. I would love to see ml-gradle become more “groovy”. It would be nice to at least have more of the tasks and dependencies configured in ml-grade, instead of ml-app-deployer or ml-javaclient-util for specific functions. It would make it easier to customize the behaviors (add/remove task dependencies, augment/replace task definitions, etc) that you would expect to be able to do in Gradle builds but are sometimes not able to with ml-gradle tasks. |
That's a good point. The litmus test I've been using is - would someone want to execute this code outside the context of Gradle, with the Data Hub Framework being the main case for that litmus test. JUnit is another context. |
would it make sense to offer a "gradle nukeTrigger -Ptrigger=foo" command? That could both remove it from the filesystem and from a triggers database. |
I think just doing "mlDeleteTrigger -Ptrigger=foo" is the way to go for now. I think @hansenmc 's script is good for custom purposes, but I don't want a task in ml-gradle that could delete something from the triggers database that wasn't expected to be deleted. I'd rather just provide a shortcut for deleting a trigger. Will re-title this and toss it into the next release. |
…lient-connection-sharing #244: Issues with http manage client connection sharing - disabled connection sharing
An issue that we ran into is that over time we have accumulated triggers that may either be renamed or removed between deployments. We don't want to perform an
mlClearTriggersDatabase
, because we don't want transactions to occur without the triggers, and do not always want to take an outage if we have CPF and other application triggers that are needed and expected to be retained.So, we created a custom task that will selectively delete triggers (by name) that are not currently in our source tree, and who's name doesn't start with "cpf:". That way, as triggers are removed from the project, or renamed, they get deleted as part of the next deployment.
It could be expanded to incorporate other patterns/prefixes for a "whitelist" to prevent them from being deleted, but figured that this might be a good starting point, if deemed useful and worth incorporating into ml-gradle.
The text was updated successfully, but these errors were encountered: