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

solve disk usage #79

Merged
merged 7 commits into from
Jan 26, 2024
Merged

solve disk usage #79

merged 7 commits into from
Jan 26, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Jan 24, 2024

closes: #78

CI time 62m vs 66m before the "use" PR. (no statsig diff)

@turadg turadg force-pushed the 78-solve-disk-full branch from 50ec208 to d4f392a Compare January 25, 2024 01:15
@turadg
Copy link
Member Author

turadg commented Jan 25, 2024

If using Yarn 3.7.0 works, then I may need to explicitly enableGlobalCache

If it doesn't I may have to try harder to yarn set version from sources because yarn set version canary is getting the 4.0.2 release (https://yarnpkg.com/cli/set/version )

@turadg turadg force-pushed the 78-solve-disk-full branch 6 times, most recently from d049be6 to 968cad4 Compare January 26, 2024 15:46
@turadg turadg force-pushed the 78-solve-disk-full branch from 968cad4 to e8fce15 Compare January 26, 2024 16:52
@turadg turadg marked this pull request as ready for review January 26, 2024 17:54
Comment on lines +111 to +114

- run: docker system df
- run: docker buildx du --verbose
- run: df -h
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these blocks aren't necessary for main, but I'd like to leave it in this PR.

  1. to not delay merge by another run (taking over an hour)
  2. to have the diagnostics a little longer while the change settles

If #2 is not compelling, I'm open to cutting e8fce15 from this branch and merging without another green.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diagnostics of this sort are somewhere between cost-effective and priceless, IME. (unless they're very, very verbose; I haven't checked in this case).

@turadg turadg requested review from mhofman and dckc January 26, 2024 17:57
@turadg turadg enabled auto-merge January 26, 2024 17:58
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah; something has got to be done about this

This looks like it can't hurt much.

Comment on lines +111 to +114

- run: docker system df
- run: docker buildx du --verbose
- run: df -h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diagnostics of this sort are somewhere between cost-effective and priceless, IME. (unless they're very, very verbose; I haven't checked in this case).

@@ -64,13 +64,16 @@ export const buildProposalSubmissions = (proposals: ProposalInfo[]) => {

/**
* Bake images using the docker buildx bake command.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with docker buildx bake. But I gather it's working...

const yarnRc = path.join(proposalPath, '.yarnrc.yml');
if (!fs.existsSync(yarnRc)) {
console.log(`creating ${yarnRc} with node-modules linker`);
fs.writeFileSync(yarnRc, 'nodeLinker: node-modules\n');
}

// refresh install
execSync('rm -rf node_modules', { cwd: proposalPath });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

// delete the image to reclaim disk space. The next build
// will use the build cache.
execSync('docker system df', { stdio: 'inherit' });
execSync(`docker rmi ${image.name}`, { stdio: 'inherit' });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gather this docker rmi ... is the gist of it.

const cmd = `docker run --rm ${name}`;
execSync(cmd, { stdio: 'inherit' });
}
export const runTestImage = (proposal: ProposalInfo) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the API change from runTestImages to runTestImage sets off my backward-compatibility sensor.
But I don't suppose that's all that relevant in this context.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CLI's modules aren't part of the package API.

The package doesn't yet define "exports" so they technically could be imported somewhere, but I think it's a reasonable expectation that cli not be.

That said, this package doesn't claim backwards compatibility because, following semver, it's not yet 1.0.

@turadg turadg merged commit b8f9225 into main Jan 26, 2024
3 checks passed
@turadg turadg deleted the 78-solve-disk-full branch January 26, 2024 18:17
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.

builds running out of disk space
2 participants