Open jp-bennett opened 11 months ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
I'm also seeing a 502 error: Uploading file pr2998-firmware-2.2.16.0792274.zip (first time)
22PUT /repos/meshtastic/artifacts/contents/pr2998-firmware-2.2.16.0792274.zip - 502 in 12451ms
23Error: Server Error
Can you share a code snippet demonstratimg the issue?
@wolfy1339 Sure. So we're seeing this while using https://github.com/gavv/pull-request-artifacts and an example CI run is at https://github.com/meshtastic/firmware/actions/runs/7185520403/job/19573992603#step:13:24
That code is at https://github.com/gavv/pull-request-artifacts/blob/main/src/main.ts#L147
file_path: string,
file_content: Buffer
): Promise<string> => {
const old_sha = await findFileSha(file_path)
if (old_sha) {
core.info(`Uploading file ${file_path} (old sha ${old_sha})`)
} else {
core.info(`Uploading file ${file_path} (first time)`)
}
const repo_url = `https://github.com/${context.repo.owner}/${context.repo.repo}`
const short_sha = commit_sha.substring(0, 5)
let message = `Upload ${file_path} (${short_sha})`
if (inter_link) {
message += `
Pull request: ${repo_url}/pull/${context.issue.number}
Commit: ${repo_url}/commit/${commit_sha}
`
}
await artifacts_octokit.rest.repos.createOrUpdateFileContents({
owner: artifacts_owner,
repo: artifacts_repo,
path: file_path,
message,
content: file_content.toString('base64'),
branch: artifacts_branch,
sha: old_sha
})
const artifacts_repo_url = `https://github.com/${artifacts_owner}/${artifacts_repo}`
return `${artifacts_repo_url}/blob/${artifacts_branch}/${file_path}?raw=true`
}```
What happened?
Using the createOrUpdateFileContents in a the pull-request-artifacts action is failing to upload, and returning a 504 error, and the message "Error: We couldn't respond to your request in time. Sorry about that. Please try resubmitting your request and contact us if the problem persists."
Versions
plugin-rest-endpoint-methods 10.1.2
Relevant log output
Code of Conduct