CSpace UCB Deployment Meeting Notes
February 9, 2012 Thursday AM
INTROS
Intros all around:
Richard Millet, University of California Berkeley (UCB) services development
Chris Thompson, Walker Art Center (WAC)
Nate Solas, WAC
Jesse Martinez, Museum of the Moving Image
Amy Wieliczka, UCB deployments
Yuteh Cheng, UCB deployments
John Keller, UCB deployments
Michael Black, Phoebe A Hearst Museum of Anthropology (PAHMA) (UCB)
Glen Jackson, UCB deployments
Ray Lee, UCB deployments
Rick Jaffe, UCB development, deployments (notetaker)
Chris Hoffman, UCB deployments
Aron Roberts, UCB services development
Chris Pott, Staten Museum for Kunst
Patrick Schmitz, UCB
Chris Martin, Cambridge University (CARET), application layer development
Yura Zenevich, Ontario College of Art and Design (OCAD), UI layer development
Susan Stone, MMI deployment; PAHMA deploment
CASES TO REVIEW
Discussion of cases to review today. Patrick makes additions to wiki page. Agenda for Deployment Meeting, 8-10 February 2012
Interest in adding fields and making them show up; field-based permissions; boolean fields; others.
Discussion about limits of field-based permissions. Permissions by roles is an ok work around. Not possible now in the services. UI might be able to do it, but user could always use cURL to access the servics directly.
How to add a new field
Some information in documentation.
Includes using the minibuild.
Often starts with setting up a new tenant.
Aron asks how is the new tenant documentation working. Chris T says "Good."
Patrick reviews wiki page "Adding a Custom Field to a CollectionObject"
Patrick says you can skip the JAXB stuff. Used for client. Asks does anyone bind their fields. Chris P says yes, to assist in migration.
Chris M asks what debugging tools are available.
Patrick: 1st check: I often cut and paste, then modify. Good to validate schema to make sure I haven't introduced an error.
Richard: You'll see log errors if bundle is no good.
Aron: We've dialed down logging level from Catalina.out. Useful to look at those in debugging. Need to document how to turn that back on.
Richard: We use log4J to log
Patrick: Can set up log4J to make it easy to turn on commenting.
Chris H: What about testing against services?
Chris T: cURL test is documented.
Patrick: Integration tests folder in code tree. Dig down to find sample payloads for cURL posts.
Aron: Can check database to see if field exists . Often, though, the fields end up in satellite tables.
Patrick: OK if you're comfortable with databases. I tend to use that as a last resort.
Aron: Should we create a troubleshooting template on the documentation wiki to help people add a field in the services?
Patrick: POSTER is a Firefox plugin that replaces need for cURL. Note that default mimetype is text.xml. We use application.xml. Must change that, or you will get tripped up. Chrome version's UI is not as good.
Chris M: You should know about the bug triage page.
Aron: And the troubleshooting page.
Patrick: Once you get beyond the services, Firebug (Firefox extension) is your friend. Chrome developer tools, too.
Aron: Describes TCPMon technique to capture payload from app layer to service layer.
Chris M: Logging for app layer directed to /tmp. That should be changed. Discussion of app logging and perf logging.
Jesse: Asks Aron to document his TCPMon technique.
Pattrick: Shoud create a developer profile for key logging files (as opposed to a deployer profile).
Richard: Yura, what kind of logs does the UI create on the client side?
Yura: (missed Yura's answer)
Patrick: But in error-testing, debugging?
Yura: Things that really matter are JS errors and warnings. And the Net tab with all the calls listed. Only in complex situations do I turn on logging.
Chris M: You have more freedom in the UI to poke and see what's going on.
Aron: What's equivalent in services and app layer?
Richard: If you're comfortable debugging Java in Eclipse, that's the way.
Patrick: Tricky, because of set up needed.
Richard: We could document that.
Aron: Starting point note in my personal area of the wiki with info about turning on Tomcat in debug mode.
Ray: This is a situation where there is older and newer documentation, hard to know what still works. I have created several new documents, for different cases. In the DOC wiki, search for "How to configure.., for example, "... a local schema extension for a tenant."
John Keller: I use the Table of Contents. Those links on the lefthand side of the page, under Configuring CollectionSpace, need to be gardened.
Chris Pott: Would be useful to have an overview of how many documents I'll need to look at to do a given procedure.
Patrick: Maybe the next doc sprint should be devoted to clean up the wiki, rather than adding new docs.
Chris H: Where do your docs end, Ray?
Ray: At the service layer.
Chris P: Yes. After that, it's not clear where to go.
Chris M: App layer: Tenants overlay the default. Look in lifesci to see this. Everything in defaults exist. Things in tenants add to it.
Ray: But must copy entire base-...xml file to change terms in static term lists.
Chris M: Yes. This should be changed.
Ray: (asked 'What to copy in the app layer?'): Need more fleshing out of App layer and UI layer instructions. Hard to find.
Chris H: Jesse's documentation.
Jesse: I have some poorly written notes on MMI deployment wiki. Notes along the way. Display/deploy, search for MMI implementation. Version 12. Acquisition has good detail.
Chris M: Unified CollectionSpace Config file explains many of the decorations. .../display/UNRELEASED/unified+collectionspace+config
Patrick: Can we add to this to explain why you'd use each of the decorators. Yura, could you add info to some of the decorators that you asked Chris to include?
John: (echoes Patrick)
Patrick: Asks Chris if we could change some names, such as "section" attribute in field tag (should be "schema part") and 'services-tenant-plural.'
Chris.: Yes, let's make a JIRA so we have a trail.
Ray: Lots of documentation in JIRA, too.
Rick: And from there, we would look at Fisheye to see what actual changes were committed.
Chris H: How to test if app layer is working with the new field?
Chris M: Tests are all unit test.
Ray: Review UISpec and UISchema.
Chris M: Demos how to use Firebug to review UISCHEMA and UISPEC.
Nate: Caching would be good. (Discussion of caching; disappeared after 1.12?)
Chris M: loginstatus call tells you who you're logged in as, permissions. Permissions beginning with slash are services permissions.
Composite request. UI requests UISpec and UISchema.
GET to .../tenant/core/
/uispec to get UISpec directly. (Applayer REST API)
cspi-webui/src/main/java/WebUI.java lists all calls that App layer will accept.
(TestUIRecords.java ln 236 shows call to generate data – objects and relationships. Autopopulate a schema.)
Tests should work as logged-in tenant. I.e., would get extension schemas
Patrick: We need a page full of URLs that hit demo to show all the calls that you can make to the app layer.
Chris M: Agrees.
.../tenants/authorities/initialise creates all the terms in your config file.
Yura: After you add field to services and applayer, let app layer create field name. Use that for the UI. (Rather than using selectors.)
Chris M: Demonstrates how to check selector spelling in UISpec.
How to know if you've misspelled a selector: look at post payload. Your field won't appear. (Won't save, obviously.)
Selector relates to UI.
"Name in services" ("services-tag"?) relates to service
Discussion of full or sparse payloads; what UI keeps track of.
Yura: UI never sends sparse updates. Must keep track of latest saved model and current, for things such as cancelling changes.
Patrick: Describes GET payload to services. Core and common bits.
Example call: .../cspace-services/movements/
?wf_deleted=false only shows records that have not been deleted. Services uses soft-deletes.
Could access services to undelete an item. Via cURL or batch process.
/workflow shows what has been deleted.
(Discussion ensues about why this has been designed this way.)
Jesse: How do you configure what summary data gets returned?
Chris M: App layer fields described in <fieldsreturned> tag. (Set where?)
Patrick: Can specify per tenant in tenant-bindings-delta.xml for tenant. Can dig down into nested fields (elPath).
Chris P: How do you debug in App layer when your field is not showing up?
ChrisM: Look in tomcat-main/../.. /chain/controller/tenantServlet. Also, .../tenant/core/init Spits out your config file for the server.
Patrick: Tomcat bug that doesn't recognize new .War files uploaded while tomcat is stopped.
Chris: App layer just pushes config.
Aron: Is there a deploy target?
Chris: No.
New JIRA: Create Ant config deploy target for App layer config files.
Chris T asks about minibuild
Aron describes directory structure. To add new fields for a tenant, add it to domain-procedure-
.xml file in tenants. Jesse's documentation has examples.
Chris M. discusses <include> tag attributes: strip-root, etc.
Yura describes adding field to template. Simple field. Only distinction: text input v select field type. Change .../bundles/core-messages.properties (message bundle) to create or change labels. Attributes get added by app layer.
As of 2.0, in tenants folder, core-message-properties.overlay adds to underlying bundle. Will overwrite value for a key in overlay that exists in default.
Yura demonstrates how to run UI layer locally, for development and debugging. Works only for default files in underlying UI source tree, not in minibuild
File:///path/to/defaults/page/htmlfolder/record.html?
Must change strict-origin policy in browser to allow local data to run.
CSPACE-3763 documents this. (Must do this to run tests, too.)
Adds .csc-objectexit-newfield and ...newfield-label to objectexit html, config, uispec, uischema and core-messages.properties files.
(BREAK).