Skip to content

Commit

Permalink
Debug failover to cloned manifests (#12515)
Browse files Browse the repository at this point in the history
This PR, in combination with
SatelliteQE/manifester#21, addresses some of the
errors that have been occurring in CI in cases where Manifester times
out when exporting a manifest due to an upstream RHSM issue. These
changes should enable Robottelo to successfully fail over to using
cloned manifests in those cases.

(cherry picked from commit b2f69d5)
  • Loading branch information
synkd authored and web-flow committed Sep 12, 2023
1 parent 5e5fdf3 commit e7b5704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions robottelo/host_helpers/satellite_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ def upload_manifest(self, org_id, manifest=None, interface='API', timeout=None):
:returns: the manifest upload result
"""
if manifest is None:
if manifest.content is None:
manifest = clone()
if timeout is None:
# Set the timeout to 1500 seconds to align with the API timeout.
timeout = 1500000
if interface == 'CLI':
if isinstance(manifest.content, (bytes, io.BytesIO)):
if hasattr(manifest, 'path'):
self.put(f'{manifest.path}', f'{manifest.name}')
result = self.cli.Subscription.upload(
{'file': manifest.name, 'organization-id': org_id}, timeout=timeout
Expand Down
2 changes: 1 addition & 1 deletion robottelo/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ def put(self, local_path, remote_path=None):
If local_path is a manifest object, write its contents to a temporary file
then continue with the upload.
"""
if 'utils.Manifest' in str(local_path):
if 'utils.manifest' in str(local_path):
with NamedTemporaryFile(dir=robottelo_tmp_dir) as content_file:
content_file.write(local_path.content.read())
content_file.flush()
Expand Down

0 comments on commit e7b5704

Please sign in to comment.