Skip to content

Commit

Permalink
place pages under their space until we resolve the full tree
Browse files Browse the repository at this point in the history
  • Loading branch information
aubin-tchoi committed Dec 13, 2024
1 parent 6c92486 commit 6ddd02c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions connectors/src/connectors/confluence/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import {
getConfluencePageParentIds,
getSpaceHierarchy,
} from "@connectors/connectors/confluence/lib/hierarchy";
import { makePageInternalId } from "@connectors/connectors/confluence/lib/internal_ids";
import {
makePageInternalId,
makeSpaceInternalId,
} from "@connectors/connectors/confluence/lib/internal_ids";
import { makeConfluenceDocumentUrl } from "@connectors/connectors/confluence/temporal/workflow_ids";
import { dataSourceConfigFromConnector } from "@connectors/lib/api/data_source_config";
import { concurrentExecutor } from "@connectors/lib/async_utils";
Expand Down Expand Up @@ -373,6 +376,7 @@ export async function confluenceCheckAndUpsertPageActivity({
`version:${page.version.number}`,
...customTags,
];
const spaceId = makeSpaceInternalId(page.spaceId);

await upsertToDatasource({
dataSourceConfig,
Expand All @@ -381,8 +385,8 @@ export async function confluenceCheckAndUpsertPageActivity({
documentUrl,
loggerArgs,
// Parent Ids will be computed after all page imports within the space have been completed.
parents: [documentId],
parentId: null,
parents: [documentId, spaceId],
parentId: spaceId,
tags,
timestampMs: lastPageVersionCreatedAt.getTime(),
upsertContext: {
Expand Down

0 comments on commit 6ddd02c

Please sign in to comment.