Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

feat!: Add ability to store breakpoint data in firebase realtime database #1076

Merged
merged 4 commits into from
May 12, 2022

Conversation

mctavish
Copy link
Contributor

@mctavish mctavish commented May 11, 2022

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1071 🦕

mctavish and others added 3 commits May 5, 2022 11:19
…ase (#1067)

* Checkpoint on Firebase controller.

Error handling and tests still need work.

* Move api key and db url to the client's control

* Some changes to work with the cli implementation

- We now use a top level 'cdbg' node
- Add timestamp with breakpoint is finalized
- When a snapshot triggers, a separate node is used for the complete
  snapshot data under final.

* Fix tests that relied on debuglet.stop().

Also disable the tests that aren't working yet, and remove a bunch of console.log messages.

* Use underscores in label keys.

* Replace console.log with util.debuglog.

Co-authored-by: Jason Borg <jcborg@google.com>
* Fix and re-enable previously broken tests
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. labels May 11, 2022
This will provide a consistent log level throughout the codebase.
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #1076 (c236f35) into main (a4add51) will decrease coverage by 0.75%.
The diff coverage is 70.39%.

@@            Coverage Diff             @@
##             main    #1076      +/-   ##
==========================================
- Coverage   66.86%   66.11%   -0.76%     
==========================================
  Files          20       21       +1     
  Lines        1648     1750     +102     
  Branches      335      352      +17     
==========================================
+ Hits         1102     1157      +55     
- Misses        469      510      +41     
- Partials       77       83       +6     
Impacted Files Coverage Δ
src/agent/config.ts 100.00% <ø> (ø)
src/index.ts 83.33% <57.14%> (-11.41%) ⬇️
src/agent/debuglet.ts 78.22% <67.74%> (-2.28%) ⬇️
src/agent/firebase-controller.ts 68.05% <68.05%> (ø)
src/agent/oneplatform-controller.ts 75.23% <75.23%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4add51...c236f35. Read the comment docs.

@mctavish mctavish requested review from jasonborg and bcoe May 11, 2022 19:59
@mctavish mctavish marked this pull request as ready for review May 11, 2022 20:00
@mctavish mctavish requested review from a team as code owners May 11, 2022 20:00
import * as stackdriver from '../types/stackdriver';

const BREAKPOINT_ACTION_MESSAGE =
'The only currently supported breakpoint actions' + ' are CAPTURE and LOG.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think two strings need to be appended together here, confused me slightly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cute. I'll fix that later; I assume that the linter moved the linebreak and it's solidly nonsense now.

@mctavish
Copy link
Contributor Author

Thanks for the reviews!

@mctavish mctavish merged commit 4bbcc10 into main May 12, 2022
@mctavish mctavish deleted the firebase-backend branch May 12, 2022 22:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. size: xl Pull request size is extra large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to store breakpoint data in firebase realtime database
3 participants