title: Error when providing arguments during Dataflow Job creation on GCP Console
body: <p>Since 2021 October 05/06, my GCP Dataflow template files is getting the arguments' values provided during template creation (when I run the .py file in my local machine in order to create the template file on GCP storage) and not getting the arguments provided during job creation based on this same template file. If I don't provide any value during template creation they assume a RuntimeValueProvider (when not using default values for args), but not the values provided during job creation.</p>
  <p>The arguments provided during the job creation get stored in the Dataflow job session. If I open the job, go to right-side bar and open &quot;pipeline options&quot;, so the correct values provided during job creation are there but they don't reach the code.</p>
  <p>I'm running my code from template in a classic way in the GCP console:</p>
  <pre><code>gcloud dataflow jobs run JOB_NAME --gcs-location gs://LOCATION/TEMPLATE/FILE --region REGION --project PROJ_NAME --worker-machine-type MACHINE_TYPE --parameters PARAM_1=PARAM_1_VALUE,PARAM_2=PARAM_2_VALUE
  </code></pre>
  <p>I'm using SDK 2.32.0, and inside code I'm using &quot;parser.add_value_provider_argument&quot; and not &quot;parser.add_argument&quot;. But I tested it using &quot;parser.add_argument&quot; and I got no success. With both, my code is assuming the arguments values from when I run the .py file.</p>
  <p>Example 1</p>
  <pre><code>import apache_beam.io.gcp.gcsfilesystem as gcs
  from apache_beam.options.pipeline_options import PipelineOptions
  class MyOptions(PipelineOptions):
      @classmethod
      def _add_argparse_args(cls, parser):
          parser.add_value_provider_argument('--PARAM_1', 
              type=str)
          parser.add_value_provider_argument('--PARAM_2', 
              type=str)
  beam_options = PipelineOptions()
  args = beam_options.view_as(MyOptions)
  
  # Some business operations with args that are always assuming the  values provided during template creation
  options = {'project': PROJECT,
             'runner': 'DataflowRunner',
             'region': REGION,
             'staging_location': 'gs://{}/temp'.format(BUCKET),
             'temp_location': 'gs://{}/temp'.format(BUCKET),
             'template_location': 'gs://{}/template/batch_poc'.format(BUCKET)}
  pipeline_options = PipelineOptions.from_dictionary(options)
  
  with beam.Pipeline(options = pipeline_options) as p:
      lines = (p
              | beam...
              )
  </code></pre>
  <p>Example 2 (same as example 1 but using default values)</p>
  <pre><code># ... same as example 1
  class MyOptions(PipelineOptions):
          @classmethod
          def _add_argparse_args(cls, parser):
              parser.add_value_provider_argument('--PARAM_1',
                  default=&quot;test1&quot;,
                  type=str)
              parser.add_value_provider_argument('--PARAM_2', 
                  default=&quot;test2&quot;,
                  type=str)
  # ... same as example 1
  </code></pre>
  <p>In all cases my parameters provided during job creation are ignored.</p>
  <p>Case 1:
  When running example 1 with no args on local machine (as python command below) and running its template on GCP console with both cases: args and no args (as second command below). The value in PARAM_1_VALUE and PARAM_2_VALUE are the same: RuntimeValueProvider(...)</p>
  <pre><code>LOCALHOST&gt; python3 code.py
  
  GCP&gt; gcloud dataflow jobs run ...
  OR
  GCP&gt; gcloud dataflow jobs run ... --parameters PARAM_1=another_test_1,PARAM_2=another_test_2
  </code></pre>
  <p>Case 2:
  When running example 1 with args on local machine (as python command below) and running its template on GCP console with both cases: args and no args (as second command below). The value in PARAM_1_VALUE and PARAM_2_VALUE are the same values passed during template creation: another_test_{value} and not another_another_test_{value}</p>
  <pre><code>LOCALHOST&gt; python3 code.py --PARAM_1 another_test_1 --PARAM_2 another_test_2
  
  GCP&gt; gcloud dataflow jobs run ...
  OR
  GCP&gt; gcloud dataflow jobs run ... --parameters PARAM_1=another_another_test_1,PARAM_2=another_another_test_2
  </code></pre>
  <p>Case 3:
  When running example 2 with no args on local machine (as python command below) and running its template on GCP console with both cases: args and no args (as second command below). The value in PARAM_1_VALUE and PARAM_2_VALUE are the default value.</p>
  <pre><code>LOCALHOST&gt; python3 code.py
  
  GCP&gt; gcloud dataflow jobs run ...
  OR
  GCP&gt; gcloud dataflow jobs run ... --parameters PARAM_1=another_test_1,PARAM_2=another_test_2
  </code></pre>
  <p>Case 4:
  When running example 2 with args on local machine (as python command below) and running its template on GCP console with both cases: args and no args (as second command below). It happens the same as case 2.</p>
  <p>Note: I updated both libs: apache-beam and apache-beam[gcp]</p>