brief-restaurant-63679
10/26/2023, 1:12 PMsource.path
field correctly when using the getFiles
handler on the VCS class.
It looks like its just ignoring it which means it thinks a give action doesn't have any files.
For example, consider the following config:
# In api/garden.yml
kind: Build
name: api
type: container
source:
path: ../ # <-- Set the source to the parent dir
include: [api/**/*]
---
kind: Deploy
name: api
source:
path: ../ # <-- Set the source to the parent dir
spec:
files: [./manifests]
In this case the build context for the build action will be empty and the build fails with the error that a Dockerfile wasn't found.
The Deploy appears to work because at deploy time we read the files from the correct path and Garden applies the manifests. However—and this is important!—because the files are still empty the action version is incorrectly calculated. So if you e.g. update the manifests, the version will not change.
First off, am I doing something wrong here?
If not, this needs to be addresses ASAP.
cc @curved-intern-91221 @swift-garage-61180 , because this is pretty deep in the engine.brief-restaurant-63679
10/26/2023, 5:34 PMswift-garage-61180
10/27/2023, 11:03 AMbrief-restaurant-63679
10/27/2023, 5:48 PMRequestError: getaddrinfo ENOTFOUND test.cloud.garden.io
AFACIT this also happens on main and is not related to my changes.
I'm not super hip to the changes we've been making around the e2e tests though. Anything silly I'm missing here? Is that address supposed to actually exist?swift-garage-61180
10/30/2023, 10:20 AMreexamine-post-0.13
GitHub issues to be triaged. 🧵freezing-pharmacist-34446
10/30/2023, 11:17 AMswift-garage-61180
10/30/2023, 2:43 PMbrief-restaurant-63679
11/01/2023, 10:30 AMswift-garage-61180
11/01/2023, 1:51 PMalert-helicopter-61082
11/01/2023, 1:54 PMgifted-addition-77467
11/01/2023, 8:00 PM${actions.build.<name>.outputs.deploymentImageId}
instead of the value.gifted-addition-77467
11/01/2023, 8:01 PM${environment.namespace}
Example below...
Kind: Build
name: web
type: container
...
...
---
Kind: Deploy
type: Kubernetes
name: web
source:
path: ../manifets
spec:
files:
- deployment.yaml
---
# deployment yaml in manifests dir
apiVersion: apps/v1
Kind: Deployment
....
...
spec
image: ${actions.build.web.outputs.deploymentImageId} #literally prints this
image: ${environment.namespace} #this interpolates just fine
brief-restaurant-63679
11/01/2023, 9:41 PMswift-garage-61180
11/02/2023, 10:39 AMbrief-restaurant-63679
11/02/2023, 10:41 AMswift-garage-61180
11/02/2023, 9:08 PMswift-garage-61180
11/03/2023, 11:42 AMbrief-restaurant-63679
11/05/2023, 4:18 PM2 deploy action(s) failed!
...because it's counting api
and vote
which is downstream dep.
We get the fail count here: https://github.com/garden-io/garden/blob/main/core/src/commands/base.ts#L1041
This is kind of confusing because otherwise we don't log anything about the vote
action.
Can we also log for each downstream action that they have been aborted?
In this case I'd expect something like:
ℹ deploy.vote → Aborting because executing upstream dependency "deploy.api" failed.
And same for other potential downstream actions.swift-garage-61180
11/08/2023, 2:14 PMcontainerHelpers.autoResolveIncludes
helper.
Was this done on purpose (i.e. did we decide to deprecate the automatic inference of includes from Dockerfiles but still support it for current module configs), or should I fix that while I'm at it? @alert-helicopter-61082
Also CC-ing @big-spring-14945 since he recently did some fixes in this part of the codebase.alert-helicopter-61082
11/08/2023, 4:53 PMpolite-fountain-28010
11/13/2023, 9:58 AMGARDEN_GIT_SCAN_MODE=repo
the default?
It's faster on all platforms, but significantly faster on Windows due to Windows having a high overhead for spawning subprocesses, and the subtree
mode spawns a lot in larger projects.big-spring-14945
11/13/2023, 4:04 PMbrief-restaurant-63679
11/13/2023, 5:29 PMchalk
with calls to styles
.
In most cases you shouldn't have to apply styles at all since the logger applies sensible defaults.
But if you do, you should use styles
instead of chalk
. E.g., styles.highglight
instead of chalk.cyan
The goal is to keep this consistent and also to make it easier to change styles (e.g. change styles.primary
from one color to another).
There's also styles for common "elements" such as styles.link
, styles.command
and styles.section
.
Using styles
instead of chalk
is otherwise not enforced at the code elvel but we can revisit if things start drifting again.big-spring-14945
11/15/2023, 11:04 AMbig-spring-14945
11/15/2023, 11:57 AMbrief-restaurant-63679
11/15/2023, 5:13 PMbuild
field on actions. The docs are a little unclear on this:
> Specify a Build action, and resolve this action from the context of that Build.
> For example, you might create an exec Build which prepares some manifests, and then reference that in a kubernetes Deploy action, and the resulting manifests from the Build.
If I e.g. have a Test action of type container that depends on some build, should I specify that here?
Or should I rather just set the image for the Test action like so:
- kind: Test
name: my-test
type: container
dependencies: [my-build]
spec:
image: ${actions.build.my-build.outputs.deploymentImageId}
args: [npm, test]
brief-restaurant-63679
11/16/2023, 11:39 AMbig-spring-14945
11/17/2023, 6:26 PMbrief-restaurant-63679
11/30/2023, 4:44 PMbrief-restaurant-63679
12/01/2023, 8:15 AMRevisionHistoryLimit
to 10 if the --production
flag is set.
Is that correct? I don't see any reference to it in the source code?