unstructured-ingest 1.0.33__py3-none-any.whl → 1.0.34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of unstructured-ingest might be problematic. Click here for more details.

@@ -1 +1 @@
1
- __version__ = "1.0.33" # pragma: no cover
1
+ __version__ = "1.0.34" # pragma: no cover
@@ -12,6 +12,7 @@ from unstructured_ingest.data_types.file_data import (
12
12
  SourceIdentifiers,
13
13
  )
14
14
  from unstructured_ingest.error import SourceConnectionError
15
+ from unstructured_ingest.errors_v2 import UserAuthError, UserError
15
16
  from unstructured_ingest.interfaces import (
16
17
  AccessConfig,
17
18
  ConnectionConfig,
@@ -96,7 +97,7 @@ class ConfluenceConnectionConfig(ConnectionConfig):
96
97
 
97
98
  @requires_dependencies(["atlassian"], extras="confluence")
98
99
  @contextmanager
99
- def get_client(self) -> "Confluence":
100
+ def get_client(self) -> Generator["Confluence", None, None]:
100
101
  from atlassian import Confluence
101
102
 
102
103
  access_configs = self.access_config.get_secret_value()
@@ -126,15 +127,36 @@ class ConfluenceIndexer(Indexer):
126
127
 
127
128
  def precheck(self) -> bool:
128
129
  try:
129
- # Attempt to retrieve a list of spaces with limit=1.
130
- # This should only succeed if all creds are valid
131
- with self.connection_config.get_client() as client:
130
+ self.connection_config.get_client()
131
+ except Exception as e:
132
+ logger.exception(f"Failed to connect to Confluence: {e}")
133
+ raise UserAuthError(f"Failed to connect to Confluence: {e}")
134
+
135
+ with self.connection_config.get_client() as client:
136
+ # opportunistically check the first space in list of all spaces
137
+ try:
132
138
  client.get_all_spaces(limit=1)
139
+ except Exception as e:
140
+ logger.exception(f"Failed to connect to find any Confluence space: {e}")
141
+ raise UserError(f"Failed to connect to find any Confluence space: {e}")
142
+
133
143
  logger.info("Connection to Confluence successful.")
134
- return True
135
- except Exception as e:
136
- logger.error(f"Failed to connect to Confluence: {e}", exc_info=True)
137
- raise SourceConnectionError(f"Failed to connect to Confluence: {e}")
144
+
145
+ # If specific spaces are provided, check if we can access them
146
+ errors = []
147
+
148
+ if self.index_config.spaces:
149
+ for space_key in self.index_config.spaces:
150
+ try:
151
+ client.get_space(space_key)
152
+ except Exception as e:
153
+ logger.exception(f"Failed to connect to Confluence: {e}")
154
+ errors.append(f"Failed to connect to '{space_key}' space, cause: '{e}'")
155
+
156
+ if errors:
157
+ raise UserError("\n".join(errors))
158
+
159
+ return True
138
160
 
139
161
  def _get_space_ids_and_keys(self) -> List[Tuple[str, int]]:
140
162
  """
@@ -406,7 +428,7 @@ class ConfluenceDownloader(Downloader):
406
428
  expand="history.lastUpdated,version,body.view",
407
429
  )
408
430
  except Exception as e:
409
- logger.error(f"Failed to retrieve page with ID {doc_id}: {e}", exc_info=True)
431
+ logger.exception(f"Failed to retrieve page with ID {doc_id}: {e}")
410
432
  raise SourceConnectionError(f"Failed to retrieve page with ID {doc_id}: {e}")
411
433
 
412
434
  if not page:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unstructured_ingest
3
- Version: 1.0.33
3
+ Version: 1.0.34
4
4
  Summary: Local ETL data pipeline to get data RAG ready
5
5
  Author-email: Unstructured Technologies <devops@unstructuredai.io>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  unstructured_ingest/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
2
- unstructured_ingest/__version__.py,sha256=moV2VeZrrB_QVKOvny6NjEoowwTiGToZWfDpKig5QOQ,43
2
+ unstructured_ingest/__version__.py,sha256=S3Vgmk2V2EWfbef_sUbnJb_d5x0m64Z8D_xx-_9kXOM,43
3
3
  unstructured_ingest/error.py,sha256=qDncnJgbf5ils956RcO2CGlAKYDT5OaEM9Clv1JVTNc,1448
4
4
  unstructured_ingest/errors_v2.py,sha256=9RuRCi7lbDxCguDz07y5RiHoQiFIOWwOD7xqzJ2B3Yw,436
5
5
  unstructured_ingest/logger.py,sha256=7e_7UeK6hVOd5BQ6i9NzRUAPCS_DF839Y8TjUDywraY,1428
@@ -66,7 +66,7 @@ unstructured_ingest/processes/connectors/airtable.py,sha256=smx5qBSUKwM8V6Xcc7ik
66
66
  unstructured_ingest/processes/connectors/astradb.py,sha256=Ob9wQgDxa6BXDPZBOqooNKQgvjIZcMwIe4fW3VlI7h8,18929
67
67
  unstructured_ingest/processes/connectors/azure_ai_search.py,sha256=szhSRXzUHk0DE2hGFfjGc_jNFzlUwiRlCtIkuu7tmnk,11524
68
68
  unstructured_ingest/processes/connectors/chroma.py,sha256=q5_Fu4xb6_W_NyrPxVa3-jVwZLqVdlBNlR4dFvbd7l0,7235
69
- unstructured_ingest/processes/connectors/confluence.py,sha256=1oT4A83jSOWR8u8kldHImOBqSLxctdlsR-AZpzJfO9w,21098
69
+ unstructured_ingest/processes/connectors/confluence.py,sha256=C62LVwZYk7H8RfiPb0mbxig2osW5u7KvHIlz4qOJU-0,21954
70
70
  unstructured_ingest/processes/connectors/couchbase.py,sha256=KCHoYDNya9B05NIB5D78zXoizFyfpJRepcYBe1nLSOs,12298
71
71
  unstructured_ingest/processes/connectors/delta_table.py,sha256=2DFox_Vzoopt_D3Jy3rCjrrTGMutG2INIrwCeoIohRY,7340
72
72
  unstructured_ingest/processes/connectors/discord.py,sha256=6yEJ_agfKUqsV43wFsbMkcd8lcLJC0uqbo4izjdZ3rU,5294
@@ -231,8 +231,8 @@ unstructured_ingest/utils/ndjson.py,sha256=nz8VUOPEgAFdhaDOpuveknvCU4x82fVwqE01q
231
231
  unstructured_ingest/utils/pydantic_models.py,sha256=BT_j15e4rX40wQbt8LUXbqfPhA3rJn1PHTI_G_A_EHY,1720
232
232
  unstructured_ingest/utils/string_and_date_utils.py,sha256=oXOI6rxXq-8ncbk7EoJK0WCcTXWj75EzKl8pfQMID3U,2522
233
233
  unstructured_ingest/utils/table.py,sha256=WZechczgVFvlodUWFcsnCGvBNh1xRm6hr0VbJTPxKAc,3669
234
- unstructured_ingest-1.0.33.dist-info/METADATA,sha256=d8F0hFb3s-aLloV1TGFLDHRa8CHwuTduHFS1neEHu6s,8747
235
- unstructured_ingest-1.0.33.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
236
- unstructured_ingest-1.0.33.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
237
- unstructured_ingest-1.0.33.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
238
- unstructured_ingest-1.0.33.dist-info/RECORD,,
234
+ unstructured_ingest-1.0.34.dist-info/METADATA,sha256=Pw-KP4al9gteAFj6lqY7xkFRjWj1rTAgN960UsAUZAM,8747
235
+ unstructured_ingest-1.0.34.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
236
+ unstructured_ingest-1.0.34.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
237
+ unstructured_ingest-1.0.34.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
238
+ unstructured_ingest-1.0.34.dist-info/RECORD,,