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

[CT-2924] [Bug] Retry does not construct flags properly for 0 valued parameter #8297

Closed
2 tasks done
ChenyuLInx opened this issue Aug 2, 2023 · 0 comments · Fixed by #8298
Closed
2 tasks done

[CT-2924] [Bug] Retry does not construct flags properly for 0 valued parameter #8297

ChenyuLInx opened this issue Aug 2, 2023 · 0 comments · Fixed by #8298
Assignees
Labels
backport 1.6.latest bug Something isn't working retry

Comments

@ChenyuLInx
Copy link
Contributor

ChenyuLInx commented Aug 2, 2023

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

Retry would fail if previous command run with --log-file-max-bytes 0 specified.

Expected Behavior

Retry properly get the behavior of --log-file-max-bytes 0

Steps To Reproduce

  1. In a dbt project, run dbt --log-file-max-bytes 0 run.
  2. run dbt retry

Relevant log output

20:12:53  Running with dbt=1.6.0
20:12:53  Registered adapter: postgres=1.6.0
20:12:53  Encountered an error:
No such option: --no-log-file-max-bytes
20:12:53  Traceback (most recent call last):
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/requires.py", line 87, in wrapper
    result, success = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/requires.py", line 72, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/requires.py", line 143, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/requires.py", line 172, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/requires.py", line 219, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/requires.py", line 259, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/main.py", line 608, in retry
    results = task.run()
              ^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/task/retry.py", line 94, in run
    retry_flags = Flags.from_dict(cli_command, self.previous_args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/flags.py", line 294, in from_dict
    ctx = args_to_context(command_arg_list)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/dbt-core/core/dbt/cli/flags.py", line 59, in args_to_context
    cli_ctx = cli.make_context(cli.name, args)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/site-packages/click/core.py", line 920, in make_context
    self.parse_args(ctx, args)
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/site-packages/click/core.py", line 1613, in parse_args
    rest = super().parse_args(ctx, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/site-packages/click/core.py", line 1375, in parse_args
    opts, args, param_order = parser.parse_args(args=args)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/site-packages/click/parser.py", line 337, in parse_args
    self._process_args_for_options(state)
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/site-packages/click/parser.py", line 364, in _process_args_for_options
    self._process_opts(arg, state)
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/site-packages/click/parser.py", line 514, in _process_opts
    self._match_long_opt(norm_long_opt, explicit_value, state)
  File "/Users/chenyuli/git/ide-server/ide-server/lib/python3.11/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-log-file-max-bytes
@ChenyuLInx ChenyuLInx added bug Something isn't working backport 1.6.latest labels Aug 2, 2023
@ChenyuLInx ChenyuLInx self-assigned this Aug 2, 2023
@github-actions github-actions bot changed the title [Bug] Retry does not construct flags properly for 0 valued parameter [CT-2924] [Bug] Retry does not construct flags properly for 0 valued parameter Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.6.latest bug Something isn't working retry
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants