question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Remove the need for "parent type"

See original GitHub issue

“Parent type” crops up in several places - girder_cli for one currently requires this flag and for collection download reports “download command only accepts parent-type of folder”. But it’s not like you really need it - there will never be a Mongo ID that matches both the collection and folder models. I suppose it is theoretically possible but not practically possible.

On a major version update can we revisit this to perhaps merge both concepts into one model (or a folder model with collection as an extension/subclass)? Collections (1) don’t have parents and (2) have extra metadata like quotas, but I believe otherwise behave like folders. The Girder UI could stay the same (i.e. they are still named Collections and Folders), and the parentType parameter could still be supported as a validation check of the expected type, but if absent, it queries a single folder/collection Mongo collection and returns whatever matches. Folders would also no longer need to keep track of whether they are in a folder or collection - they would just have a parent id.

I’m happy to hear the drawbacks of this approach but I feel it’s worth considering.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mantheycommented, Oct 20, 2016

On some API endpoints, we have a small set of possible models that the parent type can be. We could make it so if the parent type is not specified, that limited list of models is checked before we reject the passed ID.

1reaction
zachmullencommented, May 12, 2016

I like your first proposal:

you could simply define a collection as any folder without a parent

It doesn’t destroy any of our existing domain models that we’ve been presenting to users, and would simplify our server and client logic. What I find problematic is that it would actually necessitate your second proposal of removing the feature of user data space entirely. I think that’s actually a nice feature of Girder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mom of five warns: Proposal 3 would eliminate Michigan ...
Proposal 3 would revoke parental consent laws for abortions, allowing anybody to help teenage girls obtain abortions without their parents ...
Read more >
Identifying Barriers: Creating Solutions to Improve Family ...
Findings show that, generally, parents and school staff agree on barriers to parent involvement but offer contrasting solutions. While parent solutions directly ...
Read more >
Motion to Modify Child Custody and Support - Missouri Courts
Modification of the parenting plan will focus on circumstances of the child and/or child's custodial parent that have changed since the last court...
Read more >
Gov. Greg Abbott announces parental “bill of rights”
Abbott promises a “parental bill of rights” amendment to the Texas ... They can remove their child temporarily from a class or activity...
Read more >
Add a parent to your family group - Google For Families Help
Add or remove family members; Add or remove a second parent; Delete the family group; Subscribe to family services like the Google Play...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found