Skip to content

Fbe::Iterate documents a quota_aware DSL method that does not exist #629

Description

@morphqdd

What Happens

The YARD documentation examples for both Fbe.iterate and Fbe::Iterate in lib/fbe/iterate.rb (lines 35 and 74) show:

Fbe.iterate do
  as 'issues_iterator'
  by '...'
  repeats 5
  quota_aware
  over do |repository_id, issue_id| ... end
end

But Fbe::Iterate only defines quota_unaware (quota-awareness is already the default; there is no positive-form setter). Calling quota_aware inside the block, exactly as documented, raises an error.

Verified by writing a standalone repro following the doc example verbatim and running it:

cd ~/zerocrasy/fbe && nix-shell ~/zerocrasy/shell.nix --run \
  "BUNDLE_GEMFILE=~/zerocrasy/fbe/Gemfile bundle exec ruby -I lib repro_quota_aware.rb"

Output: Some other error: NameError: undefined local variable or method 'quota_aware' for an instance of Fbe::Iterate

This is the identical bug pattern as the already-fixed issue #479 ("Fbe::Iterate documents a since DSL keyword that does not exist"), same file, same root cause, just a different keyword nobody caught that time.

What Should Happen

Either add a no-op quota_aware method to Fbe::Iterate (matching the pattern already used for lifetime_unaware/timeout_unaware), or fix the two doc examples to drop the bogus call, so the documented usage actually works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions