Exclude unnecessary fields from IronBank Schema files
Problem
In #2825 (closed), we found out that it can be problematic when custom fields are renamed or removed from Zuora, if those fields are listed in the IronBank Schema (sandbox files, prod files). Since the schema files are used when IronBank builds queries to pull data from Zuora resources, changes to the fields in Zuora without being reflected in the Schema results in IronBank::BadRequestError
errors.
Proposal
To help avoid these types of errors, we probably should exclude any fields in queries which are not needed directly by CustomersDot. This could be done by adding these fields to excluded_files.yml
. This should prevent these fields from being included in the Zuora queries (ref from IronBank). If that approach doesn't work, we could simply remove the fields from the schema altogether.
This might be the best course of action:
- Update all the schema files to get the lastest by exporting:
IronBank::Schema.export
. - Audit each field for each Resource and add any fields not used by CustomersDot to the
excluded_files.yml
- This will likely cause specs to fail because the Zuora requests are different. VCR cassettes will need to be re-recorded.
The above could be done for Sandbox first, then later for Production.