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

"Import" section unexpectedly at top of page, and often presents incorrect information #5973

Open
lukehoban opened this issue Dec 14, 2020 · 12 comments
Labels
area/docs Hand-written documentation. For api docs, see area/api-docs. docs/api docs/autogenerated kind/bug Some behavior is incorrect or out of spec

Comments

@lukehoban
Copy link
Contributor

The "Import" section is intended to be at the bottom of resource docs pages, and for most resources it is. However, on https://www.pulumi.com/docs/reference/pkg/docker/service/, the "Import" section is at the top of the page - which looks very out of place. This is true for 2 of the 10 resources in this package.

Screen Shot 2020-12-14 at 9 15 39 AM

@lukehoban
Copy link
Contributor Author

Also on https://www.pulumi.com/docs/reference/pkg/aws/ec2/tag/.

This feels pretty important to fix.

@davidwrede davidwrede added the kind/bug Some behavior is incorrect or out of spec label May 7, 2021
@nimbinatus
Copy link

Another wonky Docker page at https://www.pulumi.com/docs/reference/pkg/docker/container/, though this one looks like there's some Markdown getting spliced somehow.
Screen Shot 2021-09-09 at 2 07 33 PM

@lukehoban
Copy link
Contributor Author

lukehoban commented Nov 16, 2021

Another case like this is https://www.pulumi.com/registry/packages/vsphere/api-docs/hostportgroup/#importing, which has this section at the top of the page, but also somehow shows a multi-lang example section with no content instead of an import statement.

Screen Shot 2021-11-16 at 9 40 07 AM

@lukehoban lukehoban changed the title "Import" section unexpectedly at top of page "Import" section unexpectedly at top of page, and often presents incorrect information Nov 16, 2021
@lukehoban
Copy link
Contributor Author

There are also cases where the import section goes missing entirely - like https://www.pulumi.com/registry/packages/vsphere/api-docs/computecluster/.

@susanev
Copy link
Contributor

susanev commented Feb 25, 2022

there seems to be more brokenness on this now
broken

@susanev susanev added the area/docs Hand-written documentation. For api docs, see area/api-docs. label Apr 30, 2023
@jkodroff
Copy link
Member

jkodroff commented Jul 8, 2023

Seeing the same thing for snowflake.GrantPrivilegesToRole:

image

Checking out the description in the schema:

"description": "{{% examples %}}\n## Example Usage\n### global privileges\n##################################\n\n# list of privileges\nresource \"snowflake_grant_privileges_to_role\" \"g1\" {\n  privileges = [\"MODIFY\", \"USAGE\"]\n  role_name  = snowflake_role.r.name\n  on_account = true\n}\n\n# all privileges + grant option\nresource \"snowflake_grant_privileges_to_role\" \"g2\" {\n  role_name         = snowflake_role.r.name\n  on_account        = true\n  all_privileges    = true\n  with_grant_option = true\n}\n\n##################################\n### account object privileges\n##################################\n\n# list of privileges\nresource \"snowflake_grant_privileges_to_role\" \"g3\" {\n  privileges = [\"CREATE\", \"MONITOR\"]\n  role_name  = snowflake_role.r.name\n  on_account_object {\n    object_type = \"DATABASE\"\n    object_name = snowflake_database.d.name\n  }\n}\n\n# all privileges + grant option\nresource \"snowflake_grant_privileges_to_role\" \"g4\" {\n  role_name = snowflake_role.r.name\n  on_account_object {\n    object_type = \"DATABASE\"\n    object_name = snowflake_database.d.name\n  }\n  all_privileges    = true\n  with_grant_option = true\n}\n\n##################################\n### schema privileges\n##################################\n\n# list of privileges\nresource \"snowflake_grant_privileges_to_role\" \"g5\" {\n  privileges = [\"MODIFY\", \"CREATE TABLE\"]\n  role_name  = snowflake_role.r.name\n  on_schema {\n    schema_name = \"\\\"my_db\\\".\\\"my_schema\\\"\" # note this is a fully qualified name!\n  }\n}\n\n# all privileges + grant option\nresource \"snowflake_grant_privileges_to_role\" \"g6\" {\n  role_name = snowflake_role.r.name\n  on_schema {\n    schema_name = \"\\\"my_db\\\".\\\"my_schema\\\"\" # note this is a fully qualified name!\n  }\n  all_privileges    = true\n  with_grant_option = true\n}\n\n# all schemas in database\nresource \"snowflake_grant_privileges_to_role\" \"g7\" {\n  privileges = [\"MODIFY\", \"CREATE TABLE\"]\n  role_name  = snowflake_role.r.name\n  on_schema {\n    all_schemas_in_database = snowflake_database.d.name\n  }\n}\n\n# future schemas in database\nresource \"snowflake_grant_privileges_to_role\" \"g8\" {\n  privileges = [\"MODIFY\", \"CREATE TABLE\"]\n  role_name  = snowflake_role.r.name\n  on_schema {\n    future_schemas_in_database = snowflake_database.d.name\n  }\n}\n\n##################################\n{{% /examples %}}\n\n## Import\n\nformat is role_name (string) | privileges (comma-delimited string) | all_privileges (bool) |with_grant_option (bool) | on_account (bool) | on_account_object (bool) | on_schema (bool) | on_schema_object (bool) | all (bool) | future (bool) | object_type (string) | object_name (string) | object_type_plural (string) | in_schema (bool) | schema_name (string) | in_database (bool) | database_name (string)\n\n```sh\n $ pulumi import snowflake:index/grantPrivilegesToRole:GrantPrivilegesToRole \"test_role|MANAGE GRANTS,MONITOR USAGE|false|false|true|false|false|false|false|false||||false||false|\"\n```\n\n ",

I noticed a couple of possibly interesting conditions:

  1. There's no description - it just jumps right into examples.
  2. The examples do not render either.

@mnlumi
Copy link
Contributor

mnlumi commented Jul 26, 2023

Given this comment:

Closing as dupe of #5973. Though the problem itself is most likely in tfbridge or docsgen.

Does this ticket need to be transferred to a different repo? Is a separate ticket needed to investigate in docsgen or tfbridge? cc @mikhailshilkov @justinvp

Most of the occurrences here are still an issue.

@cnunciato
Copy link
Contributor

@mnlumi I think this is the right place for now. If it turns out the issue is something outside the scope of docs rendering, we'll transfer to another repo.

@jkodroff
Copy link
Member

@interurban interurban self-assigned this Aug 30, 2023
@interurban interurban added this to the 0.93 milestone Aug 30, 2023
@mnlumi
Copy link
Contributor

mnlumi commented Sep 8, 2023

@mikhailshilkov mikhailshilkov modified the milestones: 0.93, 0.94 Sep 11, 2023
@sean1588
Copy link
Member

sean1588 commented Sep 13, 2023

Does this ticket need to be transferred to a different repo? Is a separate ticket needed to investigate in docsgen or tfbridge? cc @mikhailshilkov @justinvp

I have a feeling this issue likely resides in the bridge since the content that is rendered on these pages is embedded directly in the description property of that resource in the provider's schema file (and I do see the description beginning with the "Import" section first in these cases). Should this get transferred to the terraform bridge repo perhaps?

@mikhailshilkov mikhailshilkov removed this from the 0.94 milestone Oct 4, 2023
@thoward thoward transferred this issue from pulumi/docs Nov 13, 2024
@github-actions github-actions bot added the needs-triage Needs attention from the triage team label Nov 13, 2024
@thoward thoward removed this from Docs 📚 Nov 13, 2024
@jkodroff
Copy link
Member

Related: pulumi/pulumi-docker#1278

@mjeffryes mjeffryes removed the needs-triage Needs attention from the triage team label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Hand-written documentation. For api docs, see area/api-docs. docs/api docs/autogenerated kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests