From 107e43d4c457a5bcfa259d696045c5b04e8c4305 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:04:11 +0000 Subject: [PATCH 1/4] Initial plan From b54236757281cee44cf2449946570e690995d24f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:05:36 +0000 Subject: [PATCH 2/4] Add check=True to subprocess.run and handle exception properly Co-authored-by: alexdryden <47127862+alexdryden@users.noreply.github.com> --- arcflow/main.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arcflow/main.py b/arcflow/main.py index 4bede4a..c0b0da6 100644 --- a/arcflow/main.py +++ b/arcflow/main.py @@ -583,16 +583,17 @@ def index_collections(self, repo_id, xml_file_path, indent_size=0): cwd=self.arclight_dir, env=env, stderr=subprocess.PIPE, + check=True, ) if result.stderr: self.log.error(f'{indent}{result.stderr.decode("utf-8")}') - if result.returncode != 0: - self.log.error(f'{indent}Failed to index pending resources in repository ID {repo_id} to ArcLight Solr. Return code: {result.returncode}') - else: - self.log.info(f'{indent}Finished indexing pending resources in repository ID {repo_id} to ArcLight Solr.') - except subprocess.CalledProcessError as e: + + self.log.info(f'{indent}Finished indexing pending resources in repository ID {repo_id} to ArcLight Solr.') + except subprocess.CalledProcessError as e: self.log.error(f'{indent}Error indexing pending resources in repository ID {repo_id} to ArcLight Solr: {e}') + if e.stderr: + self.log.error(f'{indent}{e.stderr.decode("utf-8")}') def get_creator_bioghist(self, resource, indent_size=0): From 092d1beaef833b3f6f1fecb770d3dd2eb0645589 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:22:57 +0000 Subject: [PATCH 3/4] Move success log to else block for clarity Co-authored-by: alexdryden <47127862+alexdryden@users.noreply.github.com> --- arcflow/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arcflow/main.py b/arcflow/main.py index c0b0da6..579bd5a 100644 --- a/arcflow/main.py +++ b/arcflow/main.py @@ -588,12 +588,12 @@ def index_collections(self, repo_id, xml_file_path, indent_size=0): if result.stderr: self.log.error(f'{indent}{result.stderr.decode("utf-8")}') - - self.log.info(f'{indent}Finished indexing pending resources in repository ID {repo_id} to ArcLight Solr.') except subprocess.CalledProcessError as e: self.log.error(f'{indent}Error indexing pending resources in repository ID {repo_id} to ArcLight Solr: {e}') if e.stderr: self.log.error(f'{indent}{e.stderr.decode("utf-8")}') + else: + self.log.info(f'{indent}Finished indexing pending resources in repository ID {repo_id} to ArcLight Solr.') def get_creator_bioghist(self, resource, indent_size=0): From 924ea473f143ad76f087862e7aed3bbf1b3e2c3a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:30:00 +0000 Subject: [PATCH 4/4] Revert to original error handling without check=True Co-authored-by: alexdryden <47127862+alexdryden@users.noreply.github.com> --- arcflow/main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arcflow/main.py b/arcflow/main.py index 579bd5a..292d049 100644 --- a/arcflow/main.py +++ b/arcflow/main.py @@ -583,17 +583,16 @@ def index_collections(self, repo_id, xml_file_path, indent_size=0): cwd=self.arclight_dir, env=env, stderr=subprocess.PIPE, - check=True, ) if result.stderr: self.log.error(f'{indent}{result.stderr.decode("utf-8")}') + if result.returncode != 0: + self.log.error(f'{indent}Failed to index pending resources in repository ID {repo_id} to ArcLight Solr. Return code: {result.returncode}') + else: + self.log.info(f'{indent}Finished indexing pending resources in repository ID {repo_id} to ArcLight Solr.') except subprocess.CalledProcessError as e: self.log.error(f'{indent}Error indexing pending resources in repository ID {repo_id} to ArcLight Solr: {e}') - if e.stderr: - self.log.error(f'{indent}{e.stderr.decode("utf-8")}') - else: - self.log.info(f'{indent}Finished indexing pending resources in repository ID {repo_id} to ArcLight Solr.') def get_creator_bioghist(self, resource, indent_size=0):