Skip to content

Conversation

@jscheffl
Copy link
Contributor

While committing to #51050 I realized that breeze was broken as a result of newer click integration - wondering why this was un-detected. I catched it with pre-commit run -a check-breeze-top-dependencies-limited

Exception I saw:

(airflow) jscheffl@hp860g9:~/Workspace/airflow$ pre-commit run -a check-breeze-top-dependencies-limited
Check top-level breeze deps..............................................Failed
- hook id: check-breeze-top-dependencies-limited
- exit code: 1

Traceback (most recent call last):
  File "/home/jscheffl/Workspace/airflow/dev/breeze/src/airflow_breeze/breeze.py", line 54, in <module>
    main()
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1362, in main
    with self.make_context(prog_name, args, **extra) as ctx:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1186, in make_context
    self.parse_args(ctx, args)
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1786, in parse_args
    rest = super().parse_args(ctx, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1197, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 2416, in handle_parse_result
    value = self.process_value(ctx, value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 2355, in process_value
    value = self.callback(ctx, self, value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/decorators.py", line 539, in show_help
    echo(ctx.get_help(), color=ctx.color)
         ^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 730, in get_help
    return self.command.get_help(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1064, in get_help
    self.format_help(ctx, formatter)
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1104, in format_help
    self.format_options(ctx, formatter)
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1751, in format_options
    super().format_options(ctx, formatter)
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 1135, in format_options
    rv = param.get_help_record(ctx)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 2796, in get_help_record
    rv = [_write_opts(self.opts)]
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 2792, in _write_opts
    rv += f" {self.make_metavar(ctx=ctx)}"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jscheffl/.cache/pre-commit/repoymx7_s7n/py_env-python3/lib/python3.12/site-packages/click/core.py", line 2212, in make_metavar
    metavar = self.type.get_metavar(param=self, ctx=ctx)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: CacheableChoice.get_metavar() got an unexpected keyword argument 'ctx'
Breeze should only use limited dependencies when imported (see errors above).

Please make sure you only use local imports for new dependencies in breeze.

The only top-level dependencies should be `rich` and `click'

@jscheffl jscheffl added backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch backport-to-v2-11-test Mark PR with this label to backport to v2-11-test branch labels May 25, 2025
@jscheffl jscheffl merged commit e7a90d6 into apache:main May 25, 2025
99 checks passed
github-actions bot pushed a commit that referenced this pull request May 25, 2025
)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request May 25, 2025
…1051)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
@github-actions
Copy link

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

@github-actions
Copy link

Backport successfully created: v2-11-test

Status Branch Result
v2-11-test PR Link

github-actions bot pushed a commit to guan404ming/airflow that referenced this pull request May 25, 2025
…che#51051)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request May 25, 2025
…ache#51051)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request May 25, 2025
…che#51051)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
jscheffl added a commit that referenced this pull request May 25, 2025
…1051) (#51054)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
jscheffl added a commit that referenced this pull request May 25, 2025
) (#51053)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
dadonnelly316 pushed a commit to dadonnelly316/airflow that referenced this pull request May 26, 2025
kaxil pushed a commit that referenced this pull request Jun 3, 2025
) (#51053)

(cherry picked from commit e7a90d6)

Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
jose-lehmkuhl pushed a commit to jose-lehmkuhl/airflow that referenced this pull request Jul 11, 2025
@jscheffl jscheffl deleted the bugfix/breeze-ctx-kwargs-with-click branch October 5, 2025 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v2-11-test Mark PR with this label to backport to v2-11-test branch backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants