Skip to content

Commit 7fdae74

Browse files
committed
Remove fetch_files command.
In dependabot/dependabot-core#13275 the `fetch_files` command was made a no-op, and it does not need to be called. Also cleaned up environment variables that are not used as a result. Copied from: github/dependabot-action#1550
1 parent 627f12c commit 7fdae74

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

.changeset/modern-cups-drop.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@paklo/runner": minor
3+
---
4+
5+
Remove `fetch_files` command.
6+
In <https://github.com/dependabot/dependabot-core/pull/13275> the `fetch_files` command was made a no-op, and it does not need to be called.
7+
Also cleaned up environment variables that are not used as a result.
8+
Copied from: <https://github.com/github/dependabot-action/pull/1550>

apps/web/src/workflows/jobs/trigger.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import {
2020
extractUpdaterSha,
2121
JOB_INPUT_FILENAME,
2222
JOB_INPUT_PATH,
23-
JOB_OUTPUT_FILENAME,
24-
JOB_OUTPUT_PATH,
2523
PROXY_IMAGE_NAME,
2624
ProxyBuilder,
2725
REPO_CONTENTS_PATH,
@@ -478,8 +476,6 @@ export async function createAndStartJobResources({
478476
{ name: 'DEPENDABOT_JOB_TOKEN', value: '' },
479477
{ name: 'DEPENDABOT_JOB_PATH', value: `${JOB_INPUT_PATH}/${JOB_INPUT_FILENAME}` },
480478
{ name: 'DEPENDABOT_OPEN_TIMEOUT_IN_SECONDS', value: '15' },
481-
// not using the file share because we are not consuming the output yet
482-
{ name: 'DEPENDABOT_OUTPUT_PATH', value: `${JOB_OUTPUT_PATH}/${JOB_OUTPUT_FILENAME}` },
483479
// not using the file share because we do not need to clone repos there
484480
{ name: 'DEPENDABOT_REPO_CONTENTS_PATH', value: REPO_CONTENTS_PATH },
485481
{ name: 'DEPENDABOT_API_URL', value: apiUrl },
@@ -488,7 +484,6 @@ export async function createAndStartJobResources({
488484
{ name: 'HTTP_PROXY', value: proxyUrl },
489485
{ name: 'https_proxy', value: proxyUrl },
490486
{ name: 'HTTPS_PROXY', value: proxyUrl },
491-
{ name: 'UPDATER_ONE_CONTAINER', value: '1' },
492487

493488
// enable or disable connectivity check based on feature flag
494489
...((await enableDependabotConnectivityCheck())

packages/runner/src/container-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const ContainerService = {
4747
// Then run the dependabot commands as dependabot user
4848
const dependabotCommands = [
4949
'mkdir -p /home/dependabot/dependabot-updater/output',
50-
'$DEPENDABOT_HOME/dependabot-updater/bin/run fetch_files',
50+
// 'fetch_files' command removed as it is now a no-op
5151
];
5252

5353
if (command === 'graph') {

packages/runner/src/updater-builder.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import type { JobParameters } from './params';
99
import type { Proxy } from './proxy';
1010
import { extractUpdaterSha } from './utils';
1111

12-
export const JOB_OUTPUT_FILENAME = 'output.json';
13-
export const JOB_OUTPUT_PATH = '/home/dependabot/dependabot-updater/output';
1412
export const JOB_INPUT_FILENAME = 'job.json';
1513
export const JOB_INPUT_PATH = `/home/dependabot/dependabot-updater`;
1614
export const REPO_CONTENTS_PATH = '/home/dependabot/dependabot-updater/repo';
@@ -40,15 +38,13 @@ export class UpdaterBuilder {
4038
`DEPENDABOT_JOB_TOKEN=`,
4139
`DEPENDABOT_JOB_PATH=${JOB_INPUT_PATH}/${JOB_INPUT_FILENAME}`,
4240
`DEPENDABOT_OPEN_TIMEOUT_IN_SECONDS=15`,
43-
`DEPENDABOT_OUTPUT_PATH=${JOB_OUTPUT_PATH}/${JOB_OUTPUT_FILENAME}`,
4441
`DEPENDABOT_REPO_CONTENTS_PATH=${REPO_CONTENTS_PATH}`,
4542
`DEPENDABOT_API_URL=${this.jobParams.dependabotApiDockerUrl}`,
4643
`SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt`,
4744
`http_proxy=${proxyUrl}`,
4845
`HTTP_PROXY=${proxyUrl}`,
4946
`https_proxy=${proxyUrl}`,
5047
`HTTPS_PROXY=${proxyUrl}`,
51-
`UPDATER_ONE_CONTAINER=1`,
5248
`ENABLE_CONNECTIVITY_CHECK=${process.env.DEPENDABOT_ENABLE_CONNECTIVITY_CHECK || '1'}`,
5349

5450
// for updates relying on .NET (e.g. NuGet) and running on macOS (e.g. dev laptop or local MacMini),

0 commit comments

Comments
 (0)