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

docs missing deprecation notice and migration steps #237

Closed
Tracked by #217
matifali opened this issue Jun 3, 2024 · 5 comments · Fixed by #245
Closed
Tracked by #217

docs missing deprecation notice and migration steps #237

matifali opened this issue Jun 3, 2024 · 5 comments · Fixed by #245
Assignees
Labels
docs Improvements or additions to documentation

Comments

@matifali
Copy link
Member

matifali commented Jun 3, 2024

Provider docs at registry.coder.com do not mention the deprecation of parameters.

For example, multiple fields of data.coder_workspace were deprecated in v0.23.0, but the docs at https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/workspace do not indicate any such information.

Additionally, when a resource is deprecated, the message should contain the new resource to be migrated to or a link to some migration guide both in Terraform logs and on the docs page.

@coder-labeler coder-labeler bot added the docs Improvements or additions to documentation label Jun 3, 2024
@matifali
Copy link
Member Author

matifali commented Jun 3, 2024

related #203

@johnstcn
Copy link
Member

johnstcn commented Jun 4, 2024

Looks like you need to specify DeprecationMessage and not just Deprecated.
https://developer.hashicorp.com/terraform/plugin/framework/handling-data/schemas#deprecationmessage-1

@stirby stirby assigned stirby and mtojek and unassigned stirby Jun 24, 2024
@mtojek
Copy link
Member

mtojek commented Jun 25, 2024

@johnstcn DeprecationMessage is available only for entire Resources, here we want to deprecate a few properties.

I will check if there is an option to customize the template and include the deprecation message in Markdown files.

@mtojek
Copy link
Member

mtojek commented Jun 25, 2024

Ok, I researched the issue. It may not be a straightforward solution or, in other words, it could be easier to apply patch .md files.

The docs generator strongly depends on providers schema:

Screenshot 2024-06-25 at 16 02 38... and the schema does not expose the deprecation message.

It would be hard/impossible to expose the message via the fork&modify approach, so my recommendation is to implement a script which will run after the hashicorp generator, and "patch" docs:

- `owner_email` (String, Deprecated) Email address of the workspace owner.

->

- `owner_email` (String, Deprecated: Use `coder_workspace_owner.email` instead.) Email address of the workspace owner.

@johnstcn @stirby Please let me know your thoughts 👍

@johnstcn
Copy link
Member

Thanks for investigating! I think that's a perfectly valid workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants