Issue 1:
Apache Airflow version

2.5.1

What happened

If we create two nested groups and expand the groups the second group tasks fail. I assume the second expand doesn't know which value of mapped index to take.

It throws error

[2023-03-10 17:01:02,521] {abstractoperator.py:457} ERROR - Cannot expand <Task(_PythonDecoratedOperator): group2.group3.task6> for run manual__2023-03-10T11:30:56.862283+00:00; missing upstream values: ['x']

[2023-03-10 17:01:02,521] {abstractoperator.py:457} ERROR - Cannot expand <Task(_PythonDecoratedOperator): group2.group3.task6> for run manual__2023-03-10T11:30:56.862283+00:00; missing upstream values: ['x']

What you think should happen instead

The second group should have got the value from the upstream from the first group(most probably by mapping index)

How to reproduce

import pendulum

from airflow.decorators import dag, task, task_group
from airflow.operators.empty import EmptyOperator

@dag(dag_id="test", start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
schedule=None, catchup=False,
render_template_as_native_obj=True
)
def generic_wrapper():
task1 = EmptyOperator(task_id="task1")
task2 = EmptyOperator(task_id="task2")

@task
def task3():
return [1, 2, 3]

@task_group(
group_id="group2"
)
def group2(i):
@task
def task4(i):
print(i)

@task
def task5():
return [1, 2, 3]

task4(i) >> group3.expand(x=task5())

@task_group(
group_id="group3"
)
def group3(x):
@task
def task6(x):
print(x)

task6(x)

task1 >> task2 >> group2.expand(i=task3())

dag = generic_wrapper()

if __name__ == "__main__":
dag.test()

Operating System

linux

Versions of Apache Airflow Providers

airflow 2.5.1

Deployment

Other

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Body

I have a kind request for all the contributors to the latest provider packages release.

Could you help us to test the RC versions of the providers and let us know in the comment,

if the issue is addressed there.

Providers that need testing

Those are providers that require testing as there were some substantial changes introduced:

Provider amazon: 2.5.0rc1

Adding support for using client_type API for interacting with EC2 and support for using filters (#9011): @VijayantSoni

Do not check for S3 key before attempting download (#19504): @dstandish

MySQLToS3Operator actually allow writing parquet files to s3. (#19094): @guotongfei

Amazon provider remove deprecation, second try (#19815): @uranusjr

Catch AccessDeniedException in AWS Secrets Manager Backend (#19324): @john-jac

Provider apache.druid: 2.1.0rc1

Fix DruidOperator rendering problem (#19420): @humit0

Adding missing max_ingestion_time to DruidOperator docstring (#18693): @josh-fell

Add guide for Apache Druid operators (#18527): @Jasonnor

Provider apache.hdfs: 2.2.0rc1

hdfs provider: fix HA support for webhdfs (#19711): @Aakcht

Provider apache.hive: 2.1.0rc1

hive provider: restore HA support for metastore (#19777): @Aakcht

Provider apache.spark: 2.0.2rc1

fix bug of SparkSql Operator log going to infinite loop. (#19449): @huage1994

Provider cncf.kubernetes: 2.2.0rc1

Added namespace as a template field in the KPO. (#19718): @ReadytoRocc

Decouple name randomization from name kwarg (#19398): @ferruzzi

Checking event.status.container_statuses before filtering (#19713): @ulisesojeda

Coalesce extra params to None in KubernetesHook (#19694): @dstandish

Change to correct type in KubernetesPodOperator (#19459): @DorConnecteam

Provider databricks: 2.1.0rc1

Databricks: add more methods to represent run state information (#19723): @alexott

Databricks - allow Azure SP authentication on other Azure clouds (#19722): @alexott

Databricks: allow to specify PAT in Password field (#19585): @alexott

Databricks jobs 2.1 (#19544): @christophergrant

Update Databricks API from 2.0 to 2.1 (#19412): @Mokubyow

Authentication with AAD tokens in Databricks provider (#19335): @alexott

Fixup string concatenations (#19099): @blag

The Databricks provider will be removed from this round due to #20036.

Provider google: 6.2.0rc1

Added wait mechanizm to the DataprocJobSensor to avoid 509 errors when Job is not available (#19740): @lwyszomi

Add support in GCP connection for reading key from Secret Manager (#19164): @keze

Add dataproc metastore operators (#18945): @wojsamjan

Add support of path parameter for GCloud Storage Transfer Service operators (#17446): @eskarimov

Move bucket_name validation out of __init__ in Google Marketing Platform operators (#19383): @josh-fell

Create dataproc serverless spark batches operator (#19248): @MaksYermak

updates pipeline_timeout CloudDataFusionStartPipelineOperator (#18773): @matsavage

Support impersonation_chain parameter in the GKEStartPodOperator (#19518): @lwyszomi

Fix badly merged impersonation in GKEPodOperator (#19696): @potiuk

Provider influxdb: 1.1.0rc1

Add influxdb operator (#19356): @subkanthi

Provider microsoft.azure: 3.4.0rc1

Remove unnecessary connection form customizations in Azure (#19595): @josh-fell

Update Azure modules to comply with AIP-21 (#19431): @josh-fell

Remove host from hidden fields in WasbHook (#19475): @josh-fell

use DefaultAzureCredential if login not provided for Data Factory (#19079): @sdebruyn

Fix argument error in AzureContainerInstancesOperator (#19668): @chinwobble

Provider postgres: 2.4.0rc1

19489 - Pass client_encoding for postgres connections (#19827): @subkanthi

Amazon provider remove deprecation, second try (#19815): @uranusjr

Provider salesforce: 3.4.0rc1

Do not require all extras for SalesforceHook (#19530): @alexbegg

Provider sftp: 2.3.0rc1

Add test_connection method for sftp hook (#19609): @cmarteepants

Provider snowflake: 2.3.1rc1

Remove duplicate get_connection in SnowflakeHook (#19543): @harryplumer

Providers that do not need testing

We also had a number of providers that had documentation-only change (mostly around examples). Those need no testing.

Committer

I acknowledge that I am a maintainer/committer of the Apache Airflow project.