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.

Manually specify request parent

See original GitHub issue

Currently the only way to set the parent for a request is to modify the request_context threadlocal.

Should we support specifying an alternate parent ID when using the SystemClient? Specifically should we modify _construct_bg_request to accept a _parent kwarg?

We should definitely continue doing what we currently do, this would be more of an override.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hazmat345commented, Oct 16, 2019

From what I can tell the use-case is a standalone script that is using a SystemClient to do multiple things, and subsequent requests should logically be children of a request that happens earlier in the script. But since the later requests don’t actually occur during processing of the initial request they are top-level.

I agree - I’m not opposed to adding this since it’s pretty easy to implement, doesn’t really break anything, and it’s actually possible to implement yourself already if you manually set the request_context (that’s just gross).

I do think this is a “you should know what you’re doing” type of feature - if you’re using it you should understand that the failure case you mentioned is a possibility and account for it.

0reactions
loganasherjonescommented, Nov 19, 2019

@hazmat345 my vote is the _parent_id just because its more flexible.

@TheBurchLog if we allow invalid parent ID’s then it’s going to be tricky to know what the “obvious and right” thing to do is when we go to clean up a request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Approve what kids buy with Ask to Buy - Apple Support
If the family organiser declines the request, no purchase or download will take place. ... Select Set as Parent/Guardian, then click Done.
Read more >
[Feature] Parent Requests · Issue #447 · Kong/insomnia - GitHub
If we have requests A , B , C and want to set authentication for A and B and set default headers for...
Read more >
Closed Request Item not Closing Parent Request - ServiceNow
I can manually set the request item to closed in the workflow, however it does not automatically close the parent request.
Read more >
Downstream pipelines - GitLab Docs
Parent -child pipelines. A parent pipeline is a pipeline that triggers a downstream pipeline in the same project. The downstream pipeline is called...
Read more >
Track custom operations with Application Insights .NET SDK
This article covers a few patterns that might require manual ... then operation B is set as a parent for A. An operation...
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