Page MenuHomePhabricator

Store Almanac "service types" instead of "service classes"
ClosedPublic

Authored by epriestley on Feb 25 2016, 2:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 11:53 PM
Unknown Object (File)
Thu, Apr 11, 8:09 AM
Unknown Object (File)
Wed, Apr 10, 4:13 AM
Unknown Object (File)
Sat, Apr 6, 11:41 AM
Unknown Object (File)
Sun, Mar 31, 9:37 AM
Unknown Object (File)
Fri, Mar 29, 4:37 PM
Unknown Object (File)
Thu, Mar 28, 9:08 PM
Unknown Object (File)
Mar 5 2024, 9:24 AM
Subscribers

Details

Summary

Ref T10449. Currently, we store classes (like "AlmanacClusterRepositoryServiceType") in the database.

Instead, store types (like "cluster.repository").

This is a small change, but types are a little more flexible (they let us freely reanme classes), a little cleaner (fewer magic strings in the codebase), and a little better for API usage (they're more human readable).

Make this minor usability change now, before we unprototype.

Also make services searchable by type.

Also remove old Almanac API endpoints.

Test Plan
  • Ran migration, verified all data migrated properly.
  • Created, edited, rebound, and changed properties of services.
  • Searched for services by service type.
  • Reviewed available Conduit methods.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Store Almanac "service types" instead of "service classes".
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

@yelirekim, if it's helpful, API impact probably doesn't affect you, but:

  • AlmanacServiceQuery->withServiceClasses(...) becomes withServiceTypes(...).
  • Pass XServiceType::SERVICETYPE instead of "XServiceType".
  • Any extension service types need a SERVICETYPE constant (you probably (?) don't have any).
  • almanac.* API endpoints have moved (you probably (?) don't use these).
  • Add some API support for Phacility use cases.
  • Additional API updates, primiarily for Phacility use cases.
chad edited edge metadata.
This revision is now accepted and ready to land.Feb 25 2016, 4:59 PM

I'm following these because I've frankensteined the existing working-copy and hosts blueprints into one megablueprint, mainly because we run one build per machine, and we run a lot of them.

I suspect this is abnormal, and is going to break in bad ways at some point.

We'll probably support that kind of thing upstream at some point, I just didn't want to add five different kinds of limits in the first iteration.

This revision was automatically updated to reflect the committed changes.