This commit adds the pkg/lifecycle.Resource to help manage opening,
closing, and leasing out references to some resource. A resource
cannot be closed until all acquired references have been released.
If the debug_ref tag is enabled, all resource acquisitions keep
track of the stack trace that created them and have a finalizer
associated with them to print on stderr if they are leaked. It also
registers a handler on SIGUSR2 to dump all of the currently live
resources.
Having resources tracked in a uniform way with a data type allows us
to do more sophisticated tracking with the debug_ref tag, as well.
For example, we could panic the process if a resource cannot be
closed within a certain time frame, or attempt to figure out the
DAG of resource ownership dynamically.
This commit also fixes many issues around resources, correctness
during error scenarios, reporting of errors, idempotency of
close, tracking of memory for some data structures, resource leaks
in tests, and out of order dependency closes in tests.
* test(e2e/de): shows an error if a syntactically incorrect query is submitted
* chore(task/e2e): remove .only call in task tests
* test(e2e/de): remove dynamic testid
* refactor(e2e): remove the need to create a source before signing in
* refactor(e2e): move setup user into signin function
* fix(orgs): make assertions after org creation
* chore: package.lock
* WIP Introduce Resource List component family
* Shrink padding of resource cards a bit
* Swap positions of meta information and labels in resource cards
* Introduce resource name component
* Polish resource name editing
* Remove child type validation from context component
* Styles for context menus inside resource cards
* Make resource name + meta line responsive
* Polish appearance of responsive resource description
* Replace dashboards list with dashboards cards
* Update e2e tests and add testID props to a bunch of components
Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>
* Make testID props consistent
Make all cypress tests have .test extension
Update E2E tests for dashboards index
Split off test for dashboards view
Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>
* Move cell test to dashboards view test
Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>
* Remove cells test from dashboards index test
Co-Authored-By: Andrew Watkins <121watts@users.noreply.github.com>
* Fix dashboard view - cells e2e test
* Refactor meta1 and meta2 props into a single metadata prop that returns an array of elements
* Cleanup
* Fix and refactor e2e test to be less brittle