Skip to content

feat: add countryCodeIgnoreList to site llmo config#1447

Merged
akshaymagapu merged 4 commits intomainfrom
feat/country-code-ignore-list
Mar 20, 2026
Merged

feat: add countryCodeIgnoreList to site llmo config#1447
akshaymagapu merged 4 commits intomainfrom
feat/country-code-ignore-list

Conversation

@akshaymagapu
Copy link
Copy Markdown
Contributor

Summary

  • Add per-site countryCodeIgnoreList configuration under llmo in site config
  • Allows sites to specify 2-letter country codes (e.g., PS, AD) that should be ignored in CDN logs reports and fall back to GLOBAL
  • Adds Joi schema validation, getter (getLlmoCountryCodeIgnoreList), and updater (updateLlmoCountryCodeIgnoreList)

Context

Some sites have URL path segments like /ps/ that match country code patterns but don't represent actual countries. This config lets admins exclude those codes per-site.

Dependent PRs

  • adobe/spacecat-audit-worker: consumes this config in CDN logs report processing
  • adobe/spacecat-api-service: exposes PATCH endpoint to update this config

Test plan

  • Unit tests for getter, updater, and schema validation
  • CI passes

🤖 Generated with Claude Code

Add per-site country code ignore list configuration for CDN logs reports.
This allows sites to specify country codes (e.g., 'PS', 'AD') that should
be treated as GLOBAL when extracted from URL paths, avoiding false positives
where path segments like '/ps/' don't represent actual country codes.

- Add countryCodeIgnoreList Joi schema (array of 2-char uppercase strings)
- Add getLlmoCountryCodeIgnoreList() accessor
- Add updateLlmoCountryCodeIgnoreList() updater

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@akshaymagapu akshaymagapu force-pushed the feat/country-code-ignore-list branch from 46771c5 to a594a06 Compare March 18, 2026 10:35
Remove .uppercase() Joi constraint since the audit worker already
handles case normalization via .toUpperCase(). This allows storing
values in any case (e.g., 'ps', 'PS', 'Ps') without validation errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@akshaymagapu akshaymagapu marked this pull request as ready for review March 19, 2026 13:22
@github-actions
Copy link
Copy Markdown

This PR will trigger a minor release when merged.

@akshaymagapu akshaymagapu merged commit 6d824f8 into main Mar 20, 2026
7 checks passed
@akshaymagapu akshaymagapu deleted the feat/country-code-ignore-list branch March 20, 2026 08:23
solaris007 pushed a commit that referenced this pull request Mar 20, 2026
## [@adobe/spacecat-shared-data-access-v3.27.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.26.0...@adobe/spacecat-shared-data-access-v3.27.0) (2026-03-20)

### Features

* add countryCodeIgnoreList to site llmo config ([#1447](#1447)) ([6d824f8](6d824f8))
@solaris007
Copy link
Copy Markdown
Member

🎉 This PR is included in version @adobe/spacecat-shared-data-access-v3.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants