Skip to content

feat(legacy): add --excluded-services option for log forwarding integrations - #20

Merged
pjcdawkins merged 4 commits into
mainfrom
cli-100
Jul 29, 2026
Merged

feat(legacy): add --excluded-services option for log forwarding integrations#20
pjcdawkins merged 4 commits into
mainfrom
cli-100

Conversation

@romainneutron

Copy link
Copy Markdown
Contributor

Allow users to exclude specific apps/services from log forwarding when adding or updating httplog, newrelic, splunk, sumologic, syslog, and otlplog integrations.

@romainneutron
romainneutron force-pushed the cli-100 branch 2 times, most recently from 3215205 to c1e1401 Compare February 18, 2026 14:51
Copilot AI review requested due to automatic review settings March 16, 2026 17:41

Copilot AI 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.

Pull request overview

Adds support in the legacy integration commands for excluding specific services from log forwarding integrations via a new --excluded-services option.

Changes:

  • Introduces an excluded_services ArrayField in the integration form, conditionally available for log-forwarding integration types.
  • Adds PHPUnit coverage to assert the field exists, is correctly typed, and is restricted to the expected integration types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
legacy/src/Command/Integration/IntegrationCommandBase.php Adds the new excluded_services field and CLI option wiring via the shared form fields.
legacy/tests/Command/Integration/IntegrationCommandBaseTest.php Adds tests validating the new field’s presence and conditional behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread legacy/src/Command/Integration/IntegrationCommandBase.php Outdated
Comment thread legacy/tests/Command/Integration/IntegrationCommandBaseTest.php Outdated
…rations

Allow users to exclude specific apps/services from log forwarding when
adding or updating httplog, newrelic, splunk, sumologic, syslog, and
otlplog integrations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pjcdawkins and others added 3 commits July 29, 2026 06:52
Spreading $logForwardingTypes into $allSupportedTypes moved 'script'
ahead of 'httplog', which renumbers the interactive type chooser and
changes the generated command reference. Restore the literal list and
use $logForwardingTypes only for the field conditions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@pjcdawkins pjcdawkins 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.

Reviewed and merging. Sorry this sat for so long.

Checked the property name, the array-of-strings type and the six-type list against the API spec, and confirmed that an absent flag yields null — so integration:update can't wipe an existing list and integration:add payloads are unchanged for existing users.

I pushed one commit rather than asking you to round-trip: spreading $logForwardingTypes into $allSupportedTypes moved script ahead of httplog, which renumbers the interactive type chooser and changes the generated command reference. $allSupportedTypes is back to its original literal and $logForwardingTypes is now used only for the field conditions. Also merged main in to refresh CI, since the original green run was from March.

Two follow-ups I'll pick up separately, neither blocking:

  • excluded_services sets optionName and default => [], both of which ArrayField already derives; the sibling excluded_environments omits them.
  • Docs: the forward-logs.md property table and the generated CLI reference both need updating. PR #117 adds --redaction to the same commands, so I'll do one docs pass after both land.

On the tests: testExcludedServicesFieldIncludedForLogForwardingTypes derives its expectation from the field under test, so it can't fail — worth replacing with getFinalValue(['a,b']) === ['a','b'] and a ConditionalFieldException case for a non-log-forwarding type if you touch this again.

@pjcdawkins
pjcdawkins merged commit 69a72fc into main Jul 29, 2026
5 checks passed
pjcdawkins added a commit to mharacewiat/upsun-cli that referenced this pull request Jul 29, 2026
PR upsun#20 extracted the six log-forwarding integration types into a
variable. Use it here instead of a fourth copy of the list, so adding
or removing a type updates every conditional field at once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pjcdawkins added a commit that referenced this pull request Jul 29, 2026
* feat(integration): add redaction field for httplog and otlplog

* refactor(legacy): reuse $logForwardingTypes for the redaction condition

PR #20 extracted the six log-forwarding integration types into a
variable. Use it here instead of a fourth copy of the list, so adding
or removing a type updates every conditional field at once.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Patrick Dawkins <patrick@upsun.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

3 participants