Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Run all PostCommit and PreCommit Tests against Release Branch #33101

Closed

Changed version.py and gradle.properties to python dev version to cre…

ca0e9f8
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

[DO NOT MERGE] Run all PostCommit and PreCommit Tests against Release Branch #33101

Changed version.py and gradle.properties to python dev version to cre…
ca0e9f8
Select commit
Loading
Failed to load commit list.
GitHub Actions / Test Results failed Nov 18, 2024 in 0s

2 fail, 19 skipped, 1 pass in 41m 40s

22 tests   - 294    1 ✅  - 314   41m 40s ⏱️ - 1d 1h 12m 22s
 1 suites  -  49   19 💤 + 18 
 1 files    -  49    2 ❌ +  2 

Results for commit ca0e9f8. ± Comparison against earlier commit cd9ce6c.

Annotations

Check warning on line 0 in apache_beam.examples.wordcount_it_test.WordCountIT

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_wordcount_it_with_prebuilt_sdk_container_cloud_build (apache_beam.examples.wordcount_it_test.WordCountIT) failed

sdks/python/pytest-beam_python3.11_sdk.xml [took 33m 2s]
Raw output
Failed: Timeout >1800.0s
self = <apache_beam.examples.wordcount_it_test.WordCountIT testMethod=test_wordcount_it_with_prebuilt_sdk_container_cloud_build>

    @pytest.mark.it_validatescontainer
    def test_wordcount_it_with_prebuilt_sdk_container_cloud_build(self):
>     self._run_wordcount_it(
          wordcount.run,
          experiment='beam_fn_api',
          prebuild_sdk_container_engine='cloud_build')

apache_beam/examples/wordcount_it_test.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/examples/wordcount_it_test.py:150: in _run_wordcount_it
    run_wordcount(
apache_beam/examples/wordcount.py:87: in run
    with beam.Pipeline(options=pipeline_options) as p:
apache_beam/pipeline.py:620: in __exit__
    self.result = self.run()
apache_beam/pipeline.py:570: in run
    self._options).run(False)
apache_beam/pipeline.py:594: in run
    return self.runner.run_pipeline(self, self._options)
