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

Field 'comment' not found in the schema #213

Closed
stawii opened this issue May 17, 2023 · 3 comments · Fixed by #214
Closed

Field 'comment' not found in the schema #213

stawii opened this issue May 17, 2023 · 3 comments · Fixed by #214
Assignees
Labels
bug Something isn't working released

Comments

@stawii
Copy link

stawii commented May 17, 2023

Describe the bug
Both routeros_ip_addresses and routeros_ip_routes data resources cannot parse comment field.

To Reproduce
Just use them, but make sure any of IP addresses has a comment.

data "routeros_ip_addresses" "main" {}

Expected behavior
Comment field is returned in schema (or silently ignored).

Additional context

The message that pops up:

│ Warning: Field 'comment' not found in the schema
│
│   with data.routeros_ip_addresses.main,
│   on main.tf line 17, in data "routeros_ip_addresses" "main":
│   17: data "routeros_ip_addresses" "main" {}
│
│ [MikrotikResourceDataToTerraformDatasource] the field was lost during the Schema development: ▷
│ 'comment': 'router.internal' ◁
│
│ (and 2 more similar warnings elsewhere)

This issue raises another story / bug. Whenever new fields are added to API, Terraform will report it not found in the schema with WARNING log-level. This is fine for provider developer or debugging however I found this annoying as provider user. I suggest reduce visibility of this message or to provide a way to silence it down.

@stawii stawii added the bug Something isn't working label May 17, 2023
@stawii
Copy link
Author

stawii commented May 17, 2023

Even comment in code suggests it should be for devs only ;)

// For development.
//panic("[MikrotikResourceDataToTerraformDatasource] the field was lost during development.: " + terraformSnakeName)
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Field '" + terraformSnakeName + "' not found in the schema",
Detail: fmt.Sprintf("[MikrotikResourceDataToTerraformDatasource] the field was lost during the Schema development: ▷ '%s': '%s' ◁",
terraformSnakeName, mikrotikValue),
})

[edit: bad lines in link]

@vaerh
Copy link
Collaborator

vaerh commented May 17, 2023

And that means the comments work :) My respect to you for finding them!
I'll be fixing that soon.

@vaerh vaerh self-assigned this May 17, 2023
vaerh added a commit that referenced this issue May 17, 2023
vaerh added a commit that referenced this issue May 17, 2023
* fix: Field 'comment' not found in the schema
Fixes #213

* test: Fix broken tests
@gfenn-newbury
Copy link
Collaborator

🎉 This issue has been resolved in version 1.9.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants