**Apache Airflow version**: 2.0.1


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`): No

**Environment**:

- **Cloud provider or hardware configuration**: local machine
- **OS** (e.g. from /etc/os-release): 18.04.5 LTS (Bionic Beaver)
- **Kernel** (e.g. `uname -a`): wsl2

**What happened**:
Getting Pickled_id: None

```
root@12c7fd58e084:/opt/airflow# airflow tasks run example_bash_operator runme_0 now --ship-dag --interactive
[2021-05-09 13:11:33,247] {dagbag.py:487} INFO - Filling up the DagBag from /files/dags
Running <TaskInstance: example_bash_operator.runme_0 2021-05-09T13:11:31.788923+00:00 [None]> on host 12c7fd58e084
Pickled dag <DAG: example_bash_operator> as pickle_id: None
Sending to executor.
[2021-05-09 13:11:34,722] {base_executor.py:82} INFO - Adding to queue: ['airflow', 'tasks', 'run', 'example_bash_operator', 'runme_0', '2021-05-09T13:11:31.788923+00:00', '--local', '--pool', 'default_pool', '--subdir', '/opt/airflow/airflow/example_dags/example_bash_operator.py']
[2021-05-09 13:11:34,756] {local_executor.py:81} INFO - QueuedLocalWorker running ['airflow', 'tasks', 'run', 'example_bash_operator', 'runme_0', '2021-05-09T13:11:31.788923+00:00', '--local', '--pool', 'default_pool', '--subdir', '/opt/airflow/airflow/example_dags/example_bash_operator.py']
[2021-05-09 13:11:34,757] {local_executor.py:386} INFO - Shutting down LocalExecutor; waiting for running tasks to finish.  Signal again if you don't want to wait.
[2021-05-09 13:11:34,817] {dagbag.py:487} INFO - Filling up the DagBag from /opt/airflow/airflow/example_dags/example_bash_operator.py
Running <TaskInstance: example_bash_operator.runme_0 2021-05-09T13:11:31.788923+00:00 [None]> on host 12c7fd58e084
```

**What you expected to happen**:

Pickled_id should get generated 

```
Pickled dag <DAG: example_bash_operator> as pickle_id: None
```

**How to reproduce it**:
run below command from command line in airflow environment
```
airflow tasks run example_bash_operator runme_0 now --ship-dag --interactive
```
**Would like to submit PR for this issue**: YES


airflow/cli/commands/task_command.py
.filter(DagRun.run_id == args.execution_date_or_run_id, DagRun.dag_id == args.dag_id)
        .one_or_none()
    )
    if not dag_run:
        try:
            execution_date = timezone.parse(args.execution_date_or_run_id)
            dag_run = (
                session.query(DagRun)
                .filter(DagRun.execution_date == execution_date, DagRun.dag_id == args.dag_id)
                .one_or_none()
            )
        except (ParserError, TypeError) as err:
            raise AirflowException(f"Error parsing the supplied execution_date. Error: {str(err)}")
    if dag_run is None:
        raise AirflowException("DagRun does not exist.")
    tis = dag_run.get_task_instances()
    AirflowConsole().print_as(
        data=tis,
        output=args.output,
        mapper=lambda ti: {
            "dag_id": ti.dag_id,
            "execution_date": ti.execution_date.isoformat(),
            "task_id": ti.task_id,
            "state": ti.state,
            "start_date": ti.start_date.isoformat() if ti.start_date else "",
            "end_date": ti.end_date.isoformat() if ti.end_date else "",
        },
    )
@cli_utils.action_logging
def task_test(args, dag=None):