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

[Bug] dbt retry does not work for dbt docs generate #10741

Open
2 tasks done
jordivandooren opened this issue Sep 19, 2024 · 1 comment · May be fixed by #10742
Open
2 tasks done

[Bug] dbt retry does not work for dbt docs generate #10741

jordivandooren opened this issue Sep 19, 2024 · 1 comment · May be fixed by #10742
Labels
bug Something isn't working

Comments

@jordivandooren
Copy link

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Running dbt retry after dbt docs generate, raises an error:

click.exceptions.NoSuchOption: No such option: --no-empty-catalog

or

click.exceptions.NoSuchOption: No such option: --no-static

Expected Behavior

The absence of the static flag should not be translated into the (non-existent) --no-static. It should be treated as absent.

The same goes for empty_catalog.

Steps To Reproduce

  1. In a default starter project (e.g. using dbt-postgres)
  2. After running dbt docs generate (without --static or --empty_catalog flags)
  3. Running dbt retry returns in a NoSuchOptions error relating to the non-existent --no-static or --no-empty-catalog flag.

Relevant log output

No response

Environment

- OS: Ubuntu 22.04
- Python: 3.11
- dbt: v1.8.6

Which database adapter are you using with dbt?

No response

Additional Context

No response

@jordivandooren jordivandooren added bug Something isn't working triage labels Sep 19, 2024
@dbeatty10
Copy link
Contributor

Thanks for reporting this and raising the associated PR @jordivandooren !

Reprex

Create these files:

models/my_model.sql

select 1 as id

Run these commands:

dbt docs generate
dbt retry

💥 Get this stacktrace containing the error:

$ dbt retry        
20:17:59  Running with dbt=1.8.6
20:17:59  Encountered an error:
No such option: --no-static
20:17:59  Traceback (most recent call last):
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/requires.py", line 138, in wrapper
    result, success = func(*args, **kwargs)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/requires.py", line 101, in wrapper
    return func(*args, **kwargs)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/requires.py", line 218, in wrapper
    return func(*args, **kwargs)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/requires.py", line 247, in wrapper
    return func(*args, **kwargs)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/requires.py", line 294, in wrapper
    return func(*args, **kwargs)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/main.py", line 594, in retry
    task = RetryTask(
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/task/retry.py", line 107, in __init__
    retry_flags = Flags.from_dict(cli_command, combined_args)  # type: ignore
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/flags.py", line 356, in from_dict
    ctx = args_to_context(command_arg_list)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/dbt/cli/flags.py", line 79, in args_to_context
    sub_command_ctx = sub_command.make_context(sub_command_name, args)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/click/core.py", line 943, in make_context
    self.parse_args(ctx, args)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/click/core.py", line 1405, in parse_args
    opts, args, param_order = parser.parse_args(args=args)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/click/parser.py", line 337, in parse_args
    self._process_args_for_options(state)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/click/parser.py", line 364, in _process_args_for_options
    self._process_opts(arg, state)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/click/parser.py", line 514, in _process_opts
    self._match_long_opt(norm_long_opt, explicit_value, state)
  File "/Users/dbeatty/projects/environments/dbt_1.8/lib/python3.10/site-packages/click/parser.py", line 398, in _match_long_opt
    raise NoSuchOption(opt, possibilities=possibilities, ctx=self.ctx)
click.exceptions.NoSuchOption: No such option: --no-static

✅ Running these same commands against #10742 worked

@dbeatty10 dbeatty10 removed the triage label Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants