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(organization_webhook): fix insecure_ssl #2196

Conversation

EttoreFoti
Copy link
Contributor

Resolves #2142


Before the change?

  • The Provider was missing the conversion step causing type mismatch for go.

After the change?

  • The Provider does the correct parsing of the input.

Pull request checklist

  • [-] Tests for the changes have been added (for bug fixes / features)
  • [-] Docs have been reviewed and added / updated if needed (for bug fixes / features)
    Both are not needed since it's just a fix over already existing resource.

Does this introduce a breaking change?

  • Yes
  • No

@kfcampbell
Copy link
Member

@EttoreFoti can you describe (and perhaps include output from) the testing process you used here, since integration tests aren't added?

@EttoreFoti
Copy link
Contributor Author

@EttoreFoti can you describe (and perhaps include output from) the testing process you used here, since integration tests aren't added?

Just run the current AcceptanceTest that was previously failing, I can copy paste output if needed.

@gm-hyp-2
Copy link

@kfcampbell hello! Can you please review and release if it is all ok? thanks!

@EttoreFoti
Copy link
Contributor Author

@kfcampbell any update on this?

@kfcampbell
Copy link
Member

The test used to panic for me and now it's failing. I'm seeing the following output:

--- FAIL: TestAccGithubOrganizationWebhook (17.29s)
    --- FAIL: TestAccGithubOrganizationWebhook/creates_and_updates_webhooks_without_error (7.06s)
        --- SKIP: TestAccGithubOrganizationWebhook/creates_and_updates_webhooks_without_error/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubOrganizationWebhook/creates_and_updates_webhooks_without_error/with_an_individual_account (0.00s)
        --- FAIL: TestAccGithubOrganizationWebhook/creates_and_updates_webhooks_without_error/with_an_organization_account (7.06s)
    --- PASS: TestAccGithubOrganizationWebhook/imports_webhooks_without_error (10.23s)
        --- SKIP: TestAccGithubOrganizationWebhook/imports_webhooks_without_error/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubOrganizationWebhook/imports_webhooks_without_error/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubOrganizationWebhook/imports_webhooks_without_error/with_an_organization_account (10.23s)
FAIL

The specific error is:

    resource_github_organization_webhook_test.go:53: Step 1/2 error: Error running apply: exit status 1
        
        Error: POST https://api.github.com/orgs/kfcampbell-terraform-provider/hooks: 422 Validation Failed [{Resource:Hook Field: Code:custom Message:Hook already exists on this organization}]
        
          with github_organization_webhook.test,
          on terraform_plugin_test.tf line 9, in resource "github_organization_webhook" "test":
           9: 			resource "github_organization_webhook" "test" {

but that's possibly related to the org I'm using for testing and/or a dirty integration test setup. Does it pass cleanly now for you?

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

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

Regardless of whether the issue is one of test setup on my side, this is an improvement over the current test setup, so I'm comfortable taking the change as-is.

@kfcampbell kfcampbell merged commit e1f5feb into integrations:main Mar 25, 2024
3 checks passed
kireque referenced this pull request in kireque/home-ops Mar 28, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github](https://registry.terraform.io/providers/integrations/github)
([source](https://togithub.com/integrations/terraform-provider-github))
| required_provider | patch | `6.2.0` -> `6.2.1` |

---

### Release Notes

<details>
<summary>integrations/terraform-provider-github (github)</summary>

###
[`v6.2.1`](https://togithub.com/integrations/terraform-provider-github/releases/tag/v6.2.1)

[Compare
Source](https://togithub.com/integrations/terraform-provider-github/compare/v6.2.0...v6.2.1)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### 🐛 Bugfixes

- chore(actions_runner_group): fix missing schema id by
[@&#8203;EttoreFoti](https://togithub.com/EttoreFoti) in
[https://github.com/integrations/terraform-provider-github/pull/2195](https://togithub.com/integrations/terraform-provider-github/pull/2195)
- chore(organization_webhook): fix insecure_ssl by
[@&#8203;EttoreFoti](https://togithub.com/EttoreFoti) in
[https://github.com/integrations/terraform-provider-github/pull/2196](https://togithub.com/integrations/terraform-provider-github/pull/2196)

##### 🛠️ Maintenance

- build(deps): bump actions/add-to-project from 0.6.0 to 0.6.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/integrations/terraform-provider-github/pull/2210](https://togithub.com/integrations/terraform-provider-github/pull/2210)
- build(deps): bump github.com/golangci/golangci-lint from 1.56.2 to
1.57.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/integrations/terraform-provider-github/pull/2209](https://togithub.com/integrations/terraform-provider-github/pull/2209)

#### New Contributors

- [@&#8203;EttoreFoti](https://togithub.com/EttoreFoti) made their first
contribution in
[https://github.com/integrations/terraform-provider-github/pull/2195](https://togithub.com/integrations/terraform-provider-github/pull/2195)

**Full Changelog**:
integrations/terraform-provider-github@v6.2.0...v6.2.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI3MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
@kfcampbell kfcampbell mentioned this pull request Apr 1, 2024
4 tasks
@EttoreFoti EttoreFoti deleted the f-github_organization_webhook_insecure_ssl branch July 3, 2024 20:21
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.

[BUG]: github_organization_webhook resource creation fake-failure
3 participants