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

fix: Setup Read the Docs webhooks #8

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

fuzzypixelz
Copy link
Member

@fuzzypixelz fuzzypixelz commented Feb 28, 2024

The zenoh-c Read the Docs webook has been failing for a while with the following error:

{
  "detail": "Payload not valid, invalid or missing signature"
}

This can apparently be fixed by regenerating the webhook URL and secret (or using the "resync webhook" feature in Read the Docs, but that would require the actor to have admin permissions on zenoh-c?).

However, there is the issue of supplying the secret, which wasn't there to beging with (maybe that's another reason why the hook was failing?). We would have to somehow exchange the secret through some means other than this pull request.

Moreover, we're looking to add pull_request to the webhook events as explained here to include documentation builds in CI.

@fuzzypixelz fuzzypixelz requested review from a team as code owners February 28, 2024 10:09
Copy link

This is your friendly self-service bot. The author (fuzzypixelz) of this PR is associated with this organization in the role of CONTRIBUTOR.

The author (fuzzypixelz) of this PR is not a member of this organization.

This comment has been minimized.

This comment has been minimized.

@netomi
Copy link
Contributor

netomi commented Feb 28, 2024

can you also set a secret for the webhook and share it with us as explained at: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Sharing-secrets ? Once the secret is received, I will update the PR accordingly.

@fuzzypixelz fuzzypixelz changed the title Fix zenoh-c Read the Docs webhook fix: Setup Read the Docs webhooks Feb 28, 2024

This comment has been minimized.

This comment has been minimized.

@netomi netomi force-pushed the fix-zenoh-c-webhook branch from f5ce07f to 7b33f45 Compare February 28, 2024 10:52
Signed-off-by: Thomas Neidhart <thomas.neidhart@eclipse-foundation.org>
Copy link

This is your friendly self-service bot.
Please find below the validation of the requested configuration changes:

Diff for 0d991ce
Organization iot.zenoh[id=eclipse-zenoh]
  there have been 20 validation infos, enable verbose output with '-v' to to display them.

-  remove repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-c/135565/", repository="zenoh-c"] {
-    active                            = true
-    content_type                      = "json"
-    events                            = [
-      "create"
-      "delete"
-      "push"
-    ],
-    insecure_ssl                      = "0"
-    secret                            = null
-    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-c/135565/"
-  }

+  add repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-c/263729/", repository="zenoh-c"] {
+    active                            = true
+    content_type                      = "json"
+    events                            = [
+      "create"
+      "delete"
+      "push"
+      "pull_request"
+    ],
+    insecure_ssl                      = "0"
+    secret                            = "pass:bots/iot.zenoh/readthedocs.org/zenoh-c-webhook-secret"
+    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-c/263729/"
+  }

+  add repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-cpp/263743/", repository="zenoh-cpp"] {
+    active                            = true
+    content_type                      = "json"
+    events                            = [
+      "create"
+      "delete"
+      "push"
+      "pull_request"
+    ],
+    insecure_ssl                      = "0"
+    secret                            = "pass:bots/iot.zenoh/readthedocs.org/zenoh-cpp-webhook-secret"
+    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-cpp/263743/"
+  }

+  add repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-pico/263750/", repository="zenoh-pico"] {
+    active                            = true
+    content_type                      = "json"
+    events                            = [
+      "create"
+      "delete"
+      "push"
+      "pull_request"
+    ],
+    insecure_ssl                      = "0"
+    secret                            = "pass:bots/iot.zenoh/readthedocs.org/zenoh-pico-webhook-secret"
+    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-pico/263750/"
+  }

-  remove repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-python/135566/", repository="zenoh-python"] {
-    active                            = true
-    content_type                      = "form"
-    events                            = [
-      "push"
-    ],
-    insecure_ssl                      = "0"
-    secret                            = null
-    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-python/135566/"
-  }

+  add repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-python/263749/", repository="zenoh-python"] {
+    active                            = true
+    content_type                      = "json"
+    events                            = [
+      "create"
+      "delete"
+      "push"
+      "pull_request"
+    ],
+    insecure_ssl                      = "0"
+    secret                            = "pass:bots/iot.zenoh/readthedocs.org/zenoh-python-webhook-secret"
+    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-python/263749/"
+  }
  
  Plan: 4 to add, 0 to change, 2 to delete.

Warnings

  • some of requested changes require secrets, need to apply these changes manually

cc @eclipse-zenoh/eclipsefdn-security

Add a comment /help to get a list of available commands.

Copy link

This is your friendly self-service bot. The current configuration is in-sync with the live settings. 🚀

@netomi
Copy link
Contributor

netomi commented Feb 28, 2024

LGTM, can a project lead approve? Ty

@kydos
Copy link
Member

kydos commented Feb 28, 2024

+1

@netomi netomi merged commit 275bcc8 into eclipse-zenoh:main Feb 28, 2024
3 checks passed
Copy link

This is your friendly self-service bot.

The following changes have been successfully applied:

Organization iot.zenoh[id=eclipse-zenoh]
  there have been 20 validation infos, enable verbose output with '-v' to to display them.

-  remove repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-c/135565/", repository="zenoh-c"] {
-    active                            = true
-    content_type                      = "json"
-    events                            = [
-      "create"
-      "delete"
-      "push"
-    ],
-    insecure_ssl                      = "0"
-    secret                            = null
-    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-c/135565/"
-  }

-  remove repo_webhook[url="https://readthedocs.org/api/v2/webhook/zenoh-python/135566/", repository="zenoh-python"] {
-    active                            = true
-    content_type                      = "form"
-    events                            = [
-      "push"
-    ],
-    insecure_ssl                      = "0"
-    secret                            = null
-    url                               = "https://readthedocs.org/api/v2/webhook/zenoh-python/135566/"
-  }

  
  Applying changes:


  Done.
  
  Executed plan: 0 added, 0 changed, 2 deleted.

Note

The pull request was only partially applied as it requires some access to secrets, please apply the remaining changes
manually and confirm with replying with /done. cc @

@netomi
Copy link
Contributor

netomi commented Feb 28, 2024

/done

@netomi
Copy link
Contributor

netomi commented Feb 28, 2024

The PR has been marked as being completed.

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.

3 participants