Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
2992d0b
bot detection logic
tkotthakota-adobe Dec 23, 2025
0212b84
test fix
tkotthakota-adobe Dec 23, 2025
b4a71a3
fix
tkotthakota-adobe Dec 23, 2025
e05927b
fix tests
tkotthakota-adobe Dec 23, 2025
d1a3b28
fix intermitent test failures
tkotthakota-adobe Dec 23, 2025
d27a645
merge main
tkotthakota-adobe Jan 5, 2026
b1e15ab
tests
tkotthakota-adobe Jan 5, 2026
f5736e6
Merge branch 'main' of github.com:adobe/spacecat-task-processor into …
tkotthakota-adobe Jan 6, 2026
161a5f0
merge main
tkotthakota-adobe Jan 6, 2026
7e25c7e
update shared lib
tkotthakota-adobe Jan 7, 2026
7c11cd9
read bot protection from scrape metadata
tkotthakota-adobe Jan 7, 2026
c05acb5
test
tkotthakota-adobe Jan 7, 2026
842343d
test
tkotthakota-adobe Jan 7, 2026
6615a8d
improve tests
tkotthakota-adobe Jan 7, 2026
8e04b1a
Merge branch 'main' of github.com:adobe/spacecat-task-processor into …
tkotthakota-adobe Jan 7, 2026
6621caa
merge main + update lib
tkotthakota-adobe Jan 7, 2026
0a46462
read content scraper logs when bot protection detected
tkotthakota-adobe Jan 8, 2026
3a80e36
read bot protection flag from scrape results
tkotthakota-adobe Jan 9, 2026
f378b77
test coverage
tkotthakota-adobe Jan 9, 2026
d7f7680
empty scrape.json to check bot protection
tkotthakota-adobe Jan 9, 2026
b3f3681
merge main
tkotthakota-adobe Jan 9, 2026
c5123d6
updated lib
tkotthakota-adobe Jan 9, 2026
c4f2d82
simplify logic
tkotthakota-adobe Jan 10, 2026
8040961
simplify logic to just read logs for bot protection
tkotthakota-adobe Jan 10, 2026
7054885
merge main
tkotthakota-adobe Jan 10, 2026
4d02b7f
adjust logs
tkotthakota-adobe Jan 11, 2026
262dfb1
refactor to simplify logic
tkotthakota-adobe Jan 12, 2026
8f80a78
increase tests
tkotthakota-adobe Jan 12, 2026
441b26f
debug logs
tkotthakota-adobe Jan 13, 2026
59330a0
use jobId to check content scraper logs
tkotthakota-adobe Jan 13, 2026
5e20ebf
add scraper as dependency in opportunity map
tkotthakota-adobe Jan 13, 2026
9a26142
log fix
tkotthakota-adobe Jan 14, 2026
9c4c356
merge main
tkotthakota-adobe Jan 20, 2026
73e689b
tests
tkotthakota-adobe Jan 20, 2026
47a82ba
test fix
tkotthakota-adobe Jan 20, 2026
a856322
remove debug logs
tkotthakota-adobe Jan 22, 2026
87a4799
update lib
tkotthakota-adobe Jan 22, 2026
60ca00d
merge main
tkotthakota-adobe Jan 24, 2026
24eb235
new lib
tkotthakota-adobe Jan 26, 2026
c7884a9
package
tkotthakota-adobe Jan 26, 2026
c20b813
package
tkotthakota-adobe Jan 26, 2026
fc60045
package update
tkotthakota-adobe Jan 27, 2026
8e77dda
test fix
tkotthakota-adobe Jan 27, 2026
4346b84
Merge branch 'main' of github.com:adobe/spacecat-task-processor into …
tkotthakota-adobe Jan 28, 2026
1c33a97
update lib
tkotthakota-adobe Feb 2, 2026
927c865
merge main
tkotthakota-adobe Feb 2, 2026
b5120ea
simplify logic
tkotthakota-adobe Feb 2, 2026
0d99c3d
test fixes
tkotthakota-adobe Feb 3, 2026
690562f
test fix
tkotthakota-adobe Feb 3, 2026
9962ada
test fix
tkotthakota-adobe Feb 3, 2026
a730fd6
refactor to read abort info stats from database
tkotthakota-adobe Feb 3, 2026
ba12414
test fix
tkotthakota-adobe Feb 3, 2026
7b199e4
test fix
tkotthakota-adobe Feb 3, 2026
4a34ed3
fix to scraper client lib
tkotthakota-adobe Feb 4, 2026
f0d14b9
debugs
tkotthakota-adobe Feb 4, 2026
06c1115
add sqsWrapper dependency needed for scrape client
tkotthakota-adobe Feb 4, 2026
314c113
Add SCRAPE_JOB_CONFIGURATION
tkotthakota-adobe Feb 4, 2026
0ad7885
debug logs
tkotthakota-adobe Feb 4, 2026
2b96dfc
use siteUrl
tkotthakota-adobe Feb 4, 2026
5ac841c
update lib
tkotthakota-adobe Feb 5, 2026
5e92990
Merge branch 'main' of github.com:adobe/spacecat-task-processor into …
tkotthakota-adobe Feb 5, 2026
68b7866
updated libs
tkotthakota-adobe Feb 5, 2026
583d63b
resolveCanonialUrl null return handling
tkotthakota-adobe Feb 6, 2026
a9740a6
debug logs
tkotthakota-adobe Feb 6, 2026
94d311d
retry logic to get abort info
tkotthakota-adobe Feb 6, 2026
a0a6c19
adjust wait time
tkotthakota-adobe Feb 6, 2026
542550f
refactor to have bot detection logic in new file
tkotthakota-adobe Feb 6, 2026
eb602ef
cleanup
tkotthakota-adobe Feb 7, 2026
ebd7544
address review comments
tkotthakota-adobe Feb 7, 2026
b0a28a3
update lib and log fix
tkotthakota-adobe Feb 7, 2026
df238d8
merge main
tkotthakota-adobe Feb 7, 2026
21e932b
slack lib
tkotthakota-adobe Feb 8, 2026
9f3e153
test fix
tkotthakota-adobe Feb 8, 2026
2ccb4e8
updated lib
tkotthakota-adobe Feb 8, 2026
e6ba882
add logs + updated libs
tkotthakota-adobe Feb 9, 2026
6928533
remove unused s3 lib
tkotthakota-adobe Feb 9, 2026
190a6ba
add test
tkotthakota-adobe Feb 9, 2026
039dd58
revert slack client lib to old version
tkotthakota-adobe Feb 9, 2026
40640ac
lock file
tkotthakota-adobe Feb 9, 2026
6815d07
restore s3 lib + slack client
tkotthakota-adobe Feb 9, 2026
0d9d05d
update helix deploy lib version
tkotthakota-adobe Feb 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10,970 changes: 5,272 additions & 5,698 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,19 @@
"@adobe/helix-status": "10.1.5",
"@adobe/helix-universal": "5.4.0",
"@adobe/helix-universal-logger": "3.0.28",
"@adobe/spacecat-shared-data-access": "2.100.1",
"@adobe/spacecat-shared-data-access": "2.104.0",
"@adobe/spacecat-shared-google-client": "1.4.63",
"@adobe/spacecat-shared-gpt-client": "1.6.16",
"@adobe/spacecat-shared-http-utils": "1.19.4",
"@adobe/spacecat-shared-ims-client": "1.11.9",
"@adobe/spacecat-shared-rum-api-client": "2.40.6",
"@adobe/spacecat-shared-scrape-client": "2.3.7",
"@adobe/spacecat-shared-slack-client": "1.5.33",
"@adobe/spacecat-shared-utils": "1.90.1",
"@aws-sdk/client-cloudwatch-logs": "3.985.0",
"@adobe/spacecat-shared-scrape-client": "2.5.0",
"@adobe/spacecat-shared-slack-client": "1.6.0",
"@adobe/spacecat-shared-utils": "1.91.0",
"@aws-sdk/client-lambda": "3.985.0",
"@aws-sdk/client-sqs": "3.985.0",
"@aws-sdk/client-s3": "3.985.0",
"@aws-sdk/client-cloudwatch-logs": "3.985.0",
"@aws-sdk/credential-provider-node": "3.972.6",
"aws-xray-sdk": "3.12.0",
"cheerio": "1.2.0",
Expand All @@ -98,7 +99,7 @@
},
"devDependencies": {
"@adobe/eslint-config-helix": "3.0.17",
"@adobe/helix-deploy": "13.2.11",
"@adobe/helix-deploy": "13.2.12",
"@adobe/helix-universal": "5.4.0",
"@adobe/helix-universal-devserver": "1.1.145",
"@adobe/semantic-release-coralogix": "1.1.40",
Expand Down Expand Up @@ -134,7 +135,7 @@
},
"overrides": {
"@adobe/fetch": "4.2.3",
"@adobe/spacecat-shared-data-access": "2.100.1"
"@adobe/spacecat-shared-data-access": "2.104.0"
},
"lint-staged": {
"*.js": "eslint",
Expand Down
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
badRequest,
} from '@adobe/spacecat-shared-http-utils';
import { imsClientWrapper } from '@adobe/spacecat-shared-ims-client';
import { isNonEmptyObject, sqsEventAdapter } from '@adobe/spacecat-shared-utils';
import { isNonEmptyObject, sqsEventAdapter, sqsWrapper } from '@adobe/spacecat-shared-utils';

import { runOpportunityStatusProcessor as opportunityStatusProcessor } from './tasks/opportunity-status-processor/handler.js';
import { runDisableImportAuditProcessor as disableImportAuditProcessor } from './tasks/disable-import-audit-processor/handler.js';
Expand Down Expand Up @@ -86,13 +86,15 @@ async function processTask(message, context) {

const runSQS = wrap(processTask)
.with(dataAccess)
.with(sqsWrapper)
.with(sqsEventAdapter)
.with(imsClientWrapper)
.with(secrets, { name: getSecretName })
.with(helixStatus);

const runDirect = wrap(processTask)
.with(dataAccess)
.with(sqsWrapper)
.with(imsClientWrapper)
.with(secrets, { name: getSecretName })
.with(helixStatus);
Expand Down
21 changes: 11 additions & 10 deletions src/tasks/cwv-demo-suggestions-processor/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import fs from 'fs';
import path from 'path';
import { isNonEmptyArray } from '@adobe/spacecat-shared-utils';
import { ok } from '@adobe/spacecat-shared-http-utils';

import { say } from '../../utils/slack-utils.js';

Expand Down Expand Up @@ -299,32 +300,32 @@ export async function runCwvDemoSuggestionsProcessor(message, context) {

try {
if (!profile || profile !== DEMO) {
return {
return ok({
message: 'CWV processing skipped - not a demo profile',
reason: 'non-demo-profile',
profile,
suggestionsAdded: 0,
};
});
}

const site = await Site.findById(siteId);
if (!site) {
log.error(`Site not found for siteId: ${siteId}`);
return {
return ok({
message: 'Site not found',
suggestionsAdded: 0,
};
});
}

const opportunities = await site.getOpportunities();
const cwvOpportunities = opportunities.filter((opp) => opp.getType() === 'cwv');

if (cwvOpportunities.length === 0) {
await say(env, log, slackContext, 'No CWV opportunities found for site, skipping generic suggestions');
return {
return ok({
message: 'No CWV opportunities found',
suggestionsAdded: 0,
};
});
}

const suggestionsUpdated = await processCWVOpportunity(
Expand All @@ -334,18 +335,18 @@ export async function runCwvDemoSuggestionsProcessor(message, context) {
slackContext,
);

return {
return ok({
message: 'CWV demo suggestions processor completed',
opportunitiesProcessed: 1,
suggestionsAdded: suggestionsUpdated,
};
});
} catch (error) {
log.error('Error in CWV demo suggestions processor:', error);
return {
return ok({
message: 'CWV demo suggestions processor completed with errors',
error: error.message,
suggestionsAdded: 0,
};
});
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/tasks/demo-url-processor/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ export async function runDemoUrlProcessor(message, context) {
}

const demoUrl = `${experienceUrl}?organizationId=${organizationId}#/@${imsTenantId}/sites-optimizer/sites/${siteId}/home`;
const slackMessage = `:white_check_mark: Onboarding setup completed successfully for the site ${siteUrl}!\nAccess your environment here: ${demoUrl}`;
const slackMessage = `:white_check_mark: Onboarding setup completed for the site ${siteUrl}!\nAccess your environment here: ${demoUrl}`;

if (slackContext) {
await say(env, log, slackContext, slackMessage);
}

log.info(`Onboarding setup completed successfully for the site ${siteUrl}! Access your environment here: ${demoUrl}`);
log.info(`Onboarding setup completed for the site ${siteUrl}! Access your environment here: ${demoUrl}`);

return ok({ message: 'Demo URL processor completed' });
}
Expand Down
Loading