Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-6949

Python Gcp tests stalling on machine without credentials

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: test-failures
    • Labels:

      Description

      When executing

      python setup.py nosetests --tests  apache_beam.io.gcp.bigquery_file_loads_test:TestBigQueryFileLoads.test_records_traverse_transform_with_mocks
      

      the test get stuck in between.

      It seems, this test requires proper GCP credentials available. If those are not set, used libraries seem to fall back to some 'local mode' which results in starting a custom webserver and waiting forever.

      Impact:

      • bad user experience
      • creating kind of zombie processes. After killing the test, the web server is still running 'forever' and blocking standard ports (8080, 8090) on dev machine. Also gradle daemon 'never' stops but keeps running in background.

       

       See also thread on mailing list [1]:

      Running
      
      python setup.py nosetests --tests  apache_beam.io.gcp.bigquery_file_loads_test:TestBigQueryFileLoads.test_records_traverse_transform_with_mocks
      
      and hitting 'Ctrl-C' after it got stuck, results in following output:
      
      'KeyboardInterrupt [while running \'WriteToBigQuery/BigQueryBatchFileLoads/RemoveTempTables/Delete\']\n------------
      Your browser has been opened to visit:
          https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbigquery+https%3A%
      If your browser is on a different machine then exit and re-run this
      application with the command-line parameter
        --noauth_local_webserver
      Failed to find "code" in the query parameters of the redirect.
      Invalid authorization: Try running with --noauth_local_webserver.
      

      [1] https://lists.apache.org/thread.html/80f3de15b04ffb93bac114dbf2fc8623fa5cd8994592072352362ba7@%3Cdev.beam.apache.org%3E

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michel Michael Luckey
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: