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

Rollout improved example converter #640

Merged
merged 8 commits into from
Apr 19, 2024
Merged

Rollout improved example converter #640

merged 8 commits into from
Apr 19, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented Apr 16, 2024

Rolls out improved TF example converter.

Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

Copy link

Is README.md missing any configuration options?

appAuth not found in Configuration section
insecure not found in Configuration section
maxRetries not found in Configuration section
parallelRequests not found in Configuration section
readDelayMs not found in Configuration section
retryDelayMs not found in Configuration section
retryableErrors not found in Configuration section
writeDelayMs not found in Configuration section

Please add a description for each of these options to README.md. Details about them can be found in either the upstream docs or schema.json.

@VenelinMartinov
Copy link
Contributor

This one has quite a few new examples but has also lost some.

@t0yv0 t0yv0 requested review from VenelinMartinov and iwahbe April 18, 2024 17:55
// _, err = github.NewActionsOrganizationSecret(ctx, "exampleSecretIndex/actionsOrganizationSecretActionsOrganizationSecret", &github.ActionsOrganizationSecretArgs{
// SecretName: pulumi.String("example_secret_name"),
// Visibility: pulumi.String("private"),
// EncryptedValue: pulumi.Any(_var.Some_encrypted_secret_string),
Copy link
Member Author

Choose a reason for hiding this comment

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

Suspect it fell out because of undefined _var.Some_encrypted_secret_string - checking

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm

{
  "ExampleName": "#/resources/github:index/actionsOrganizationSecret:ActionsOrganizationSecret",
  "OriginalHCL": "resource \"github_actions_organization_secret\" \"example_secret\" {\n  secret_name     = \"example_secret_name\"\n  visibility      = \"private\"\n  plaintext_value = var.some_secret_string\n}\n\nresource \"github_actions_organization_secret\" \"example_secret\" {\n  secret_name     = \"example_secret_name\"\n  visibility      = \"private\"\n  encrypted_value = var.some_encrypted_secret_string\n}\n",
  "ConversionResults": {
    "csharp": {
      "FailureSeverity": 2,
      "FailureInfo": "Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module.",
      "Program": "",
      "TranslationCount": 1
    },
    "go": {
      "FailureSeverity": 2,
      "FailureInfo": "Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module.",
      "Program": "",
      "TranslationCount": 1
    },
    "java": {
      "FailureSeverity": 2,
      "FailureInfo": "Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module.",
      "Program": "",
      "TranslationCount": 1
    },
    "python": {
      "FailureSeverity": 2,
      "FailureInfo": "Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module.",
      "Program": "",
      "TranslationCount": 1
    },
    "typescript": {
      "FailureSeverity": 2,
      "FailureInfo": "Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module.",
      "Program": "",
      "TranslationCount": 1
    },
    "yaml": {
      "FailureSeverity": 2,
      "FailureInfo": "Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module.",
      "Program": "",
      "TranslationCount": 1
    }
  }
}

Copy link
Member Author

Choose a reason for hiding this comment

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

@t0yv0
Copy link
Member Author

t0yv0 commented Apr 19, 2024

jq '.|select(.ConversionResults.java.FailureSeverity==2)|.ConversionResults.typescript.FailureInfo' cov/byExample.json  | sort | uniq                                                                                                  ~/bugs/ci-mgmt-889/pulumi-github
""
"Duplicate resource \"github_actions_environment_secret\" configuration: A github_actions_environment_secret resource named \"example_secret\" was already declared at /e0.tf:1,1-62. Resource names must be unique per type in each module."
"Duplicate resource \"github_actions_organization_secret\" configuration: A github_actions_organization_secret resource named \"example_secret\" was already declared at /e27.tf:1,1-63. Resource names must be unique per type in each module."
"Duplicate resource \"github_actions_secret\" configuration: A github_actions_secret resource named \"example_secret\" was already declared at /e116.tf:5,1-50. Resource names must be unique per type in each module."
"Duplicate resource \"github_codespaces_organization_secret\" configuration: A github_codespaces_organization_secret resource named \"example_secret\" was already declared at /e82.tf:1,1-66. Resource names must be unique per type in each module."
"Duplicate resource \"github_codespaces_secret\" configuration: A github_codespaces_secret resource named \"example_secret\" was already declared at /e58.tf:5,1-53. Resource names must be unique per type in each module."
"Duplicate resource \"github_codespaces_user_secret\" configuration: A github_codespaces_user_secret resource named \"example_secret\" was already declared at /e131.tf:5,1-58. Resource names must be unique per type in each module."
"Duplicate resource \"github_dependabot_organization_secret\" configuration: A github_dependabot_organization_secret resource named \"example_secret\" was already declared at /e53.tf:1,1-66. Resource names must be unique per type in each module."
"Duplicate resource \"github_dependabot_secret\" configuration: A github_dependabot_secret resource named \"example_secret\" was already declared at /e130.tf:5,1-53. Resource names must be unique per type in each module."
"Invalid multi-line string: Quoted strings may not be split over multiple lines. To produce a multi-line string, either use the \\n escape to represent a newline character or use the \"heredoc\" multi-line template syntax.; Missing newline after argument: An argument definition must end with a newline."
"Invalid multi-line string: Quoted strings may not be split over multiple lines. To produce a multi-line string, either use the \\n escape to represent a newline character or use the \"heredoc\" multi-line template syntax.; Unterminated template string: No closing marker was found for the string."
"pcl.BindProgram failed: example.pp:0,14-35: unknown function 'github:index:labels'; unknown function 'github:index:labels'"

@t0yv0 t0yv0 merged commit 38c98c4 into master Apr 19, 2024
17 checks passed
@t0yv0 t0yv0 deleted the t0yv0/rollout-converter branch April 19, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants