fix: clap cannot downcast CLI flags to PathBuf #3546
Triggered via pull request
February 18, 2025 17:02
Status
Success
Total duration
12m 30s
Artifacts
–
release-drafter.yml
on: pull_request
update_release_draft
8s
Annotations
3 errors and 4 warnings
update_release_draft
Resource not accessible by integration
{
name: 'HttpError',
id: '13396052131',
status: 403,
response: {
url: 'https://api.github.com/repos/kubewarden/policy-server/issues/1096/labels',
status: 403,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Tue, 18 Feb 2025 17:14:23 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'github.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'issues=write; pull_requests=write',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '4CC2:1CB832:1368807:26FA717:67B4BFEF',
'x-ratelimit-limit': '15000',
'x-ratelimit-remaining': '14972',
'x-ratelimit-reset': '1739902251',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '28',
'x-xss-protection': '0'
},
data: {
message: 'Resource not accessible by integration',
documentation_url: 'https://docs.github.com/rest/issues/labels#add-labels-to-an-issue',
status: '403'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/kubewarden/policy-server/issues/1096/labels',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'probot/12.4.0 octokit-core.js/3.6.0 Node.js/20.18.0 (linux; x64)',
'x-github-delivery': '13396052131',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"labels":["kind/bug"]}',
request: {}
},
event: {
id: '13396052131',
name: 'pull_request',
payload: {
action: 'edited',
changes: {
body: {
from: '## Description\r\n' +
'\r\n' +
'After the recent changes clap is not able to cast the CLI flags into PathBuf type. To fix that, we can configure the value parser when the Arg is created.\r\n' +
'\r\n' +
'This is causing errors when running CI on Kubewarden controller main branch and #1007.\r\n' +
'\r\n' +
'```console\r\n' +
'KUBEWARDEN_CERT_FILE="tls.crt" KUBEWARDEN_KEY_FILE="tls.key" KUBEWARDEN_POLICIES_DOWNLOAD_DIR=/tmp KUBEWARDEN_POLICIES=policies.yml.example KUBEWARDEN_LOG_LEVEL=debug KUBEWARDEN_SIGSTORE_CACHE_DIR="/tmp/sigstore-data" KUBEWARDEN_ALWAYS_ACCEPT_ADMISSION_REVIEWS_ON_NAMESPACE="kubewarden" KUBEWARDEN_CLIENT_CA_FILE="ca.crt" cargo run\r\n' +
"thread 'main' panicked at src/config.rs:193:29:\r\n" +
'Mismatch between definition and access of `cert-file`. Could not downcast to std::path::PathBuf, need to downcast to alloc::string::String\r\n' +
'\r\n' +
'stack backtrace:\r\n' +
' 0: rust_begin_unwind\r\n' +
' at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5\r\n' +
' 1: core::panicking::panic_fmt\r\n' +
' at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14\r\n' +
' 2: clap_builder::parser::error::MatchesError::unwrap\r\n' +
' at /home/jvanz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.30/src/parser/error.rs:32:9\r\n' +
' 3: clap_builder::parser::matches::arg_
|
update_release_draft
Resource not accessible by integration
{
name: 'HttpError',
id: '13396052131',
status: 403,
response: {
url: 'https://api.github.com/repos/kubewarden/policy-server/releases',
status: 403,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Tue, 18 Feb 2025 17:14:26 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'github.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'contents=write; contents=write,workflows=write',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': '4CC1:708F4:13083FC:263A2CD:67B4BFF2',
'x-ratelimit-limit': '15000',
'x-ratelimit-remaining': '14965',
'x-ratelimit-reset': '1739902251',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '35',
'x-xss-protection': '0'
},
data: {
message: 'Resource not accessible by integration',
documentation_url: 'https://docs.github.com/rest/releases/releases#create-a-release',
status: '403'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/kubewarden/policy-server/releases',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'probot/12.4.0 octokit-core.js/3.6.0 Node.js/20.18.0 (linux; x64)',
'x-github-delivery': '13396052131',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"target_commitish":"refs/pull/1096/merge","name":"v1.22.0","tag_name":"","body":"## 🚀 Features\\n\\n- feat: multiple client CA. (#1090)\\n- feat(tests): TLS communication tests. (#1088)\\n- feat: expose readiness probe over http (#1080)\\n- feat: enable mTLS. (#1075)\\n\\n## 🐛 Bug Fixes\\n\\n- fix: remove TLS hot-reload race condition (#1094)\\n- fix: TlsConfig and mTLS logic (#1087)\\n- fix: do not panic in certificate hot-reload task (#1071)\\n\\n## 🧰 Maintenance\\n\\n- build(deps): update rust crate clap to v4.5.30 (#1095)\\n- build(deps): update rust crate openssl to v0.10.71 (#1093)\\n- build(deps): update alpine docker tag to v3.21.3 (#1092)\\n- chore(deps): update policy-evaluator (#1089)\\n- build(deps): update all patch level dependencies (#1086)\\n- build(deps): remove dependabot. (#1084)\\n- build(deps): update rust crate testcontainers to v0.23.2 (#1076)\\n- chore(deps): update sigstore (#1073)\\n- build(deps): update all minor level dependencies (#1074)\\n- build(deps): update kubewarden/github-actions action to v3.4.6 (#1072)\\n- chore(deps): update sigstore/cosign-installer action to v3.8.0 (#1069)\\n- chore(deps): update otel/opentelemetry-collector docker tag to v0.119.0 (#1068)\\n","draft":true,"prerelease":false,"make_latest":"true"}',
request: { retryCount: 1 }
},
event: {
id: '13396052131',
name: 'pull_request',
payload: {
action: 'edited',
changes: {
body: {
from: '## Description\r\n' +
'\r\n' +
'After the recent changes clap is not able to cast the CLI flags into PathBuf type. To fix that, we can configure the value parser when the Arg is created.\r\n' +
'\r\n' +
'This is causing errors when running CI on Kubewarden controller main branch and #1007.\r\n' +
'\r\n' +
'```consol
|
update_release_draft
HttpError: Resource not accessible by integration
at /home/runner/work/_actions/release-drafter/release-drafter/b1476f6e6eb133afa41ed8589daba6dc69b4d3f5/dist/index.js:7146:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Job.doExecute (/home/runner/work/_actions/release-drafter/release-drafter/b1476f6e6eb133afa41ed8589daba6dc69b4d3f5/dist/index.js:61885:18)
HttpError: Resource not accessible by integration
at /home/runner/work/_actions/release-drafter/release-drafter/b1476f6e6eb133afa41ed8589daba6dc69b4d3f5/dist/index.js:7146:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Job.doExecute (/home/runner/work/_actions/release-drafter/release-drafter/b1476f6e6eb133afa41ed8589daba6dc69b4d3f5/dist/index.js:61885:18)
{
name: 'AggregateError',
event: {
id: '13396052131',
name: 'pull_request',
payload: {
action: 'edited',
changes: {
body: {
from: '## Description\r\n' +
'\r\n' +
'After the recent changes clap is not able to cast the CLI flags into PathBuf type. To fix that, we can configure the value parser when the Arg is created.\r\n' +
'\r\n' +
'This is causing errors when running CI on Kubewarden controller main branch and #1007.\r\n' +
'\r\n' +
'```console\r\n' +
'KUBEWARDEN_CERT_FILE="tls.crt" KUBEWARDEN_KEY_FILE="tls.key" KUBEWARDEN_POLICIES_DOWNLOAD_DIR=/tmp KUBEWARDEN_POLICIES=policies.yml.example KUBEWARDEN_LOG_LEVEL=debug KUBEWARDEN_SIGSTORE_CACHE_DIR="/tmp/sigstore-data" KUBEWARDEN_ALWAYS_ACCEPT_ADMISSION_REVIEWS_ON_NAMESPACE="kubewarden" KUBEWARDEN_CLIENT_CA_FILE="ca.crt" cargo run\r\n' +
"thread 'main' panicked at src/config.rs:193:29:\r\n" +
'Mismatch between definition and access of `cert-file`. Could not downcast to std::path::PathBuf, need to downcast to alloc::string::String\r\n' +
'\r\n' +
'stack backtrace:\r\n' +
' 0: rust_begin_unwind\r\n' +
' at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5\r\n' +
' 1: core::panicking::panic_fmt\r\n' +
' at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14\r\n' +
' 2: clap_builder::parser::error::MatchesError::unwrap\r\n' +
' at /home/jvanz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.30/src/parser/error.rs:32:9\r\n' +
' 3: clap_builder::parser::matches::arg_matches::ArgMatches::get_one\r\n' +
' at /home/jvanz/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.30/src/parser/matches/arg_matches.rs:119:9\r\n' +
' 4: policy_server::config::build_tls_config\r\n' +
' at ./src/config.rs:193:21\r\n' +
' 5: policy_server::config::Config::from_args\r\n' +
'```\r\n' +
'\r\n' +
'\r\n' +
'## Test\r\n' +
'\r\n' +
'```shell\r\n' +
'KUBEWARDEN_CERT_FILE="tls.crt" KUBEWARDEN_KEY_FILE="tls.key" KUBEWARDEN_POLICIES_DOWNLOAD_DIR=/tmp KUBEWARDEN_POLICIES=policies.yml.example KUBEWARDEN_LOG_LEVEL=debug KUBEWARDEN_SIGSTORE_CACHE_DIR="/tmp/sigstore-data" KUBEWARDEN_ALWAYS_ACCEPT_ADMISSION_REVIEWS_ON_NAMESPACE="kubewarden" KUBEWARDEN_CLIENT_CA_FILE="ca.crt" cargo run\r\n' +
'```\r\n'
}
},
enterprise: {
avatar_url: 'https://avatars.githubusercontent.com/b/9995?v=4',
created_at: '2021-11-03T14:57:36Z',
description: '',
html_url: 'https://github.com/enterprises/cncf',
id: 9995,
name: 'Cloud Native Computing Foundation',
node_id: 'E_kgDNJws',
slug: 'cncf',
updated_at: '2025-02-18T15:55:59Z',
website_url: 'https://cncf.io'
},
number: 1096,
organization: {
avatar_url:
|
update_release_draft
"pull_request_target.opened" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
|
update_release_draft
"pull_request_target.reopened" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
|
update_release_draft
"pull_request_target.synchronize" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
|
update_release_draft
"pull_request_target.edited" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)
|