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

QualityMonitor error: Could not find required property 'monitorID' in state. #669

Closed
zhukovgreen opened this issue Dec 11, 2024 · 4 comments · Fixed by #672
Closed

QualityMonitor error: Could not find required property 'monitorID' in state. #669

zhukovgreen opened this issue Dec 11, 2024 · 4 comments · Fixed by #672
Assignees
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed

Comments

@zhukovgreen
Copy link

Describe what happened

When creating a quality monitor the monitor is created on the databricks but pulumi fails with this error:

error: Could not find required property 'monitorID' in state. This is an error in databricks resource provider, please report at https://github.com/pulumi/pulumi-databricks

Tried:

❯ export USE_SDK_V2_RESOURCES="QualityMonitor"

with no success or change.

When I am downgrading the version from 1.56.1 -> 1.54 the issue disappearing

Sample program

Nothing special, just create a basic monitor

from pulumi_databricks import (QualityMonitor, QualityMonitorNotificationsArgs,
                               QualityMonitorNotificationsOnFailureArgs,
                               QualityMonitorScheduleArgs,
                               QualityMonitorSnapshotArgs)

quality_monitor = QualityMonitor(
    resource_name="SomeName",
    table_name="some_catalog.schema.tableA",
    assets_dir="Workspace/Users/[email protected]/assets",
    output_schema_name="some_catalog.schema",
    snapshot=QualityMonitorSnapshotArgs(),
    schedule=QualityMonitorScheduleArgs(
        quartz_cron_expression="* * * * ? *",
        timezone_id="UTC",
    ),
    notifications=QualityMonitorNotificationsArgs(
        on_failure=QualityMonitorNotificationsOnFailureArgs(
            email_addresses=[some @ user.com],
        )
    ),
)

Log output

11:28:36   Info     |       databricks:index:QualityMonitor (dev_pcty_dingo_dev_bronze_applicant):
11:28:36   Info     |       error: Could not find required property 'monitorID' in state. This is an error in databricks resource provider, please report at https://github.com/pulumi/pulumi-databricks

Affected Resource(s)

databricks:index:QualityMonitor

Output of pulumi about

CLI          
Version      3.142.0
Go Version   go1.23.3
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  databricks  1.56.1
language  python      unknown

Host     
OS       darwin
Version  14.7.1
Arch     arm64

This project is written in python: executable='/Users/uname/Documents/mycvompany/dst-my_project/.venv/bin/python3' version='3.10.12'

Current Stack: organization/my_project/my-project

TYPE                                                              URN
pulumi:pulumi:Stack                                               urn:pulumi:my-project::my_project::pulumi:pulumi:Stack::my_project-my-project
dqbeaver:TableDataQualityMonitor                                  urn:pulumi:my-project::my_project::dqbeaver:TableDataQualityMonitor::dev_my_project_askjdhfaksjdfhajksdhfikad
pulumi:providers:databricks                                       urn:pulumi:my-project::my_project::pulumi:providers:databricks::default_1_56_1


Found no pending operations associated with my-project

Backend        
Name         username-mac
URL            s3://state-bucket/
User           username
Organizations  
Token type     personal

Dependencies:
NAME            VERSION
black           24.10.0
bump2version    1.0.1
chispa          0.10.1
delta-spark     3.0.0rc1
gitchangelog    3.0.4
isort           5.13.2
mypy            1.13.0
my_project      3.9.0
pre_commit      4.0.1
pystache        0.6.5
pytest-cov      6.0.0
pytest-mock     3.14.0
ruff            0.8.2
setuptools-git  1.2
sqlvalidator    0.0.20
types-PyYAML    6.0.12.20240917
types-requests  2.32.0.20241016
wheel           0.45.1

Pulumi locates its logs in /var/folders/w1/vq58ccpx3ks6vp7p_zwb7bn40000gq/T/ by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@zhukovgreen zhukovgreen added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 11, 2024
@iwahbe iwahbe added impact/regression Something that used to work, but is now broken p1 A bug severe enough to be the next item assigned to an engineer labels Dec 12, 2024
@iwahbe iwahbe self-assigned this Dec 12, 2024
@iwahbe iwahbe removed the needs-triage Needs attention from the triage team label Dec 12, 2024
@iwahbe
Copy link
Member

iwahbe commented Dec 12, 2024

Hi @zhukovgreen. Thanks for reporting this issue. We'll take a look as soon as possible to try to get this resolved.

iwahbe added a commit that referenced this issue Dec 12, 2024
Previously, we had:

```
 					"id": {Name: "monitorId"},
 				},
 				ComputeID: tfbridge.DelegateIDField(
 					"monitorID",
 					"databricks",
 					"https://github.com/pulumi/pulumi-databricks",
```

Note that the name assigned to `"id"` (`"monitorId"`) doesn't match the name of the field
we told `tfbridge.DelegateIDField` to find the ID in (`"monitorID"`). These **must** match
for `tfbridge.DelegateIDField` to work.

Fixes #669
@iwahbe iwahbe closed this as completed in 7a5cc82 Dec 12, 2024
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 12, 2024
@iwahbe
Copy link
Member

iwahbe commented Dec 12, 2024

This should be fixed in the next patch release (going out now). Please let us know if this doesn't fix the problem for you.

@zhukovgreen
Copy link
Author

Thanks

@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #672 and shipped in release v1.56.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/regression Something that used to work, but is now broken kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants