question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`airflow pools set` fails with argparse error

See original GitHub issue

Apache Airflow version: 1.10.14 and 1.10.15

Environment:

  • Cloud provider or hardware configuration: Docker
  • OS (e.g. from /etc/os-release): apache/airflow:1.10.15-python3.8
  • Install tools: poetry

What happened:

Based on a warning from Airflow, I decided to change from

airflow pool -s mypoolname 2 mypooldesc

to

airflow pools set mypoolname 2 mypooldesc

The first command was successful while the second resulted in the following error:

airflow_1   | Traceback (most recent call last):
airflow_1   |   File "/home/airflow/.local/bin/airflow", line 37, in <module>
airflow_1   |     args.func(args)
airflow_1   |   File "/home/airflow/.local/lib/python3.8/site-packages/airflow/bin/cli.py", line 302, in pool_set
airflow_1   |     _pool_wrapper(args, set=(args.name, args.slots, args.description))
airflow_1   | AttributeError: 'Namespace' object has no attribute 'name'

What you expected to happen:

I expected it to have the same effect as running the to-be-deprecated version.

How to reproduce it:

  1. Start up Airflow
  2. Attempt to create a pool using airflow pools set <name> <number of slots> <description>

Anything else we need to know:

The error occurs consistently. Switching back to the to-be-deprecated version works every time.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
XD-DENGcommented, Mar 24, 2021

Hi @lordozb here you go.

1reaction
lordozbcommented, Mar 24, 2021

@kaxil Is it okay if you assign this to me?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GitHub] [airflow] lordozb commented on issue #14940: `airflow ...
[GitHub] [airflow] lordozb commented on issue #14940: `airflow pools set` fails with argparse error · GitBox Sun, 28 Mar 2021 03:18:13 -0700.
Read more >
airflow/cli/cli_parser.py - Google Git
from argparse import Action, ArgumentError, RawTextHelpFormatter ... help=("if set, the backfill will set tasks as failed without retrying."),.
Read more >
Airflow webserver not starting in 1.10 - Stack Overflow
If I kill the process with kill process it will automatically create a new one. The error remains the same. I need to...
Read more >
Package google.cloud.orchestration.airflow.service.v1beta1
The environment has encountered an error and cannot be used. EnvironmentConfig. Configuration information for an environment.
Read more >
airflow/bin/cli.py · Mr_Wuuuuuuu/airflow-1.10.11 - Gitee.com
import argparse. import requests. import tenacity. from builtins import input. from tempfile import NamedTemporaryFile. import json.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found