Skip to content

Commit a49cc47

Browse files
committed
chore: clean wip
1 parent af2342e commit a49cc47

File tree

3 files changed

+1
-61
lines changed

3 files changed

+1
-61
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ USER 1000
3939
WORKDIR /app
4040
ENTRYPOINT ["/app/xfuncjs-server"]
4141

42-
# RUN npm i -g tsx
43-
4442
ENV YARN_CACHE_FOLDER=/tmp/yarn-cache
4543
ENV HOME=/tmp
4644

pkg/node/yarn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (yq *YarnQueue) executeYarnInstall(job *YarnInstallJob) error {
8181
jobLogger.Info("Starting queued yarn install")
8282

8383
// Create yarn command
84-
yarnCmd := exec.CommandContext(job.Context, "yarn", "workspaces", "focus")
84+
yarnCmd := exec.CommandContext(job.Context, "yarn", "workspaces", "focus", "--production", "--json")
8585
yarnCmd.Dir = job.WorkDir
8686
yarnCmd.Env = os.Environ()
8787

tests/deploy-xfuncjs.sh

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -71,61 +71,3 @@ for i in {1..30}; do
7171
kubectl get functionrevisions.pkg.crossplane.io -o wide
7272
fi
7373
done
74-
75-
# Check for the existence of the pod with the latest tag
76-
echo "Checking for pod with the latest tag..."
77-
for i in {1..30}; do
78-
# List all pods with the function-xfuncjs label
79-
echo "Listing all function-xfuncjs pods..."
80-
kubectl get pods -n crossplane-system -l pkg.crossplane.io/function=function-xfuncjs -o wide || true
81-
82-
# Check if any pod has the correct image and is in a valid state
83-
# This command will output lines like: "pod-name image-name:tag Running/Succeeded"
84-
POD_LIST=$(kubectl get pods -n crossplane-system -l pkg.crossplane.io/function=function-xfuncjs -o custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image,STATUS:.status.phase --no-headers 2>/dev/null || echo "")
85-
86-
if [ -z "$POD_LIST" ]; then
87-
echo "No pods found for function-xfuncjs yet"
88-
else
89-
# Check each pod in the list
90-
echo "$POD_LIST" | while read -r POD_LINE; do
91-
if [ -z "$POD_LINE" ]; then
92-
continue
93-
fi
94-
95-
# Extract pod name, image, and status
96-
POD_NAME=$(echo "$POD_LINE" | awk '{print $1}')
97-
POD_IMAGE=$(echo "$POD_LINE" | awk '{print $2}')
98-
POD_STATUS=$(echo "$POD_LINE" | awk '{print $3}')
99-
100-
echo "Checking pod: $POD_NAME, Image: $POD_IMAGE, Status: $POD_STATUS"
101-
102-
if [[ "$POD_IMAGE" == *"${TAG_TIMESTAMP}"* && ("$POD_STATUS" == "Running" || "$POD_STATUS" == "Succeeded") ]]; then
103-
echo "Pod $POD_NAME is in a valid state with the correct image: $POD_IMAGE (Status: $POD_STATUS)"
104-
# Set a flag to indicate we found a valid pod
105-
touch /tmp/valid_pod_found
106-
break
107-
else
108-
echo "Pod $POD_NAME found but either wrong image or not in a valid state yet:"
109-
echo " - Image: $POD_IMAGE"
110-
echo " - Status: $POD_STATUS"
111-
fi
112-
done
113-
114-
# Check if we found a valid pod
115-
if [ -f /tmp/valid_pod_found ]; then
116-
rm /tmp/valid_pod_found
117-
break
118-
fi
119-
fi
120-
121-
echo "Waiting for pod with tag ${TAG_TIMESTAMP} to be ready... ($i/30)"
122-
sleep 2
123-
124-
# If we've waited too long, show the current state
125-
if [ $i -eq 30 ]; then
126-
echo "Current pods in crossplane-system namespace:"
127-
kubectl get pods -n crossplane-system
128-
fi
129-
done
130-
131-
echo "XFuncJS server deployed successfully with tag: ${TAG_TIMESTAMP}!"

0 commit comments

Comments
 (0)