Skip to content

Fix breeze build_params attribute access#23691

Closed
o-nikolas wants to merge 1 commit into
apache:mainfrom
o-nikolas:onikolas/breeze_build_params_fix
Closed

Fix breeze build_params attribute access#23691
o-nikolas wants to merge 1 commit into
apache:mainfrom
o-nikolas:onikolas/breeze_build_params_fix

Conversation

@o-nikolas

Copy link
Copy Markdown
Contributor

While running breeze locally I was getting an exception (see below). It seems to be related to changes made in #23562. The changes in this PR fix the issue.

breeze start-airflow --forward-credentials restart --backend postgres --db-reset
...

Resource check successful.

Traceback (most recent call last):
  File "/home/ANT.AMAZON.COM/onikolas/.local/bin/breeze", line 33, in <module>
    sys.exit(load_entry_point('apache-airflow-breeze', 'console_scripts', 'breeze')())
  File "/home/ANT.AMAZON.COM/onikolas/.local/pipx/venvs/apache-airflow-breeze/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/ANT.AMAZON.COM/onikolas/.local/pipx/venvs/apache-airflow-breeze/lib/python3.8/site-packages/rich_click/rich_group.py", line 21, in main
    return super().main(*args, standalone_mode=False, **kwargs)
  File "/home/ANT.AMAZON.COM/onikolas/.local/pipx/venvs/apache-airflow-breeze/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/ANT.AMAZON.COM/onikolas/.local/pipx/venvs/apache-airflow-breeze/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ANT.AMAZON.COM/onikolas/.local/pipx/venvs/apache-airflow-breeze/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ANT.AMAZON.COM/onikolas/.local/pipx/venvs/apache-airflow-breeze/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/ANT.AMAZON.COM/onikolas/code/oss/airflow/airflow/dev/breeze/src/airflow_breeze/commands/developer_commands.py", line 340, in start_airflow
    enter_shell(
  File "/home/ANT.AMAZON.COM/onikolas/code/oss/airflow/airflow/dev/breeze/src/airflow_breeze/commands/developer_commands.py", line 578, in enter_shell
    return run_shell_with_build_image_checks(verbose, dry_run, enter_shell_params)
  File "/home/ANT.AMAZON.COM/onikolas/code/oss/airflow/airflow/dev/breeze/src/airflow_breeze/commands/developer_commands.py", line 598, in run_shell_with_build_image_checks
    rebuild_ci_image_if_needed(build_params=shell_params, dry_run=dry_run, verbose=verbose)
  File "/home/ANT.AMAZON.COM/onikolas/code/oss/airflow/airflow/dev/breeze/src/airflow_breeze/commands/ci_image_commands.py", line 531, in rebuild_ci_image_if_needed
    get_console().print(f'[warning]{build_params.image_type} image not built locally. Forcing build.[/]')
AttributeError: 'ShellParams' object has no attribute 'image_type'

^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragement file, named {pr_number}.significant.rst, in newsfragments.

@potiuk

potiuk commented May 13, 2022

Copy link
Copy Markdown
Member

AH no ... the other way round it should be :)

@potiuk

potiuk commented May 13, 2022

Copy link
Copy Markdown
Member

Better fix here: #23696

@potiuk potiuk closed this May 13, 2022
@potiuk

potiuk commented May 13, 2022

Copy link
Copy Markdown
Member

It was just not fully completed rename :(. Unfortunately Python refactoring is not always perfect and I forgot to check this one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants