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

fix issue with recipe builder tasks not persisting across rebuilds #286

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

### New Features

* Updated `@lando/core` to [`v3.22.0-beta.6`](https://github.com/lando/core/releases/tag/v3.22.0-beta.6)

### Bug Fixes

* Fixed bug causing recipe builder `tasks` to not persist across rebuilds

## v3.22.0-beta.5 - [September 4, 2024](https://github.com/lando/cli/releases/tag/v3.22.0-beta.5)

* Updated `@lando/core` to [`v3.22.0-beta.5`](https://github.com/lando/core/releases/tag/v3.22.0-beta.5)
Expand Down
15 changes: 11 additions & 4 deletions bin/lando
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,27 @@ if (runtime === 4) {
// Summon the implementation of @lando/cli@3 that works with @lando/core@3
const Cli = require('../lib/cli');
const cli = new Cli(ENVPREFIX, LOGLEVELCONSOLE, USERCONFROOT, COREBASE, debug);
const bsLevel = !_.isEmpty(appConfig) && !fs.existsSync(appConfig.composeCache) ? 'APP' : 'TASKS';
const getTasks = require(`${COREBASE}/utils/get-tasks`);
debug('starting lando with %o runtime using cli %o', `v${runtime}`, {ENVPREFIX, LOGLEVELCONSOLE, USERCONFROOT, COREBASE});

// Check for sudo usage
cli.checkPerms();

// Lando cache stuffs
process.lando = 'node';
process.landoTaskCacheName = '_.tasks.cache';
process.landoTaskCacheFile = path.join(cli.defaultConfig().userConfRoot, 'cache', process.landoTaskCacheName);
process.landoAppCacheFile = !_.isEmpty(appConfig) ? appConfig.composeCache : undefined;

// Check for sudo usage
cli.checkPerms();
// Check for a recipe cache and enforce manual app tasks cache clear if applicable
if (appConfig.recipe && !fs.existsSync(appConfig.recipeCache)) {
if (fs.existsSync(process.landoAppCacheFile)) fs.unlinkSync(process.landoAppCacheFile);
}

// determine bs level
const bsLevel = !_.isEmpty(appConfig) && !fs.existsSync(process.landoAppCacheFile) ? 'APP' : 'TASKS';

// Check to see if we have a recipe and if it doesn't have a tooling cache lets enforce a manual cache clear
// Check to see if we have a compose cache and if we dont then lets enforce a manual lando tasks cache clear
if (bsLevel === 'APP' && !fs.existsSync(appConfig.composeCache)) {
if (fs.existsSync(process.landoTaskCacheFile)) fs.unlinkSync(process.landoTaskCacheFile);
}
Expand Down
Loading