hundreds-breakfast-49010
01/17/2020, 9:04 PMsome_rule
is doing to wind up a Task
node, right?aloof-angle-91616
01/17/2020, 9:05 PMaloof-angle-91616
01/17/2020, 9:05 PMsrc/python/pants/engine/rules.py
you can see how it goes:witty-crayon-22786
01/17/2020, 9:05 PMaloof-angle-91616
01/17/2020, 9:05 PM@rule => _make_rule() => TaskRule
aloof-angle-91616
01/17/2020, 9:06 PMhundreds-breakfast-49010
01/17/2020, 9:06 PMGraph::get
is going to be called with a src_id
argument whose EntryId
is the one that corresponds to some particular Node
that was generated in a particular spot where some_rule
is used, right?aloof-angle-91616
01/17/2020, 9:07 PMaloof-angle-91616
01/17/2020, 9:07 PMhundreds-breakfast-49010
01/17/2020, 9:07 PMGraph::get
worksaloof-angle-91616
01/17/2020, 9:07 PMwitty-crayon-22786
01/17/2020, 9:07 PMaloof-angle-91616
01/17/2020, 9:08 PMnode at the root of the graph is created@witty-crayon-22786 right now, is this equivalent to a
RootRule
?witty-crayon-22786
01/17/2020, 9:09 PMhundreds-breakfast-49010
01/17/2020, 9:09 PMget
takes three arguments - src_id
, a Context
, and dst_id
aloof-angle-91616
01/17/2020, 9:09 PMhundreds-breakfast-49010
01/17/2020, 9:09 PMsome_rule
is being executed by the enginewitty-crayon-22786
01/17/2020, 9:09 PMhundreds-breakfast-49010
01/17/2020, 9:10 PMget
where the src_id
is the Node
that represents this invocation of some_rule
, and dst_id
is the Node
that represents the ExecuteProcessRequest
intrinsic?aloof-angle-91616
01/17/2020, 9:11 PMat some pointwhat point are you thinking of?
aloof-angle-91616
01/17/2020, 9:11 PMhundreds-breakfast-49010
01/17/2020, 9:12 PMwitty-crayon-22786
01/17/2020, 9:12 PMwitty-crayon-22786
01/17/2020, 9:12 PMhundreds-breakfast-49010
01/17/2020, 9:13 PMaloof-angle-91616
01/17/2020, 9:13 PMwitty-crayon-22786
01/17/2020, 9:13 PMhundreds-breakfast-49010
01/17/2020, 9:13 PMhundreds-breakfast-49010
01/17/2020, 9:14 PM@rule
internally calls await Get[Something]
witty-crayon-22786
01/17/2020, 9:14 PMhundreds-breakfast-49010
01/17/2020, 9:14 PMNode
providing InputType
before this rule can runhundreds-breakfast-49010
01/17/2020, 9:14 PMaloof-angle-91616
01/17/2020, 9:14 PMTask/Thread-local variables.100000% agree
hundreds-breakfast-49010
01/17/2020, 9:14 PMhundreds-breakfast-49010
01/17/2020, 9:15 PMhundreds-breakfast-49010
01/17/2020, 9:15 PMhundreds-breakfast-49010
01/17/2020, 9:15 PMaloof-angle-91616
01/17/2020, 9:17 PMaloof-angle-91616
01/17/2020, 9:17 PMwitty-crayon-22786
01/17/2020, 9:17 PMhundreds-breakfast-49010
01/17/2020, 9:18 PMworkunit_store
code is using the task_local!
macro to set a static TASK_PARENT_ID
variable, and updating it in `set_parent_id`/`get_parent_id`aloof-angle-91616
01/17/2020, 9:18 PMaloof-angle-91616
01/17/2020, 9:18 PMwitty-crayon-22786
01/17/2020, 9:18 PMhundreds-breakfast-49010
01/17/2020, 9:19 PM<http://nodes.rs|nodes.rs>
, but I still wound up with parents ids not being set when child nodes needed to read themhundreds-breakfast-49010
01/17/2020, 9:19 PMhundreds-breakfast-49010
01/17/2020, 9:20 PM<http://logger.rs|logger.rs>
is invocing thread_local!
aloof-angle-91616
01/17/2020, 9:20 PMbut I still wound up with parents ids not being set when child nodes needed to read themif you can give brief steps to repro we might be able to look into it
hundreds-breakfast-49010
01/17/2020, 9:20 PMtask_local
hundreds-breakfast-49010
01/17/2020, 9:20 PMhundreds-breakfast-49010
01/17/2020, 9:22 PMhundreds-breakfast-49010
01/17/2020, 9:23 PM./pants test tests/python/pants_test/engine:engine
has a new test I added to exercise correct workunit parent ID setting, it's currently failinghundreds-breakfast-49010
01/17/2020, 9:23 PMassert 1 ==2
line, but it's also not actually doing the right thing to begin wihtwitty-crayon-22786
01/17/2020, 9:24 PMwitty-crayon-22786
01/17/2020, 9:24 PMhundreds-breakfast-49010
01/17/2020, 9:34 PMhundreds-breakfast-49010
01/17/2020, 9:34 PMhundreds-breakfast-49010
01/17/2020, 9:35 PMwitty-crayon-22786
01/17/2020, 9:35 PMhundreds-breakfast-49010
01/17/2020, 9:35 PMthread_local
and task_local
hundreds-breakfast-49010
01/17/2020, 9:36 PMwitty-crayon-22786
01/17/2020, 9:36 PMwitty-crayon-22786
01/17/2020, 9:36 PMhundreds-breakfast-49010
01/17/2020, 9:37 PMset_destination
and get_destination
right?hundreds-breakfast-49010
01/17/2020, 9:37 PMworkunit_store
crate and just want all the workunit related code to live with logginghundreds-breakfast-49010
01/17/2020, 9:37 PMwitty-crayon-22786
01/17/2020, 9:37 PMhundreds-breakfast-49010
01/17/2020, 9:37 PMhundreds-breakfast-49010
01/17/2020, 9:38 PMtask_executor
is making sure this gets called by invoking future_with_correct_logging_context
witty-crayon-22786
01/17/2020, 9:39 PMhundreds-breakfast-49010
01/17/2020, 9:39 PMset_destination
directlyhundreds-breakfast-49010
01/17/2020, 9:39 PMworkunit_store
methodswitty-crayon-22786
01/17/2020, 9:40 PMfuture_with_correct_context
witty-crayon-22786
01/17/2020, 9:40 PMhundreds-breakfast-49010
01/17/2020, 9:41 PMtask_executor
can import workunit_store
hundreds-breakfast-49010
01/17/2020, 10:05 PM