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

chore(docs): add examples for ucloud provider (ts/python/java/c#/go) #790

Merged
merged 7 commits into from
Jul 19, 2021

Conversation

yufeiminds
Copy link
Contributor

Add examples for UCloud provider.

Languages

  • TypeScript
  • Python
  • Java
  • C#
  • Go

Additional Infomation

Copy link
Contributor

@DanielMSchmidt DanielMSchmidt left a comment

Choose a reason for hiding this comment

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

Awesome, thanks a ton for sending in a PR 👍

@yufeiminds
Copy link
Contributor Author

I'm sorry for the two failures that appeared. 😂

I have tried to fix one of them, but there are some errors when I run the task examples:integration:typescript and integration:windows:java on local with docker.mirror.hashicorp.services/hashicorp/jsii-terraform mentioned on contributing guide.

$ yarn integration:windows:java
run-against-dist.bat: command not found
$ yarn examples:integration:typescript
silly fetchPackageMetaData error for @types/node@* Unexpected end of JSON input while parsing near '...vln4sHRLF19hjFZeQ0LFd'

How can I execute them on my desktop? Thanks. 😄

@jsteinich
Copy link
Collaborator

Running on Windows currently requires installing all of the tools for each language you are testing with.

Looks like you are running correctly within the container. Could have been a temporary issue or perhaps some network configuration issue on your machine.

@yufeiminds
Copy link
Contributor Author

Hi @DanielMSchmidt,

Thanks for @jsteinich, the integration test yarn examples:integration:typescript has been successful on my local, but I don't have a windows server to reproduce the integration:windows:java failure.

In this log details, this is a timeout error, could you approval to continue the workflow, please. thank you ~ 😁

@yufeiminds
Copy link
Contributor Author

I had passed the yarn build, and prettier --check ..

But after yarn bootstrap-plugin-cache and yarn test, it raised:

FAIL test/config.test.ts
  ● parseConfig › modules › parses module for local module for module generator

    expect(received).toMatch(expected)

    Expected substring: "terraform-cdk/packages/cdktf-cli/foo"
    Received string:    "file:///home/packages/cdktf-cli/foo"

      133 |       };
      134 |       const parsed: any = parseConfig(JSON.stringify(input));
    > 135 |       expect(parsed.terraformModules[0].localSource).toMatch(
          |                                                      ^
      136 |         "terraform-cdk/packages/cdktf-cli/foo"
      137 |       );
      138 |     });

      at Object.it (test/config.test.ts:135:54)

Can you help me to merge this pull request? What should I do for the next step? Thanks a lot 😄 @DanielMSchmidt

@ansgarm
Copy link
Member

ansgarm commented Jul 13, 2021

    Expected substring: "terraform-cdk/packages/cdktf-cli/foo"
    Received string:    "file:///home/packages/cdktf-cli/foo"

It seems like the current test could be improved as it seems to expect this repository to be checked out into a directory called terraform-cdk but that should be up to the developer to choose and shouldn't be required 😅

I'm going to post a suggestion via a review which should fix this for you.

edit 1: I just noticed that I cannot add suggestions on files that weren't changed 😅 Going to add a separate PR so you can either cherry-pick or rebase/merge main as soon as it get's merged

edit 2: Link to PR

ansgarm added a commit that referenced this pull request Jul 13, 2021
don't require the terraform-cdk to be checked out into a directory with exactly that name for this test case to succeed. Reported by @yufeiminds in #790
@yufeiminds
Copy link
Contributor Author

Thanks to @ansgarm. I have passed the yarn test stage. 😄

@yufeiminds
Copy link
Contributor Author

Hello, thanks for your help. Can this PR be merged? @DanielMSchmidt @jsteinich @ansgarm

@ansgarm ansgarm merged commit f43270e into hashicorp:main Jul 19, 2021
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants