Skip to content

Error after updating Credentials for Confluence Loader #6550

Description

@wggrre

Describe the bug

After changing the credentials used in a confluence document loader, the post/document-store/refresh/
{id}
endpoint does not work anymore and result in a 403 (since the old invalid credentials are still beeing used).

The root cause is that the config object in the DB (table: document_store, column: loaders) is not updated correctly:

[
    {
        "id": "uuid....",
        "loaderId": "confluence",
        "loaderName": "SPACENAME",
        "loaderConfig": {
            "textSplitter": "",
            "baseUrl": "https://comapny.atlassian.net/wiki",
            "spaceKey": "SPACENAME",
            "limit": "",
            "metadata": "",
            "omitMetadataKeys": "",
            "FLOWISE_CREDENTIAL_ID": "new cred uuid",
            "credential": "new cred uuid"
        },
        "splitterId": "tokenTextSplitter",
        "splitterName": "Token Text Splitter",
        "splitterConfig": {
            "encodingName": "cl100k_base",
            "chunkSize": "1500",
            "chunkOverlap": "150"
        },
        "totalChunks": 296,
        "totalChars": 944389,
        "status": "SYNC",
        "credential": "old cred uuid",
        "source": "None"
    }
]

To Reproduce

  1. Create a document store with an invalid credentials
  2. Change to a new credentials -> the load is not working
  3. Create a second loader use the new valid credentials -> loader ist working
  4. compare the compare of the column loaders in table document_store

Expected behavior

When changing the credentials the config is still consistent and the endpoint still work
e.g.

[
    {
        "id": "uuid....",
        "loaderId": "confluence",
        "loaderName": "SPACENAME",
        "loaderConfig": {
            "textSplitter": "",
            "baseUrl": "https://comapny.atlassian.net/wiki",
            "spaceKey": "SPACENAME",
            "limit": "",
            "metadata": "",
            "omitMetadataKeys": "",
            "FLOWISE_CREDENTIAL_ID": "new cred uuid",
            "credential": "new cred uuid"
        },
        "splitterId": "tokenTextSplitter",
        "splitterName": "Token Text Splitter",
        "splitterConfig": {
            "encodingName": "cl100k_base",
            "chunkSize": "1500",
            "chunkOverlap": "150"
        },
        "totalChunks": 296,
        "totalChars": 944389,
        "status": "SYNC",
        "credential": "new cred uuid",
        "source": "None"
    }
]

Screenshots

No response

Flow

No response

Use Method

Docker

Flowise Version

3.1.2

Operating System

Linux

Browser

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions