You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "bbovenzi (via GitHub)" <gi...@apache.org> on 2026/07/14 14:23:24 UTC

Re: [PR] Fix partition key display and input handling [airflow]

bbovenzi commented on code in PR #69702:
URL: https://github.com/apache/airflow/pull/69702#discussion_r3579788883


##########
airflow-core/src/airflow/ui/src/queries/useTrigger.ts:
##########
@@ -108,7 +108,10 @@ export const useTrigger = ({ dagId, onSuccessConfirm }: { dagId: string; onSucce
         data_interval_start: formattedDataIntervalStart,
         logical_date: formattedLogicalDate,
         note: checkNote,
-        partition_key: dagRunRequestBody.partitionKey ?? null,
+        partition_key:
+          dagRunRequestBody.partitionKey === undefined || dagRunRequestBody.partitionKey === ""

Review Comment:
   We do this check a few times. Let's extract it into a util so its easier to not repeat the `?? null` bug again



##########
airflow-core/src/airflow/ui/src/pages/Run/Header.tsx:
##########
@@ -75,7 +75,7 @@ export const Header = ({ dagRun }: { readonly dagRun: DAGRunResponse }) => {
             ? []
             : [
                 {
-                  label: translate("dagRun.mappedPartitionKey"),

Review Comment:
   We also call `mappedPartitionKey` in `PartitionScheduleModal` do we want to keep that?



##########
airflow-core/src/airflow/ui/src/components/Assets/AssetEvent.tsx:
##########
@@ -95,7 +95,7 @@ export const AssetEvent = ({
       <HStack>
         <TriggeredRuns dagRuns={event.created_dagruns} />
       </HStack>
-      {event.partition_key === undefined ? undefined : (
+      {event.partition_key === undefined || event.partition_key === null ? undefined : (

Review Comment:
   ```suggestion
         {event.partition_key ? undefined : (
   ```
   
   or `{event.partition_key == null ? undefined : (` with an eslint ignore comment?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org