uq-os opened a new issue, #56230:
URL: https://github.com/apache/airflow/issues/56230

   ### Apache Airflow version
   
   3.1.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   I tried to run a backfill using the CLI. I get the following error.
   
   ```
   (flux_raw) λ  flux_raw git:(flux-raw) ✗ airflow backfill create --dag-id 
example_dag \
         --from-date 2024-01-16 \
         --to-date 2024-01-17 \
         --dag-run-conf '{"example_key": "example_value"}'
   [2025-09-25T15:45:33.922+1000] {providers_manager.py:953} INFO - The 
hook_class 'airflow.providers.standard.hooks.filesystem.FSHook' is not fully 
initialized (UI widgets will be missing), because the 'flask_appbuilder' 
package is not installed, however it is not required for Airflow components to 
work
   [2025-09-25T15:45:33.923+1000] {providers_manager.py:953} INFO - The 
hook_class 'airflow.providers.standard.hooks.package_index.PackageIndexHook' is 
not fully initialized (UI widgets will be missing), because the 
'flask_appbuilder' package is not installed, however it is not required for 
Airflow components to work
   [2025-09-25T15:45:33.980+1000] {workday.py:41} WARNING - Could not import 
pandas. Holidays will not be considered.
   Traceback (most recent call last):
     File "/Users/xxx/tern_code/flux_dag/flux_raw/.venv/bin/airflow", line 10, 
in <module>
       sys.exit(main())
                ~~~~^^
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/__main__.py",
 line 55, in main
       args.func(args)
       ~~~~~~~~~^^^^^^
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/cli/cli_config.py",
 line 48, in command
       return func(*args, **kwargs)
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/utils/cli.py",
 line 112, in wrapper
       return f(*args, **kwargs)
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/utils/providers_configuration_loader.py",
 line 55, in wrapped_function
       return func(*args, **kwargs)
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/cli/commands/backfill_command.py",
 line 73, in create_backfill
       _create_backfill(
       ~~~~~~~~~~~~~~~~^
           dag_id=args.dag_id,
           ^^^^^^^^^^^^^^^^^^^
       ...<5 lines>...
           reprocess_behavior=reprocess_behavior,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       )
       ^
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/models/backfill.py",
 line 488, in _create_backfill
       _create_backfill_dag_run(
       ~~~~~~~~~~~~~~~~~~~~~~~~^
           dag=dag,
           ^^^^^^^^
       ...<5 lines>...
           session=session,
           ^^^^^^^^^^^^^^^^
       )
       ^
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/models/backfill.py",
 line 332, in _create_backfill_dag_run
       dr = dag.create_dagrun(
           run_id=DagRun.generate_run_id(
       ...<11 lines>...
           session=session,
       )
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/utils/session.py",
 line 99, in wrapper
       return func(*args, **kwargs)
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/models/dag.py",
 line 1584, in create_dagrun
       copied_params.update(conf)
       ~~~~~~~~~~~~~~~~~~~~^^^^^^
     File 
"/Users/xxx/tern_code/flux_dag/flux_raw/.venv/lib/python3.13/site-packages/airflow/sdk/definitions/param.py",
 line 234, in update
       super().update(*args, **kwargs)
       ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
     File "<frozen _collections_abc>", line 992, in update
   ValueError: not enough values to unpack (expected 2, got 1)
   ```
   
   ### What you think should happen instead?
   
   The CLI should have created a backfill for my DAG. I tested the same setup 
executed using the web UI and was able to sucesfully launch a job. 
   
   I noticed that my configuration is a string in the update function when 
submitted via CLI, however when submitted via the UI this configuration is a 
dictionary at this stage.
   
   To do this I monkeypatched the update function that its failing on 
(`airflow/sdk/definitions/param.py:234`) with this (added a value error)
   ```
       def update(self, *args, **kwargs) -> None:
           if len(args) == 1 and not kwargs and isinstance(args[0], ParamsDict):
               return super().update(args[0].__dict)
           
           raise ValueError((*args,args, type(args[0])))
           super().update(*args, **kwargs)
   ```
   
   Then submit backfill jobs via the CLI and via the UI. You will see `class 
'str'` for the CLI submission and `class 'dict'` for the UI submission
   
   ### How to reproduce
   
   Run the following command
   
   ```bash
   airflow backfill create --dag-id example_dag \
         --from-date 2024-01-16 \
         --to-date 2024-01-17 \
         --dag-run-conf '
           {
               "example_key": "example_value"
           }
       '
   ```
   
   ### Operating System
   
   OSX 15.7
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   run using `airflow standalone`
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to