Skip to content

feat: update onboarding flow to align with audit-worker config-free execution #2541

Open
tkotthakota-adobe wants to merge 4 commits into
mainfrom
SITES-45860
Open

feat: update onboarding flow to align with audit-worker config-free execution #2541
tkotthakota-adobe wants to merge 4 commits into
mainfrom
SITES-45860

Conversation

@tkotthakota-adobe

@tkotthakota-adobe tkotthakota-adobe commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

https://jira.corp.adobe.com/browse/SITES-45860

Following the recent audit-worker change that allows audits to run regardless of configuration state, the onboarding flow no longer needs to enable audits in the global configuration before triggering them.

  • Audit enable is now gated to scheduledRun=true only — enabling in config is only needed for recurring scheduled runs; one-shot onboards rely on the audit-worker firing without a config entry
  • Fixed auditTypes in disableImportAndAuditJob taskContext — was hardcoded to [], now correctly passes the full profile audit type list so the task processor can clean up any audits that were enabled
  • Added exceljs and iso-3166 to ESLint import/no-unresolved ignore list — these installed packages cannot be statically resolved by the ESLint import resolver (same pattern as @octokit/rest)

@tkotthakota-adobe tkotthakota-adobe changed the title fix: No need to enable audits when scheduled run is false feat: update onboarding flow to align with audit-worker config-free execution Jun 3, 2026
@tkotthakota-adobe tkotthakota-adobe changed the title feat: update onboarding flow to align with audit-worker config-free execution feat: update onboarding flow to align with audit-worker config-free execution Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

This PR will trigger no release when merged.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tathagat2241 tathagat2241 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Issues

Bug — Dead code in else if (scheduledRun) (Critical)

File: src/support/utils.js, around line 1814

// Before
} else {
log.debug(All the required audits...);
}

// After
} else if (scheduledRun) { // ← always false here
log.debug(All the required audits...);
}

This block is unreachable. We're in the else branch of if (scheduledRun), so scheduledRun is guaranteed to be false — the else if (scheduledRun) condition can never be true. The debug log will never fire.

Intent is unclear — was the goal to remove the log entirely, or to replace it with a different message for the non-scheduled case? Either way, else if (scheduledRun) here is logically impossible and should be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants