Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add domain to reactlog for context exit #2180

Merged
merged 3 commits into from Sep 18, 2018

Conversation

schloerke
Copy link
Collaborator

Fixes #2177

The domain being saved when the context was exiting is not properly saved when a top level context is exiting.

The errors received in #2177 were due to a NULL session token. When only looking at a single session, this was not an issue. When looking at the result of multiple sessions, either session would improperly capture the extra exits being generated in the global session space (when they are really session specific).

Regular, single session exit tokens done in a session only. The default global domain token is not being captured properly, while the local .domain$token value is captured correctly.

$id
[1] "4"

$token
[1] "8af79d835e15cbc31cb8d28f2fe79cea"

$defaultToken
[1] "8af79d835e15cbc31cb8d28f2fe79cea"

$id
[1] "3"

$token
[1] "8af79d835e15cbc31cb8d28f2fe79cea"

$defaultToken
[1] "8af79d835e15cbc31cb8d28f2fe79cea"

$id
[1] "2"

$token
[1] "8af79d835e15cbc31cb8d28f2fe79cea"

$defaultToken
NULL

$id
[1] "5"

$token
[1] "8af79d835e15cbc31cb8d28f2fe79cea"

$defaultToken
NULL

@schloerke
Copy link
Collaborator Author

Code to see missing exit domain tokens..

shiny:::.graphStack$as_list() %>% 
  Filter(f = function(x) {x$action %in% c("enter", "exit")}) %>% 
  lapply(function(x) { x$session <- x$session %||% "NULL"; x}) %>% 
  dplyr::bind_rows() %>% 
  as.data.frame() 
-> a

print(dplyr::filter(a, action == "enter")); print(dplyr::filter(a, action == "exit"))
  action id                          session       time
1  enter  2 5753a1c582196b6d6223ba700f9f2bd4 1536603581
2  enter  3 5753a1c582196b6d6223ba700f9f2bd4 1536603581
3  enter  4 5753a1c582196b6d6223ba700f9f2bd4 1536603581
4  enter  5 5753a1c582196b6d6223ba700f9f2bd4 1536603581
5  enter  7 b77cba493f47b2362ddcaa2ceb700801 1536603598
6  enter  8 b77cba493f47b2362ddcaa2ceb700801 1536603598
7  enter  9 b77cba493f47b2362ddcaa2ceb700801 1536603598
8  enter 10 b77cba493f47b2362ddcaa2ceb700801 1536603598
  action id                          session       time
1   exit  4 5753a1c582196b6d6223ba700f9f2bd4 1536603581
2   exit  3 5753a1c582196b6d6223ba700f9f2bd4 1536603581
3   exit  2                             NULL 1536603581
4   exit  5                             NULL 1536603581
5   exit  9 b77cba493f47b2362ddcaa2ceb700801 1536603598
6   exit  8 b77cba493f47b2362ddcaa2ceb700801 1536603598
7   exit  7                             NULL 1536603598
8   exit 10                             NULL 1536603598

@jcheng5 jcheng5 modified the milestone: 1.2 Sep 14, 2018
@jcheng5 jcheng5 assigned schloerke and unassigned jcheng5 Sep 17, 2018
@schloerke schloerke merged commit f5a2382 into rstudio:master Sep 18, 2018
@schloerke schloerke deleted the barret-bug-blank-reactlog branch September 18, 2018 16:23
schloerke added a commit to schloerke/shiny that referenced this pull request Sep 18, 2018
schloerke added a commit that referenced this pull request Sep 18, 2018
* news item for #2180

* fix news item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants