Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(docs): move coder_parameter example#243

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
stirby merged 11 commits intomainfromcoder-parameter-example
Jun 25, 2024
Merged

Conversation

stirby
Copy link
Contributor

@stirbystirby commentedJun 24, 2024
edited
Loading

Thecoder_parameterdata-source's code example was in theresources directory by mistake, moved.

Fixes#242.


Curious what the failedexamples_test.go looks like so intentionally ignored.

@stirbystirby requested a review frommtojekJune 24, 2024 20:04
@stirby
Copy link
ContributorAuthor

stirby commentedJun 24, 2024
edited
Loading

@mtojek I removed thecoder_parameter test fromexamples_test.go since that test targets resources specifically.

I find it interesting that the only two resources which don't generate code examples in the docs are prefixed with the provider.

Sincecoder_workspace_tags is in the correct directory, the problem may be deeper than a pathing issue.

I couldn't find any errors in the output ofmake gen'stfplugindocs call:

...generating missing resource contentgenerating new template for "coder_app"...generating missing data source content...generating new template for data-source "coder_workspace_owner"generating new template for data-source "coder_workspace_tags"...generating new template for data-source "coder_parameter"generating missing function contentgenerating missing provider content...

I also tried to add other resources to theexamples_test.go, each of which failed.


All this said, I would actually like to take a stab at rewriting theexamples_test.go.My fear is that the tests only pass with inclusion of the provider, which prevents the docs from correctly generating.

Mind taking a look?

mtojek reacted with thumbs up emoji

@stirby
Copy link
ContributorAuthor

For now, lazily duplicated resource examples test loop for data sources to test.

@mtojek
Copy link
Member

mtojek commentedJun 25, 2024
edited
Loading

Alright, I think I made the CI happy now.coder_parameter andcoder_workspace_tags are indata-sources now, andexamples_test.go is validating them.

I also tried to add other resources to the examples_test.go, each of which failed.

This may not be straightforward if examples depend on external fields or providers. For instance:coder_agent_instance usesgoogle_compute_instance and we do not importgcp module.

EDIT:

Let me know if this is ready to review, and I will re-check everything 👍

stirby reacted with thumbs up emoji

@stirby
Copy link
ContributorAuthor

stirby commentedJun 25, 2024
edited
Loading

I did some reading of other providers. Rarely do code examples reference other providers but it feels essential for our examples likecoder_agent. I think we could revisit extending the testing someday but full coverage is not critical right now.

I think this is ready for your review.

Edit: trying one more thing.

@stirby
Copy link
ContributorAuthor

Ended up over complicating. Should be good for your review.

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

👍

@stirbystirby merged commitb73066b intomainJun 25, 2024
12 checks passed
@stirbystirby deleted the coder-parameter-example branchJune 25, 2024 21:48
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Code example not consumed in docs generation
2 participants
@stirby@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp