Closed Bug 1633882 Opened 6 years ago Closed 6 years ago

release publishing: "file" parameter is deprecated for ".repos.uploadReleaseAsset()"

Categories

(Taskcluster :: Services, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

Details

Deprecation: [@octokit/rest] "file" parameter is deprecated for ".repos.uploadReleaseAsset()". Use "data" instead
at /task_1588104144/taskcluster/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13145:26
at Array.forEach (<anonymous>)
at Object.patchedMethod [as uploadReleaseAsset] (/task_1588104144/taskcluster/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js:13142:26)
at Object.run (/task_1588104144/taskcluster/infrastructure/tooling/src/publish/tasks.js:520:33)
at async TaskGraph._runNode (/task_1588104144/taskcluster/node_modules/console-taskgraph/src/taskgraph.js:180:18) {
name: 'Deprecation'
}

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

Well, surprise surprise the GitHub docs are incorrect:
https://community-tc.services.mozilla.com/tasks/a5k71ElRReCsg5xrvsKa0w/runs/0/logs/https%3A%2F%2Fcommunity-tc.services.mozilla.com%2Fapi%2Fqueue%2Fv1%2Ftask%2Fa5k71ElRReCsg5xrvsKa0w%2Fruns%2F0%2Fartifacts%2Fpublic%2Flogs%2Flive.log#L2954

https://octokit.github.io/rest.js/v17#repos-upload-release-asset

octokit.repos.uploadReleaseAsset({
  owner,
  repo,
  release_id,
  data,
});

it does mention that you're supposed to use the upload_url, but not where to use it.

I'm going to revert #2757 and just change file to data.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

We'll see on the next release (this is not something that can be tested in a staging release)

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.