Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ run: install-che-operands genenerate-env ## Run Eclipse Che operator
debug: SHELL := /bin/bash
debug: install-che-operands genenerate-env ## Run and debug Eclipse Che operator
source $(BASH_ENV_FILE)
# dlv has an issue with 'Ctrl-C' termination, that's why we're doing trick with detach.
dlv debug --listen=:2345 --headless=true --api-version=2 cmd/main.go -- &
DLV_PID=$!
wait $${DLV_PID}
dlv debug --listen=:2345 --headless=true --api-version=2 cmd/main.go --

docker-build: ## Build Eclipse Che operator image
if [ "$(SKIP_TESTS)" = true ]; then
Expand Down
47 changes: 42 additions & 5 deletions build/scripts/clear-defined-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ declare -A replaced_modules=(
["go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0"]="github.com/open-telemetry/opentelemetry-go-contrib v1.35.0"
# https://github.com/census-instrumentation/opencensus-go/commits/v0.23.0/
["go.opencensus.io v0.23.0"]="census-instrumentation/opencensus-go 49838f207d61097fc0ebb8aeef306913388376ca"
# https://github.com/sean-/seed/tree/e2103e2c35297fb7e17febb81e49b312087a2372
["github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529"]="sean-/seed e2103e2c35297fb7e17febb81e49b312087a2372"
)

# replaces to have a correct link for clearlydefined.io api request
Expand All @@ -93,16 +95,41 @@ declare -A replaced_paths=(
# replaces to have a correct link for clearlydefined.io api request
declare -A replaced_api_suffix=(
["census-instrumentation/opencensus-go"]="git/github"
["sean-/seed"]="git/github"
)

# Exceptions for dependencies that are not yet harvested in clearlydefined.io
# License must be checked manually
declare -A ignored_paths=(
["github.com/sean-/seed"]="Harvesting in progress"
["github.com/devfile/devworkspace-operator"]="Harvesting in progress"
["go.etcd.io/etcd/pkg/v3"]="Harvesting in progress"
["go.etcd.io/etcd/server/v3"]="Harvesting in progress"
)

declare -A ignored_paths_license=(
["github.com/sean-/seed"]="MIT"
["github.com/devfile/devworkspace-operator"]="Apache-2.0"
["go.etcd.io/etcd/pkg/v3"]="Apache-2.0"
["go.etcd.io/etcd/server/v3"]="Apache-2.0"
)

retryUrl() {
url=$1

body=""
max_retries=5
for ((i=1; i<=max_retries; i++)); do
response=$(curl -s -w "HTTPSTATUS:%{http_code}" "$url")
body=$(echo "$response" | sed -e 's/HTTPSTATUS\:.*//g')
status=$(echo "$response" | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
if [[ "$status" == "200" ]] || [[ "$status" == "404" ]]; then
break
else
sleep 5s
fi
done

echo "$body"
}

go list -m -mod=mod all | while read -r module; do
# ignore the first dependency which is the current module
Expand Down Expand Up @@ -146,10 +173,14 @@ go list -m -mod=mod all | while read -r module; do
orig_url="https://api.clearlydefined.io/definitions/${api_suffix}/${path}/${version}"
url=$orig_url

score=$(curl -s "$url" | jq -r '.scores.effective')
score=""
body=$(retryUrl "$url")
if [[ ! -z "$body" ]]; then
score=$(echo "$body" | jq -r '.scores.effective')
fi

# try a shorter path if the first one returns null
while [[ "$score" == "null" ]] || [[ "$score" == "35" ]]; do
while [[ "$score" == "" ]] || [[ "$score" == "null" ]] || [[ "$score" == "35" ]]; do
# remove the last part of the path
path="${path%/*}"
old_url=$url
Expand All @@ -162,7 +193,11 @@ go list -m -mod=mod all | while read -r module; do
fi

# get the score again
score=$(curl -s $url | jq -r '.scores.effective')
score=""
body=$(retryUrl "$url")
if [[ ! -z "$body" ]]; then
score=$(echo "$body" | jq -r '.scores.effective')
fi
done

if [[ $score == "N/A" ]]; then
Expand Down Expand Up @@ -199,6 +234,8 @@ go list -m -mod=mod all | while read -r module; do
result="[WARN]"
fi
printf "%-7s %-70s %-25s %-10s %s\n" "$result" "$orig_module" "$license" "$score" "$url"

sleep 0.1s
done

echo "[INFO] All dependencies are defined correctly."
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ metadata:
categories: Developer Tools
certified: "false"
containerImage: quay.io/eclipse/che-operator:next
createdAt: "2025-08-28T09:40:43Z"
createdAt: "2025-09-17T12:17:05Z"
description: A Kube-native development solution that delivers portable and collaborative
developer workspaces.
features.operators.openshift.io/cnf: "false"
Expand All @@ -108,7 +108,7 @@ metadata:
operatorframework.io/arch.amd64: supported
operatorframework.io/arch.arm64: supported
operatorframework.io/os.linux: supported
name: eclipse-che.v7.109.0-940.next
name: eclipse-che.v7.109.0-941.next
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1141,7 +1141,7 @@ spec:
name: gateway-authorization-sidecar-k8s
- image: quay.io/che-incubator/header-rewrite-proxy:latest
name: gateway-header-sidecar
version: 7.109.0-940.next
version: 7.109.0-941.next
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
Loading
Loading