Closed celeen closed 4 years ago
Good catch! That is indeed a bug. I recently relaxed the requirement that books could only have section children (https://github.com/braintree/runbook/commit/fe95e81300c49c73e0bbd7b1b470096772936b04) in order to reduce unnecessary boilerplate when creating runbooks. I think that it makes sense to update the gsub to accommodate top-level steps. Are you interested in creating a PR to resolve this? Otherwise I can get to it shortly.
I'd be happy to take a stab at it!
@kexline4710 and I ran into what seems like a bug- when going through a runbook, and telling a step to skip, the step then executed. We dug into the code, and found that this unexpected behavior is happening because we have defined a relatively short runbook with steps only- no surrounding sections. This line assumes that a step will have a surrounding section.
I have also run into the restriction before, that while Runbook can nest entities generally, it cannot nest Steps (without using composition). This suggests to me that the tool is designed with the intention that Steps should always have a parent Section.
We propose that either the
#gsub
in the linked line be changed to accommodate top-level step, or the Runbook library enforce the need for top-level sections more explicitly.