This is an automated email from the ASF dual-hosted git repository.

vatsrahul1001 pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-3-test by this push:
     new ee5d380a235 [v3-3-test] Fix task instance mark success downstream 
default (#67763) (#70143)
ee5d380a235 is described below

commit ee5d380a235e14e9d43ba14486db30c4bf59e995
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 21 16:54:36 2026 +0530

    [v3-3-test] Fix task instance mark success downstream default (#67763) 
(#70143)
    
    (cherry picked from commit 68d88db25a3690ead4d610b72523fbcaa9c276fa)
    
    Co-authored-by: Aditya Patel 
<[email protected]>
---
 .../TaskInstance/MarkTaskInstanceAsDialog.test.tsx | 90 ++++++++++++++++++++++
 .../TaskInstance/MarkTaskInstanceAsDialog.tsx      |  1 -
 2 files changed, 90 insertions(+), 1 deletion(-)

diff --git 
a/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.test.tsx
 
b/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.test.tsx
new file mode 100644
index 00000000000..57d53ed0bad
--- /dev/null
+++ 
b/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.test.tsx
@@ -0,0 +1,90 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import "@testing-library/jest-dom";
+import { render, screen } from "@testing-library/react";
+import { describe, expect, it, vi } from "vitest";
+
+import type { TaskInstanceResponse } from "openapi/requests/types.gen";
+import { Wrapper } from "src/utils/Wrapper";
+
+import MarkTaskInstanceAsDialog from "./MarkTaskInstanceAsDialog";
+
+vi.mock("src/queries/usePatchTaskInstance", () => ({
+  usePatchTaskInstance: () => ({
+    isPending: false,
+    mutate: vi.fn(),
+  }),
+}));
+
+vi.mock("src/queries/usePatchTaskInstanceDryRun", () => ({
+  usePatchTaskInstanceDryRun: () => ({
+    data: {
+      task_instances: [],
+      total_entries: 0,
+    },
+    isPending: false,
+  }),
+}));
+
+const taskInstance: TaskInstanceResponse = {
+  dag_display_name: "Test DAG",
+  dag_id: "test_dag",
+  dag_run_id: "manual__2025-01-01T00:00:00+00:00",
+  dag_version: null,
+  duration: null,
+  end_date: null,
+  executor: null,
+  executor_config: "{}",
+  hostname: null,
+  id: "test_task_instance",
+  logical_date: "2025-01-01T00:00:00Z",
+  map_index: 0,
+  max_tries: 0,
+  note: null,
+  operator: "EmptyOperator",
+  operator_name: "EmptyOperator",
+  pid: null,
+  pool: "default_pool",
+  pool_slots: 1,
+  priority_weight: null,
+  queue: null,
+  queued_when: null,
+  rendered_fields: undefined,
+  rendered_map_index: null,
+  run_after: "2025-01-01T00:00:00Z",
+  scheduled_when: null,
+  start_date: null,
+  state: "failed",
+  task_display_name: "task_1",
+  task_id: "task_1",
+  trigger: null,
+  triggerer_job: null,
+  try_number: 1,
+  unixname: null,
+};
+
+describe("MarkTaskInstanceAsDialog", () => {
+  it("does not select downstream by default", () => {
+    render(<MarkTaskInstanceAsDialog onClose={vi.fn()} open state="success" 
taskInstance={taskInstance} />, {
+      wrapper: Wrapper,
+    });
+
+    expect(screen.getByRole("button", { name: /downstream/iu 
})).not.toHaveAttribute("data-selected");
+  });
+});
diff --git 
a/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.tsx
 
b/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.tsx
index 06847b5a8ae..a89e6189f5f 100644
--- 
a/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.tsx
+++ 
b/airflow-core/src/airflow/ui/src/components/MarkAs/TaskInstance/MarkTaskInstanceAsDialog.tsx
@@ -126,7 +126,6 @@ const MarkTaskInstanceAsDialog = ({ onClose, open, state, 
taskInstance }: Props)
         <Dialog.Body width="full">
           <Flex justifyContent="center">
             <SegmentedControl
-              defaultValues={["downstream"]}
               multiple
               onChange={setSelectedOptions}
               options={[

Reply via email to