Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-17023

Improve handling of unexpected input in config.sh#extractExecutionParams

    XMLWordPrintableJSON

Details

    Description

      In FLINK-15727 BashJavaUtils now returns multiple lines of results to avoid using BashJavaUtils twice. But now the format checking in extractExecutionParams for the last line is incorrect. Instead of

      if ! [[ $execution_config =~ ^${EXECUTION_PREFIX}.* ]]; then
          echo "[ERROR] Unexpected result: $execution_config" 1>&2
          echo "[ERROR] The last line of the BashJavaUtils outputs is expected to be the execution result, following the prefix '${EXECUTION_PREFIX}'" 1>&2
          echo "$output" 1>&2
          exit 1
      fi
      

      It should be

      last_line=`echo "$execution_config" | tail -n 1`
      if ! [[ "$last_line" =~ ^${EXECUTION_PREFIX}.* ]]; then
      # ...
      

      Attachments

        Issue Links

          Activity

            People

              TsReaper Caizhi Weng
              TsReaper Caizhi Weng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m