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

Change dto for page blog documents to access fields in safe manner #2984

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

artem-shelkovnikov
Copy link
Member

@artem-shelkovnikov artem-shelkovnikov commented Nov 20, 2024

Minor change to replace unsafe object field access with safe one - we've received reports with errors coming from these lines because some intermediate objects were None:

Traceback (most recent call last):
  File "/app/connectors/sources/confluence.py", line 1154, in _page_blog_coro
    async for document, attachment_count, space_key, permissions, restrictions in self.fetch_documents(
  File "/app/connectors/sources/confluence.py", line 904, in fetch_documents
    "author": document["history"]["createdBy"][self.authorkey],
KeyError: 'publicName'
[FMWK][18:00:15][ERROR] Exception found for task Task-132
Traceback (most recent call last):
  File "/app/connectors/sources/confluence.py", line 1154, in _page_blog_coro
    async for document, attachment_count, space_key, permissions, restrictions in self.fetch_documents(
  File "/app/connectors/sources/confluence.py", line 904, in fetch_documents
    "author": document["history"]["createdBy"][self.authorkey],
KeyError: 'publicName'

Checklists

Pre-Review Checklist

  • this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • if there is no GH issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)

Release Note

Fix Confluence connector not downloading some blog post documents due to unexpected response format.

jedrazb
jedrazb previously approved these changes Nov 20, 2024
Copy link
Member

@jedrazb jedrazb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚢

Copy link

💔 Failed to create backport PR(s)

Status Branch Result
8.x #2986
8.16 #2987
8.15 Commit could not be cherrypicked due to conflicts

Successful backport PRs will be merged automatically after passing CI.

To backport manually run:
backport --pr 2984 --autoMerge --autoMergeMethod squash

artem-shelkovnikov added a commit that referenced this pull request Nov 20, 2024
…2984)

(cherry picked from commit 9a79d9a)

# Conflicts:
#	connectors/sources/confluence.py
@artem-shelkovnikov
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

jedrazb added a commit that referenced this pull request Nov 22, 2024
…nner (#2984) (#2987)

Co-authored-by: Artem Shelkovnikov <[email protected]>
Co-authored-by: Jedr Blaszyk <[email protected]>
artem-shelkovnikov added a commit that referenced this pull request Nov 22, 2024
artem-shelkovnikov added a commit that referenced this pull request Nov 25, 2024
…ner (#2984) (#2986)

Co-authored-by: Artem Shelkovnikov <[email protected]>
Co-authored-by: Jedr Blaszyk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants