Skip to content

Conversation

@michaelmalave
Copy link
Contributor

@michaelmalave michaelmalave commented Dec 3, 2025

Summary

Surfaces the applied state of Trusted IP rules in the CLI. When rules are not applied, users see a warning with guidance to update their Trusted IP list to trigger re-application. When applied state is present, the following messages may be added in addition.

applied is true:
Trusted IP rules are applied to this space.
applied is false:
Trusted IP rules are not applied to this space. Update your Trusted IP list to trigger a re-application of the rules.

Type of Change

  • fix: Bug fix or issue (patch semvar update)
  • feat: Introduces a new feature to the codebase (minor semvar update)
  • perf: Performance improvement
  • docs: Documentation only changes
  • tests: Adding missing tests or correcting existing tests
  • chore: Code cleanup tasks, dependency updates, or other changes

Note: Add a ! after your change type to denote a breaking change.

Testing

yarn && yarn build

Follow guide for staging heroku environment here: staging setup.

heroku ps -a michael-test-fir-app

You may test the output of the commands is unchanged (also validated by the tests).

./bin/run spaces:trusted-ips --space michael-test-fir-space
./bin/run spaces:trusted-ips:add 0.0.0.0/0 --space michael-test-fir-space
./bin/run spaces:trusted-ips:remove 0.0.0.0/0 --space michael-test-fir-space

Expected Output to Compare

image

Additional Context

  • Implementation Details:
    • Added optional applied?: boolean field to InboundRuleset interface in fir.d.ts
    • Updated spaces:trusted-ips (list) command to display applied status after showing rules
    • Updated spaces:trusted-ips:add command to fetch ruleset after PUT and display applied status
    • Updated spaces:trusted-ips:remove command to fetch ruleset after PUT and display applied status
    • Messages displayed:
      • When applied === true: "Trusted IP rules are applied to this space."
      • When applied === false: Warning "Trusted IP rules are not applied to this space. Update your Trusted IP list to trigger a re-application of the rules."
      • When applied === undefined: No message (backward compatibility)
    • The applied field is optional to support API versions that don't include it yet. When the API always includes it, we can simplify by changing applied?: boolean to applied: boolean and removing undefined checks.

Related Issue

Resolves W-19525782 - CLI should surface the applied state of Trusted IP updates

@michaelmalave michaelmalave requested a review from a team as a code owner December 3, 2025 19:41
@git2gus
Copy link

git2gus bot commented Dec 3, 2025

Git2Gus App is installed but the .git2gus/config.json doesn't exist.

Copy link
Contributor

@tlowrimore-heroku tlowrimore-heroku left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@mandelbro mandelbro left a comment

Choose a reason for hiding this comment

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

Had a comment/question

@michaelmalave michaelmalave merged commit 217271b into main Dec 8, 2025
8 checks passed
@michaelmalave michaelmalave deleted the mm/feat/surface-trusted-ip-state branch December 8, 2025 16:07
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