adobe / adobe/spacecat-shared

How to handle audit enabling/disabling for DEFAULT_ORGANIZATION_ID sites

Open
#204 0 comments 0 reactions 3 assignees Claimed by @meryllblanchet View on GitHub
question
Dominant language
JavaScript
Stars
5
Forks
2
Avg merge
19h 55m
Merged PRs (30d)
33

Description

## Overview
How to handle audit enabling/disabling for DEFAULT_ORGANIZATION_ID sites

## Details
https://cq-dev.slack.com/archives/C05A45JBP9N/p1712563602198179

https://github.com/adobe/spacecat-api-service/blob/main/src/controllers/trigger/common/trigger.js#L56
https://github.com/adobe/spacecat-shared/blob/528b370751b275c309c050c59de77eac0ccccf62/packages/spacecat-shared-utils/src/helpers.js#L41

All created sites land in the `default` organization, if not otherwise set to a proper organization.
=> all audits (yes, there are exceptions that were not migrated to checking `isAuditsDisabled` common helper) for sites in the "default" organization are disabled, even if they are later set to enabled at site-level.

If we enable `default` organization for all audits, then we have to disable all audits for all sites created in the `default` org first, and re-enable manually for selected ones.

If we create a separate org for the site that revealed this issue to overcome the above, then that org is not DEFAULT_ORGANIZATION_ID and might break reporting about how many real validated customer orgs/sites vs DEFAULT_ORGANIZATION_ID.

## Proposed Actions
and now?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.