@sbrossie sbrossie released this Jul 24, 2018 · 8 commits to master since this release

Assets 2

Overview

This is a quick bug fix release following our 0.20.1.

Code Changes and Tasks/Bugs

Summary of the Changes

This mostly addresses a couple of issues when migrating from 0.18.21 to 0.20.0:

  • Issue with deserializing old bus events whose json format changed
  • Issue with migration script

@sbrossie sbrossie released this Jul 13, 2018 · 19 commits to master since this release

Assets 2

Overview

The release 0.20.0 is now the official release supported by the Kill Bill team. It is a large release that contains a lot of improvements all across the board. These release notes provide a non exhaustive list of all the changes that happened, but instead they provide an overview of all these changes. While we don't expect major issues during upgrade from 0.18.x releases to 0.20.x, we do advise users, teams, companies to treat this upgrade with some amount of caution, i.e run some solid regression testing matching your specific use case and report issues if any.

Code Changes and Tasks/Bugs

Summary of the Changes

Features

Account

  • Ability to modify account reference time -- used to improve determinism of when things things (events) happen on a per-account level

Catalog

  • Allow to bill in-advance and in-arrear (Plan level) within one catalog
  • Rework catalog apis
  • Catalog plugin api improvements (usage sections, ability to control caching, ability to server per account/catalogs)
  • Add pretty name for catalog Plan, Product, ..

Invoice

  • Added AUTO_INVOICING_DRAFT and AUTO_INVOICING_REUSE_DRAFT for advanced invoicing use cases
  • Service period for external charges
  • New API to create TAX items
  • Ability to void invoices
  • Ability to search invoices by start and end date
  • Add api to commit HA invoices prior end of day

Subscription/Entitlement

  • Ability to specify a target phase type when changing plans

Payment

  • Ability to retrieve all payment methods/account
  • Enhancement for payment control plugin apis

Usage

  • Capture usage info during invoicing and provide both a DETAIL/DETAIL mode to control behavior
  • Add new TOP_TIER consumable in arrear policy

Bugs Fixed

The following list is solely taking into account bugs that were filed against the main killbill repo:

API/Documentation

One of the large focus in this release was around api and documentation. The following blog post summarizes the work we have done in that respect. One important piece is the new api documentation.

Platform Improvements

In each release we spend some amount of times working on performance: In this release specifically, we have reworked the catalog layer -- reduce number of calls, improve caching -- and the entitlement/subscription layer to also remove database calls, leading to some performance improvements.

With more and more emphasis on privacy in the industry, we have also worked done some work and created a new Logging and GDPR section.

In terms of deployments/ops, we have done a lot of work.

Plugins

We have worked on our base plugin frameworks, see java plugin framework to provide solid foundation to write plugins. This includes reworking some of our plugin apis, addressing plugin ordering, providing support to handling (retrying) failed bus events, ...

Upgrade from 0.18.21 to 0.20.0

Database Upgrade

Migrating database schema is documenting here, and in a nutshell this consists of running the following command to get the ddl changes:

> kpm migrations killbill killbill-0.18.21 killbill-0.20.0

However, due to a slight mistake we have corrected in this commit, we provide the corrected output below:

DROP TABLE IF EXISTS catalog_override_usage_definition;
 create table catalog_override_usage_definition
 (
 record_id serial unique,
 parent_usage_name varchar(255) NOT NULL,
 type varchar(255) NOT NULL,
 fixed_price decimal(15,9) NULL,
 recurring_price decimal(15,9) NULL,
 currency varchar(3) NOT NULL,
 effective_date datetime NOT NULL,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_usage_definition_idx ON catalog_override_usage_definition(tenant_record_id, parent_usage_name, currency);


 DROP TABLE IF EXISTS catalog_override_tier_definition;
 create table catalog_override_tier_definition
 (
 record_id serial unique,
 fixed_price decimal(15,9) NULL,
 recurring_price decimal(15,9) NULL,
 currency varchar(3) NOT NULL,
 effective_date datetime NOT NULL,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_tier_definition_idx ON catalog_override_usage_definition(tenant_record_id, currency);

 DROP TABLE IF EXISTS catalog_override_block_definition;
 create table catalog_override_block_definition
 (
 record_id serial unique,
 parent_unit_name varchar(255) NOT NULL,
 size decimal(15,9) NOT NULL,
 max decimal(15,9) NULL,
 currency varchar(3) NOT NULL,
 price decimal(15,9) NOT NULL,
 effective_date datetime NOT NULL,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_block_definition_idx ON catalog_override_block_definition(tenant_record_id, parent_unit_name, currency);


 DROP TABLE IF EXISTS catalog_override_phase_usage;
 create table catalog_override_phase_usage
 (
 record_id serial unique,
 usage_number int /*! unsigned */,
 usage_def_record_id  bigint /*! unsigned */ not null,
 target_phase_def_record_id bigint /*! unsigned */ not null,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_phase_usage_idx ON catalog_override_phase_usage(tenant_record_id, usage_number, usage_def_record_id);

 DROP TABLE IF EXISTS catalog_override_usage_tier;
 create table catalog_override_usage_tier
 (
 record_id serial unique,
 tier_number int /*! unsigned */,
 tier_def_record_id bigint /*! unsigned */ not null,
 target_usage_def_record_id bigint /*! unsigned */ not null,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ not null default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_usage_tier_idx ON catalog_override_usage_tier(tenant_record_id, tier_number, tier_def_record_id);


 DROP TABLE IF EXISTS catalog_override_tier_block;
 create table catalog_override_tier_block
 (
 record_id serial unique,
 block_number int /*! unsigned */,
 block_def_record_id bigint /*! unsigned */ not null,
 target_tier_def_record_id bigint /*! unsigned */ not null,
 created_date datetime NOT NULL,
 created_by varchar(50) NOT NULL,
 tenant_record_id bigint /*! unsigned */ NOT NULL default 0,
 PRIMARY KEY(record_id)
 );
 CREATE INDEX catalog_override_tier_block_idx ON catalog_override_tier_block(tenant_record_id, block_number, block_def_record_id);alter table accounts modify external_key varchar(255) NOT NULL;
 alter table account_history modify external_key varchar(255) NOT NULL;
 drop index bundles_key on bundles;
 create unique index bundles_external_key on bundles(external_key, tenant_record_id);alter table tag_definitions add column applicable_object_types varchar(500) after name;
 alter table tag_definition_history add column applicable_object_types varchar(500) after name;
 alter table accounts add column reference_time datetime NOT NULL DEFAULT '1970-01-01 00:00:00' after payment_method_id;
 alter table account_history add column reference_time datetime NOT NULL DEFAULT '1970-01-01 00:00:00' after payment_method_id;
 update accounts set reference_time = created_date;
 update account_history set reference_time = created_date;alter table invoice_items add column quantity int after linked_item_id;
 alter table invoice_items add column item_details text after quantity;alter table bus_events modify event_json text not null;
 alter table bus_events_history modify event_json text not null;
 alter table notifications modify event_json text not null;
 alter table notifications_history modify event_json text not null;
 alter table bus_ext_events modify event_json text not null;
 alter table bus_ext_events_history modify event_json text not null;
 alter table invoice_items add column product_name varchar(255) after description;
 alter table accounts drop column is_notified_for_invoices;
 alter table account_history drop column is_notified_for_invoices;

Clients

Lots of api changes have happened to any application making api calls to killbill should be upgraded to use the new clients -- note that some of these clients are now automatically generated through swagger and so you should expect some significant api changes.

Plugins

All the Kill Bill plugins, the one maintained on our GH account, have been updated to work against 0.20. If you have any custom plugin, you will need to update your dependencies, potentially fix the code for api changes, rebuild, and test, test...

Below are the links that track the api changes for Kill Bill API and plugin API:

Note that for the Kill Bill plugins DLL changes may have occurred and will need to run the kpm migration tool to find out.

Pre-release

@pierre pierre released this Jul 9, 2018 · 24 commits to master since this release

Assets 2

Installation and Upgrade Notes

Overview of the changes

0.19.19 can be seen as 0.20.0-rc3: very few new changes are expected before the 0.20.0 release.

Behavior changes

N/A

API changes

N/A

Bug fixes

DB Changes

N/A

Pre-release

@pierre pierre released this Jun 30, 2018 · 30 commits to master since this release

Assets 2

Installation and Upgrade Notes

Overview of the changes

0.19.18 can be seen as 0.20.0-rc2: very few new changes are expected before the 0.20.0 release.

The Swagger UI (/api.html) has been upgraded to the latest version.

Behavior changes

N/A

API changes

  • Cleanup unused Account#isNotifiedForInvoices field (#1003)

Bug fixes

  • This release fixes a NPE in the usage invoice code as reported on the mailing list
  • Abort invoice payment if existing payment is UNKNOWN (#1015)
  • Invoke control plugin state machine in Janitor GET flow (#1017)

DB Changes

alter table accounts drop column is_notified_for_invoices;
alter table account_history drop column is_notified_for_invoices;

@sbrossie sbrossie released this Jun 27, 2018 · 949 commits to master since this release

Assets 2

Installation and Upgrade Notes

This release fixes a NPE in the usage invoice code as reported on the mailing list

Behavior Changes

N/A

DB Changes

N/A

Pre-release

@pierre pierre released this Jun 26, 2018 · 59 commits to master since this release

Assets 2

Installation and Upgrade Notes

Overview of the changes

0.19.17 can be seen as 0.20.0-rc1: very few new changes are expected before the 0.20.0 release.

Behavior changes

  • $0 usage items are now generated (#667)
  • Invoice plugins can modify invoice item descriptions (#911)
  • Add additional metadata when sending INVOICE_NOTIFICATION events (#845)

API changes

  • Remove ability to make payment when creating external charges (https://github.com/killbill/killbill#992)
  • AccountResource#payAllInvoices improvements (#980)
  • New API to create TAX items (#827)
  • Introduce InvoicePaymentApi API (#981)
  • Add date filter when retrieving account invoices (#651
  • Expose prices in catalog objects (#933)
  • Ability to retrieve an invoice by invoice item id (#7)
  • Catalog API cleanups (#1009)

Bug fixes

DB Changes

N/A

@sbrossie sbrossie released this May 31, 2018 · 165 commits to master since this release

Assets 2

Installation and Upgrade Notes

Overview of the Changes

The bulk of the changes in this release are the JAXRS api tweaks we have made, so beware because some apis have changed a slightly and this could break existing integrations.

We have modified our JAXRS endpoint along with the swagger annotations to be more uniform and aligned with swagger recommendations and as a result, the swagger specification should now be up to date with the code and can be used to generate our client apis. In particular, there is a vew swagger generated java client
api that should be used (version 1.x.y).

Some details about the changes have been tracked in these tickets:

  • #913 : XML catalog and overdue endpoints will take additional /xml path suffix
  • #930 : The api to export account data and fetch the queues entries now requires passing the following Accept header application/octet-stream
  • #916 : Tag and custom fields apis will take a body instead of query params and will therefore require application/json Content-Type header.
  • #918 : Change all endpoints Content-Type and Accept headers that used to take application/xml into text/xml.
  • #912 and #917: The HTTP verbs for some endpoints has changed from PUT to POST and conversely to make it consistent
  • #917 :
  • #924, #935, #941 : All endoints should at least have a documented success http status in the 2xx range:
    • A 200 will return a result
    • A 201 will return no result but will return a Location header, indicating where to fetch the resource from
    • A 202 will not return a result
    • A 204 will not return a result
  • #954 : Additionally, some json input and response have been slightly modified -- e.g adding missing creditId in the CreditJson model

API changes

Catalog apis have been modified to remove deprecated (unsued) apis and we added additional apis for enhancing fetching the catalog rules in multi-version catalog scenarios.

DB Changes

N/A

Endpoint Reference

The list below shows all the endpoints (http verb and success response status) after the changes mentionned above:

GET:
  - 200
    accounts#getAccountByKey
    accounts#getAccounts
    accounts#searchAccounts
    accounts#getAccount
    accounts#getAllCustomFields
    accounts#getAllTags
    accounts#getAccountAuditLogs
    accounts#getAccountAuditLogsWithHistory
    accounts#getBlockingStates
    accounts#getAccountBundles
    accounts#getChildrenAccounts
    accounts#getAccountCustomFields
    accounts#getEmailNotificationsForAccount
    accounts#getEmails
    accounts#getAccountEmailAuditLogsWithHistory
    accounts#getInvoicePayments
    accounts#getInvoicesForAccount
    accounts#getOverdueAccount
    accounts#getPaymentMethodsForAccount
    accounts#getPaymentsForAccount
    accounts#getAccountTags
    accounts#getAccountTimeline
    admin#getQueueEntries
    bundles#getBundleByKey
    bundles#getBundles
    bundles#searchBundles
    bundles#getBundle
    bundles#getBundleCustomFields
    bundles#getBundleTags
    catalog#getCatalogJson
    catalog#getAvailableAddons
    catalog#getAvailableBasePlans
    catalog#getPhaseForSubscriptionAndDate
    catalog#getPlanForSubscriptionAndDate
    catalog#getPriceListForSubscriptionAndDate
    catalog#getProductForSubscriptionAndDate
    catalog#getCatalogVersions
    catalog#getCatalogXml
    credits#getCredit
    customFields#getCustomFields
    customFields#searchCustomFields
    customFields#getCustomFieldAuditLogsWithHistory
    export#exportDataForAccount
    invoiceItems#getInvoiceItemCustomFields
    invoiceItems#getInvoiceItemTags
    invoicePayments#getInvoicePayment
    invoicePayments#getInvoicePaymentCustomFields
    invoicePayments#getInvoicePaymentTags
    invoices#getInvoiceByNumber
    invoices#getCatalogTranslation
    invoices#getInvoiceMPTemplate
    invoices#getInvoices
    invoices#searchInvoices
    invoices#getInvoiceTemplate
    invoices#getInvoiceTranslation
    invoices#getInvoice
    invoices#getInvoiceCustomFields
    invoices#getInvoiceAsHTML
    invoices#getPaymentsForInvoice
    invoices#getInvoiceTags
    nodesInfo#getNodesInfo
    overdue#getOverdueConfigJson
    overdue#getOverdueConfigXml
    paymentMethods#getPaymentMethodByKey
    paymentMethods#getPaymentMethods
    paymentMethods#searchPaymentMethods
    paymentMethods#getPaymentMethod
    paymentMethods#getPaymentMethodAuditLogsWithHistory
    paymentMethods#getPaymentMethodCustomFields
    paymentTransactions#getPaymentByTransactionId
    paymentTransactions#getTransactionAuditLogsWithHistory
    paymentTransactions#getTransactionCustomFields
    paymentTransactions#getTransactionTags
    payments#getPaymentByExternalKey
    payments#getPaymentAttemptAuditLogsWithHistory
    payments#getPayments
    payments#searchPayments
    payments#getPayment
    payments#getPaymentAuditLogsWithHistory
    payments#getPaymentCustomFields
    payments#getPaymentTags
    pluginsInfo#getPluginsInfo
    security#getCurrentUserPermissions
    security#getRoleDefinition
    security#getCurrentUserSubject
    security#getUserRoles
    subscriptions#getSubscription
    subscriptions#getSubscriptionCustomFields
    subscriptions#getSubscriptionTags
    tagDefinitions#getTagDefinitions
    tagDefinitions#getTagDefinition
    tagDefinitions#getTagDefinitionAuditLogsWithHistory
    tags#getTags
    tags#searchTags
    tags#getTagAuditLogsWithHistory
    tenants#getTenantByApiKey
    tenants#getPushNotificationCallbacks
    tenants#getPerTenantConfiguration
    tenants#getAllPluginConfiguration
    tenants#getPluginConfiguration
    tenants#getPluginPaymentStateMachineConfig
    tenants#getUserKeyValue
    tenants#getTenant
    usages#getAllUsage
    usages#getUsage
POST:
  - 201
    accounts#createAccount
    accounts#processPaymentByExternalKey
    accounts#addAccountBlockingState
    accounts#createAccountCustomFields
    accounts#addEmail
    accounts#createPaymentMethod
    accounts#processPayment
    accounts#createAccountTags
    bundles#transferBundle
    bundles#addBundleBlockingState
    bundles#createBundleCustomFields
    bundles#createBundleTags
    catalog#addSimplePlan
    catalog#uploadCatalogXml
    credits#createCredit
    invoiceItems#createInvoiceItemCustomFields
    invoiceItems#createInvoiceItemTags
    invoicePayments#createChargebackReversal
    invoicePayments#createChargeback
    invoicePayments#createInvoicePaymentCustomFields
    invoicePayments#createRefundWithAdjustments
    invoicePayments#createInvoicePaymentTags
    invoices#createFutureInvoice
    invoices#uploadCatalogTranslation
    invoices#createExternalCharges
    invoices#createMigrationInvoice
    invoices#uploadInvoiceTemplate
    invoices#uploadInvoiceTranslation
    invoices#adjustInvoiceItem
    invoices#createInvoiceCustomFields
    invoices#createInstantPayment
    invoices#createInvoiceTags
    overdue#uploadOverdueConfigJson
    overdue#uploadOverdueConfigXml
    paymentMethods#createPaymentMethodCustomFields
    paymentTransactions#notifyStateChanged
    paymentTransactions#createTransactionCustomFields
    paymentTransactions#createTransactionTags
    payments#captureAuthorizationByExternalKey
    payments#chargebackReversalPaymentByExternalKey
    payments#chargebackPaymentByExternalKey
    payments#createComboPayment
    payments#refundPaymentByExternalKey
    payments#captureAuthorization
    payments#chargebackReversalPayment
    payments#chargebackPayment
    payments#createPaymentCustomFields
    payments#refundPayment
    payments#createPaymentTags
    security#addRoleDefinition
    security#addUserRoles
    subscriptions#createSubscription
    subscriptions#createSubscriptionWithAddOns
    subscriptions#createSubscriptionsWithAddOns
    subscriptions#addSubscriptionBlockingState
    subscriptions#createSubscriptionCustomFields
    subscriptions#createSubscriptionTags
    tagDefinitions#createTagDefinition
    tenants#createTenant
    tenants#registerPushNotificationCallback
    tenants#uploadPerTenantConfiguration
    tenants#uploadPluginConfiguration
    tenants#uploadPluginPaymentStateMachineConfig
    tenants#insertUserKeyValue
  - 204
    accounts#payAllInvoices
  - 200
    admin#triggerInvoiceGenerationForParkedAccounts
    invoices#generateDryRunInvoice
    invoices#uploadInvoiceMPTemplate
    paymentGateways#buildComboFormDescriptor
    paymentGateways#buildFormDescriptor
    paymentGateways#processNotification
    usages#recordUsage
  - 202
    nodesInfo#triggerNodeCommand
PUT:
  - 204
    accounts#updateAccount
    accounts#rebalanceExistingCBAOnAccount
    accounts#modifyAccountCustomFields
    accounts#setEmailNotificationsForAccount
    accounts#refreshPaymentMethods
    accounts#setDefaultPaymentMethod
    accounts#transferChildCreditToParent
    admin#putInRotation
    admin#updatePaymentTransactionState
    bundles#modifyBundleCustomFields
    bundles#pauseBundle
    bundles#renameExternalKey
    bundles#resumeBundle
    invoiceItems#modifyInvoiceItemCustomFields
    invoicePayments#completeInvoicePaymentTransaction
    invoicePayments#modifyInvoicePaymentCustomFields
    invoices#commitInvoice
    invoices#modifyInvoiceCustomFields
    invoices#voidInvoice
    paymentMethods#modifyPaymentMethodCustomFields
    paymentTransactions#modifyTransactionCustomFields
    payments#completeTransactionByExternalKey
    payments#completeTransaction
    payments#modifyPaymentCustomFields
    security#updateRoleDefinition
    security#updateUserPassword
    security#updateUserRoles
    subscriptions#changeSubscriptionPlan
    subscriptions#updateSubscriptionBCD
    subscriptions#modifySubscriptionCustomFields
    subscriptions#uncancelSubscriptionPlan
    subscriptions#undoChangeSubscriptionPlan
DELETE:
  - 204
    accounts#closeAccount
    accounts#deleteAccountCustomFields
    accounts#removeEmail
    accounts#deleteAccountTags
    admin#invalidatesCache
    admin#invalidatesCacheByAccount
    admin#invalidatesCacheByTenant
    admin#putOutOfRotation
    bundles#deleteBundleCustomFields
    bundles#deleteBundleTags
    catalog#deleteCatalog
    invoiceItems#deleteInvoiceItemCustomFields
    invoiceItems#deleteInvoiceItemTags
    invoicePayments#deleteInvoicePaymentCustomFields
    invoicePayments#deleteInvoicePaymentTags
    invoices#deleteInvoiceCustomFields
    invoices#deleteInvoiceTags
    invoices#deleteCBA
    paymentMethods#deletePaymentMethod
    paymentMethods#deletePaymentMethodCustomFields
    paymentTransactions#deleteTransactionCustomFields
    paymentTransactions#deleteTransactionTags
    payments#voidPaymentByExternalKey
    payments#cancelScheduledPaymentTransactionByExternalKey
    payments#voidPayment
    payments#deletePaymentCustomFields
    payments#deletePaymentTags
    payments#cancelScheduledPaymentTransactionById
    security#invalidateUser
    subscriptions#cancelSubscriptionPlan
    subscriptions#deleteSubscriptionCustomFields
    subscriptions#deleteSubscriptionTags
    tagDefinitions#deleteTagDefinition
    tenants#deletePushNotificationCallbacks
    tenants#deletePerTenantConfiguration
    tenants#deletePluginConfiguration
    tenants#deletePluginPaymentStateMachineConfig
    tenants#deleteUserKeyValue

@sbrossie sbrossie released this May 18, 2018 · 275 commits to master since this release

Assets 2

Installation and Upgrade Notes

Overview of the Changes

  • Fix issue in usage billing (DETAIL mode) when tier is defined as $0
  • Catalog api enhancements
  • Improve retry bus error state to reflect success/failure

API changes

N/A

DB Changes

N/A

@sbrossie sbrossie released this May 18, 2018 · 955 commits to master since this release

Assets 2

Installation and Upgrade Notes

Issues

Behavior Changes

N/A

DB Changes

N/A

@sbrossie sbrossie released this May 10, 2018 · 285 commits to master since this release

Assets 2

Installation and Upgrade Notes

Overview of the Changes

  • Expose and persist invoice item product name
  • New history apis
  • Test hardening
  • Fix swallowed TAG_DEFINITION_DOES_NOT_EXIST when doing a TagDefinitionDao#getById
  • Make sure invoice item adjustment correctly reflect the catalog info from the item being adjusted

API Changes

  • New API to retrieve history info from any objects
  • Add InvoiceItem#productName

DB Changes

Add new column product_name to table invoice_items.

The migration script can be obtained by running: kpm migrations killbill killbill-0.19.13 killbill-0.19.14, and would produce following ddl changes:

alter table invoice_items add column product_name varchar(255) after description;