Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: update monitorv2 to allow inline actions #174

Merged
merged 7 commits into from
Dec 3, 2024

Conversation

obs-gh-catherman
Copy link
Collaborator

We moved the internal API to support one-shot create/update call SaveMonitorV2WithActions. This migrates the existing monitorv2 resource to use that function, which also allows for specifying shared actions (current feature support) and now also inline actions. We require that shared actions be separately managed resources and set using action id (again, current feautre support). Action ID is now optional, and instead a full action definition can be given inline which we translate to an Inline:true (private action).

Copy link
Collaborator

@obs-gh-abhinavpappu obs-gh-abhinavpappu left a comment

Choose a reason for hiding this comment

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

Left some comments, but overall looks good!

observe/resource_monitor_v2.go Show resolved Hide resolved
observe/resource_monitor_v2.go Outdated Show resolved Hide resolved
observe/resource_monitor_v2.go Show resolved Hide resolved
observe/resource_monitor_v2.go Outdated Show resolved Hide resolved
Comment on lines 39 to 43
// TODO: remove this. we are only doing this for shared actions
"inline": { // Boolean
Type: schema.TypeBool,
Optional: true,
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove? along with corresponding code in newMonitorV2ActionInput

observe/resource_monitor_v2_action_test.go Outdated Show resolved Hide resolved
observe/resource_monitor_v2_action_test.go Outdated Show resolved Hide resolved
observe/resource_monitor_v2_action_test.go Outdated Show resolved Hide resolved
We moved the internal API to support one-shot create/update
call SaveMonitorV2WithActions. This migrates the existing
monitorv2 resource to use that function, which also allows
for specifying shared actions (current feature support) and
now also inline actions. We require that shared actions be
separately managed resources and set using action id
(again, current feautre support). Action ID is now optional,
and instead a full action definition can be given inline
which we translate to an Inline:true (private action).
Copy link
Collaborator

@obs-gh-abhinavpappu obs-gh-abhinavpappu left a comment

Choose a reason for hiding this comment

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

lgtm!

@obs-gh-abhinavpappu obs-gh-abhinavpappu merged commit 526a97b into master Dec 3, 2024
4 of 5 checks passed
@obs-gh-abhinavpappu obs-gh-abhinavpappu deleted the rcc-mon-v2-oneshot branch December 3, 2024 18:42
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