So up until a week ago running ‘skaffold dev’ was working the way I expected. It would immediately start building my containers and deploying them and when I had updates to my code it would immediately restart the containers with my new changes.
For some reason when I ran that same command in the same project folder I’ve been working on, it suddenly takes 10-30 minutes for skaffold to get past this one step
I am on a windows 11 machine
Generating tags...
- niaporter/apiservice -> niaporter/apiservice:0e33b39-dirty
- niaporter/mal-client -> niaporter/mal-client:0e33b39-dirty
Checking cache...
here’s the version with vdebug
Generating tags...
- niaporter/apiservice -> time="2024-07-11T18:09:39-07:00" level=debug msg="Running command: [git describe --tags --always]" subtask=-1 task=Build
time="2024-07-11T18:09:39-07:00" level=debug msg="Running command: [git describe --tags --always]" subtask=-1 task=Build
time="2024-07-11T18:09:40-07:00" level=debug msg="Command output: [0e33b39n]" subtask=-1 task=Build
time="2024-07-11T18:09:40-07:00" level=debug msg="Command output: [0e33b39n]" subtask=-1 task=Build
time="2024-07-11T18:09:40-07:00" level=debug msg="Running command: [git status . --porcelain]" subtask=-1 task=Build
time="2024-07-11T18:09:40-07:00" level=debug msg="Running command: [git status . --porcelain]" subtask=-1 task=Build
time="2024-07-11T18:09:40-07:00" level=debug msg="Command output: [ M testClient/src/App.tsxn M testClient/src/hooks/useGetCredentials.tsn]" subtask=-1 task=Build
time="2024-07-11T18:09:40-07:00" level=debug msg="Command output: [ M package.jsonn M skaffold.yamln M src/constants.tsn M src/routes/ghl/internal/login.tsn M testClient/src/App.tsxn M testClient/src/hooks/useGetCredentials.tsn M yarn.lockn?? src/routes/algolia/n]" subtask=-1 task=Build
niaporter/apiservice:0e33b39-dirty
- niaporter/mal-client -> niaporter/mal-client:0e33b39-dirty
time="2024-07-11T18:09:40-07:00" level=info msg="Tags generated in 240.6601ms" subtask=-1 task=Build
Checking cache...
time="2024-07-11T18:09:40-07:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true 4 4} {. /app true 7 7}]" subtask=-1 task=DevLoop
time="2024-07-11T18:09:42-07:00" level=debug msg="Found dependencies for dockerfile: [{package.json /app true 6 6} {yarn.lock /app true 6 6} {. /app true 9 9}]" subtask=-1 task=DevLoop
time="2024-07-11T18:09:42-07:00" level=debug msg="Could not import artifact from Docker, building instead (import of missing images disabled)" subtask=-1 task=Build
not sure what happened but it’s infuriating every time I have to make even the smallest code change
for reference in case it’s my setup
skaffold.yaml
apiVersion: skaffold/v4beta6
kind: Config
build:
artifacts:
- image: niaporter/apiservice
context: .
sync:
manual:
- src: 'src/***/*.ts'
dest: .
docker:
dockerfile: Dockerfile
- image: niaporter/mal-client
context: testClient
sync:
infer:
- '**/*.js'
- '**/*.ts'
- '**/*.tsx'
- '**/*.scss'
- '**/*.html'
docker:
dockerfile: Dockerfile
local:
push: false
manifests:
rawYaml:
- ./infra/k8s/*
# - ./infra/k8s-dev/*
deploy:
kubectl: {}
apiservice dockerfile
FROM node:alpine
WORKDIR /app
COPY package.json .
ENV NODE_ENV=production
RUN yarn install --prod
COPY . .
CMD ["yarn", "start"]
mal-client dockerfile
# Stage 1: Build the React application
FROM node:16 AS build
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install
COPY . ./
RUN yarn build
# Stage 2: Serve the React application with nginx
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]