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.

Support threading arbitrary arguments through to IBuilder.

See original GitHub issue

Currently, IBuilder only takes in the Location as an argument. I proposed adding a Context object of some kind that can be used to thread global (immutable!) state through to all builders. This would permit scenarios as follows:

let myBuilder = foo {
    doSomething // can access "name" set below with value "dave"
}

let template = arm {
    set_context "name" "dave"
}

Linked to #592 - this would allow us to globally turn on or off default switches such as default identity etc.

Thoughts @ninjarobot ?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
MoeJwcommented, Apr 27, 2021

I think this might be also handy when configuring Common things between resources like Diagnostic -setting and alerts etc. enable them for all resources we deploy instead of just creating one for every resource… but this might not be an easy thing to do

1reaction
TheRSPcommented, Apr 27, 2021

@isaacabraham I think this would be useful. We currently have env parameter which we pass through to all builders. One thing I don’t quite understand is how we would make use of the parameter. Would we need to copy the whole BuildResources method?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing variable changes between threads in Python ...
When reading a variable, it is first searched inside the function and if not found, outside. That's why it's not necessary to put...
Read more >
How To Resolve Multi-Threading Problems
This article discussed a few ways to implement mutual exclusion and condition synchronization in multi-threaded C programs using POSIX threads.
Read more >
Notes on Numba's threading implementation
Notes on Numba's threading implementation¶. The execution of the work presented by the Numba parallel targets is undertaken by the Numba threading layer....
Read more >
Improving Performance with Threading
If you are using OpenMP* threading technology, you can use the environment variable OMP_NUM_THREADSto specify the number of threads or the equivalent OpenMP ......
Read more >
Thread (Java SE 20 & JDK 20)
A thread is a thread of execution in a program. The Java virtual machine allows an application to have multiple threads of execution...
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