apache_beam/runners/dataflow/test_dataflow_runner.py:66: in run_pipeline
    self.result.wait_until_finish(duration=wait_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <DataflowPipelineResult <Job
 clientRequestId: '20241118212721868308-4244'
 createTime: '2024-11-18T21:27:22.872638Z'
...024-11-18T21:27:22.872638Z'
 steps: []
 tempFiles: []
 type: TypeValueValuesEnum(JOB_TYPE_BATCH, 1)> at 0x7d8cbee8d390>
duration = None

    def wait_until_finish(self, duration=None):
      if not self.is_in_terminal_state():
        if not self.has_job:
          raise IOError('Failed to get the Dataflow job id.')
        consoleUrl = (
            "Console URL: https://console.cloud.google.com/"
            f"dataflow/jobs/<RegionId>/{self.job_id()}"
            "?project=<ProjectId>")
        thread = threading.Thread(
            target=DataflowRunner.poll_for_job_completion,
            args=(self._runner, self, duration))
    
        # Mark the thread as a daemon thread so a keyboard interrupt on the main
        # thread will terminate everything. This is also the reason we will not
        # use thread.join() to wait for the polling thread.
        thread.daemon = True
        thread.start()
        while thread.is_alive():
>         time.sleep(5.0)
E         Failed: Timeout >1800.0s

apache_beam/runners/dataflow/dataflow_runner.py:794: Failed

Check warning on line 0 in apache_beam.examples.wordcount_it_test.WordCountIT

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_wordcount_it_with_prebuilt_sdk_container_local_docker (apache_beam.examples.wordcount_it_test.WordCountIT) failed

sdks/python/pytest-beam_python3.11_sdk.xml [took 59s]
Raw output
RuntimeError: Failed to push prebuilt sdk container us.gcr.io/apache-beam-testing/github-actions/prebuild_python311_sdk/beam_python_prebuilt_sdk:28bdbf2c-a71f-47de-bc4d-e23a01fe5ede, stderr: 
None
self = <apache_beam.runners.portability.sdk_container_builder._SdkContainerImageLocalBuilder object at 0x7d8cbeeccc90>
container_image_name = 'us.gcr.io/apache-beam-testing/github-actions/prebuild_python311_sdk/beam_python_prebuilt_sdk:28bdbf2c-a71f-47de-bc4d-e23a01fe5ede'

    def _invoke_docker_build_and_push(self, container_image_name):
      try:
        _LOGGER.info("Building sdk container, this may take a few minutes...")
        now = time.time()
        subprocess.run(['docker', 'build', '.', '-t', container_image_name],
                       check=True,
                       cwd=self._temp_src_dir)
      except subprocess.CalledProcessError as err:
        raise RuntimeError(
            'Failed to build sdk container with local docker, '
            'stderr:\n %s.' % err.stderr)
      else:
        _LOGGER.info(
            "Successfully built %s in %.2f seconds" %
            (container_image_name, time.time() - now))
    
      if self._docker_registry_push_url:
        _LOGGER.info("Pushing prebuilt sdk container...")
        try:
>         subprocess.run(['docker', 'push', container_image_name], check=True)

apache_beam/runners/portability/sdk_container_builder.py:185: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

input = None, capture_output = False, timeout = None, check = True
popenargs = (['docker', 'push', 'us.gcr.io/apache-beam-testing/github-actions/prebuild_python311_sdk/beam_python_prebuilt_sdk:28bdbf2c-a71f-47de-bc4d-e23a01fe5ede'],)
kwargs = {}
process = <Popen: returncode: 1 args: ['docker', 'push', 'us.gcr.io/apache-beam-testin...>
stdout = None, stderr = None, retcode = 1

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.
    
        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.
    
        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.
    
        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.
    
        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.
    
        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.
    
        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE
    
        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE
    
        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['docker', 'push', 'us.gcr.io/apache-beam-testing/github-actions/prebuild_python311_sdk/beam_python_prebuilt_sdk:28bdbf2c-a71f-47de-bc4d-e23a01fe5ede']' returned non-zero exit status 1.

/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/subprocess.py:571: CalledProcessError

During handling of the above exception, another exception occurred:

self = <apache_beam.examples.wordcount_it_test.WordCountIT testMethod=test_wordcount_it_with_prebuilt_sdk_container_local_docker>

    @pytest.mark.it_validatescontainer
    def test_wordcount_it_with_prebuilt_sdk_container_local_docker(self):
>     self._run_wordcount_it(
          wordcount.run,
          experiment='beam_fn_api',
          prebuild_sdk_container_engine='local_docker')

apache_beam/examples/wordcount_it_test.py:95: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
apache_beam/examples/wordcount_it_test.py:150: in _run_wordcount_it
    run_wordcount(
apache_beam/examples/wordcount.py:87: in run
    with beam.Pipeline(options=pipeline_options) as p:
apache_beam/pipeline.py:620: in __exit__
    self.result = self.run()
apache_beam/pipeline.py:570: in run
    self._options).run(False)
apache_beam/pipeline.py:594: in run
    return self.runner.run_pipeline(self, self._options)
apache_beam/runners/dataflow/test_dataflow_runner.py:53: in run_pipeline
    self.result = super().run_pipeline(pipeline, options)
apache_beam/runners/dataflow/dataflow_runner.py:391: in run_pipeline
    environments.DockerEnvironment.from_options(options))
apache_beam/transforms/environments.py:362: in from_options
    prebuilt_container_image = SdkContainerImageBuilder.build_container_image(
apache_beam/runners/portability/sdk_container_builder.py:139: in build_container_image
    return builder._build()
apache_beam/runners/portability/sdk_container_builder.py:90: in _build
    self._invoke_docker_build_and_push(container_image_name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <apache_beam.runners.portability.sdk_container_builder._SdkContainerImageLocalBuilder object at 0x7d8cbeeccc90>
container_image_name = 'us.gcr.io/apache-beam-testing/github-actions/prebuild_python311_sdk/beam_python_prebuilt_sdk:28bdbf2c-a71f-47de-bc4d-e23a01fe5ede'

    def _invoke_docker_build_and_push(self, container_image_name):
      try:
        _LOGGER.info("Building sdk container, this may take a few minutes...")
        now = time.time()
        subprocess.run(['docker', 'build', '.', '-t', container_image_name],
                       check=True,
                       cwd=self._temp_src_dir)
      except subprocess.CalledProcessError as err:
        raise RuntimeError(
            'Failed to build sdk container with local docker, '
            'stderr:\n %s.' % err.stderr)
      else:
        _LOGGER.info(
            "Successfully built %s in %.2f seconds" %
            (container_image_name, time.time() - now))
    
      if self._docker_registry_push_url:
        _LOGGER.info("Pushing prebuilt sdk container...")
        try:
          subprocess.run(['docker', 'push', container_image_name], check=True)
        except subprocess.CalledProcessError as err:
>         raise RuntimeError(
              'Failed to push prebuilt sdk container %s, stderr: \n%s' %
              (container_image_name, err.stderr))
E         RuntimeError: Failed to push prebuilt sdk container us.gcr.io/apache-beam-testing/github-actions/prebuild_python311_sdk/beam_python_prebuilt_sdk:28bdbf2c-a71f-47de-bc4d-e23a01fe5ede, stderr: 
E         None

apache_beam/runners/portability/sdk_container_builder.py:187: RuntimeError