#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Pinned images, loaded by every case through `init-system-environment` —
# the same role apache/skywalking's test/e2e-v2/script/env plays there.
#
# A value already exported in your shell WINS over the one here, so a local
# override needs no edit to this tracked file:
#
#     export E2E_SKIP_PROFILING=true     # no rover; implied off-Linux anyway
#     export ISTIO_VERSION=1.25.0        # try another mesh version
#     make -C test/e2e run CASE=istio
#
# Everything the fixture runs on is a published apache image; nothing is built
# from an upstream checkout, so this file plus the compose files is the whole
# dependency on the SkyWalking repo.
#
# Bumping: pick a commit SHA from the relevant upstream master and confirm the
# tag exists before committing it —
#
#     docker manifest inspect ghcr.io/apache/skywalking/oap:<sha>
#
# NEVER move these to `latest`. A `latest` here means an unrelated push to an
# upstream master can turn Horizon's CI red with no Horizon commit involved,
# and the failure reads as our regression.

# OAP. Must be at or after 5b481a41a9 (#13877), which added the
# server-admin/ui-management module Horizon's template store talks to on the
# admin host. Before that commit `templates.mode: live` cannot work.
# Not the v11.0.0 tag commit (6f1fd78e): ghcr publishes per master push and
# that commit is off-master, so no image is built for it — a release tag is
# not a pinnable reference here.
#
# Must also be at or after afddbd65de (#14063). Before it, OAP's first
# runtime-rule pass after boot tore down and reloaded every bundled MAL and LAL
# rule, dropping that round's samples without a log line, and OAP accepted
# requests on 11800/12800 before its rule sets were set up — so a fresh
# fixture lost its first round of metrics.
# Must also be at or after 289b4b3bd2 (#14084), which serves an AI agent
# conversation and its stored files: the `ai-agent` case reads both.
# Must also be at or after d9e895f560 (#14108), whose conversation document
# lists each call's execution records: the `ai-agent` case reads them.
# Must also be at or after f34b9c7ef0 (#14152), whose GenAI evaluation records
# name the store holding the judged span (`ZIPKIN` among them): the `genai`
# case reads all three stores.
SW_OAP_COMMIT=f34b9c7ef04792fcd48869aaa44c88f2e802ebc4

# The AI Sessionizer, which builds a conversation and pushes it to OAP. Only
# the `ai-agent` case runs it, and only once: a conversation is a chain of
# rounds already written, not traffic. Must be at or after 03c5a8f (#44),
# whose scenarios write the execution records of calls to MCP servers.
SW_AI_SESSIONIZER_COMMIT=fc04fa1248ddf495736106f17fd70057212bc97e

# BanyanDB — the storage every case runs on. OAP's own default selector is
# banyandb, so no SW_STORAGE override is needed anywhere.
#
# This is the v0.11.0 RELEASE commit. 0.11 is the first release carrying the
# schema-consistency surface the BanyanDB client depends on: SchemaBarrierService,
# STATUS_SCHEMA_NOT_APPLIED, and created_at on schema objects.
SW_BANYANDB_COMMIT=3b83e18fb0481d02e44eaa5df137fcf7b000754b

# Java agent image. Carries the agent at /skywalking/agent and presets
# JAVA_TOOL_OPTIONS, so the demo services need no -javaagent of their own.
SW_AGENT_JAVA_COMMIT=ac0df43d7140e726eba9e5e5b1b75cf364c71dff
SW_AGENT_JDK_VERSION=17

# The demo apps: apache/skywalking's own e2e services, published as images so
# no Maven build is needed here. Tagged from the last master push that touched
# test/e2e-v2/java-test-service. Four images share this pin: the provider and
# consumer every compose case runs, and the genai case's two — the Spring AI
# app (e2e-spring-ai-service) and the mock LLM that answers both its callers
# and OAP's judge (e2e-mock-llm-server).
#
# Must be at or after 51e727359f (#14071), which vendored the Spring AI app and
# split the mock LLM out of the provider into its own image.
SW_E2E_SERVICE_COMMIT=51e727359fd00f006cf7a98511ae205176171969

# swctl, the project's own CLI — used for the fixture sanity check that asks
# OAP directly what it knows, bypassing Horizon. Built from source because
# skywalking-cli publishes no binaries; the latest release tag (0.14.0) long
# predates this commit, so a tag here would be a downgrade.
SW_CTL_COMMIT=85e5afdb3d55c6e5af66a472c3fe8ac024d11690

# A frontend calling a backend, both reporting Zipkin spans, which is what
# exercises OAP's Zipkin receiver and Horizon's Zipkin query surface.

# ElasticSearch, for the case that exercises Horizon's pre-v2 trace path.
# Trace Query v2 is BanyanDB-only, so this is the ONLY deployment where
# hasQueryTracesV2Support is false and the v1 branch runs at all.
ES_VERSION=8.18.8

# The browser runs INSIDE this image, in CI and on a laptop alike, so the e2e
# environment is locked to one Ubuntu. Chromium's rendering, fonts and system
# libraries are then identical everywhere, and a local run reproduces CI
# exactly rather than approximately. Must match the @playwright/test version
# in test/e2e/playwright/package.json.
SW_PLAYWRIGHT_IMAGE=mcr.microsoft.com/playwright:v1.62.1-noble

# ── Horizon under test ──────────────────────────────────────────────────
# Built from this checkout (`make -C test/e2e image`) or loaded from the CI
# artifact. Never pulled — compose sets pull_policy: never so a missing build
# fails loudly instead of silently testing someone else's image.
HORIZON_E2E_IMAGE=horizon-ui:e2e

# The fixture's only account. The hash is argon2id of HORIZON_E2E_PASSWORD.
#
# NOT QUOTED, and nothing in this file may be. infra-e2e reads it by splitting
# each line on the first `=` and exporting the remainder verbatim — it does no
# quote stripping and no expansion. Quoting the hash therefore ships the `'`
# characters into the container as part of the hash, argon2 rejects it, and
# every authenticated case fails with an empty body rather than a 401 anyone
# would recognise.
#
# The same constraint is why no reader of this file may shell-source it: bash
# would expand the `$argon2id` / `$v` / `$m` segments to nothing. Read
# individual keys instead (see script/prepare/build-images.sh).
HORIZON_E2E_USER=e2e
# The API token's identity, and deliberately NOT the account any case signs in
# with. Presenting a token is not a sign-in, and the audit case proves it by
# asserting this name never appears on the Login tab — which only means
# anything while nothing else can put it there.
HORIZON_E2E_TOKEN_USER=e2e-token-bot
HORIZON_E2E_PASSWORD=e2e-passw0rd
HORIZON_E2E_PASSWORD_HASH=$argon2id$v=19$m=65536,t=3,p=4$K/f0dJqlI/c1I6RPxNhTPg$sZ2NcLuSPL/o4bqNrARetaLVp4MDmV0xzxdwyYUKh+U

# ── kind / istio scenario ────────────────────────────────────────────────
# The kind NODE image is pinned in cases/istio/kind.yaml instead — kind reads
# that file verbatim, so a ${VAR} in it would be pulled literally. Keep this
# kubectl version in step with the node image's k8s version.
KUBECTL_VERSION=v1.28.15
HELM_VERSION=v3.16.3
ISTIO_VERSION=1.24.3
# bookinfo's images are tagged independently of Istio itself — read off the
# manifest the case applies, not guessed from ISTIO_VERSION.
BOOKINFO_VERSION=1.20.2
TRAFFIC_GEN_IMAGE=alpine/curl:8.9.1
# The helm chart's wait-for-banyandb init container references `curlimages/curl`
# UNTAGGED — it resolves to `:latest` and the chart exposes no override. The tag
# a kind case side-loads therefore has to be `:latest` too. build-images.sh pins
# the CONTENT instead: it pulls this version and re-tags it as `:latest` locally,
# so a run is reproducible even though the reference cannot be pinned.
SW_CURL_IMAGE=curlimages/curl:8.11.1
# skywalking-helm publishes an OCI chart per commit, not per release.
#
# Must be at or after 3aee62a, which moved OAP's init job out of a post-install
# hook. Before it, `helm --wait` deadlocks against that job — the release fails
# with "Job/skywalking-oap-init not ready ... Job in progress" whenever the job
# is slower than the timeout, which reads like a broken fixture rather than a
# known chart bug.
SW_HELM_CHART_COMMIT=3aee62ac0b0a8c9626abbd386e9728c859cd21be
# rover ships no helm chart; the istio case applies its DaemonSet directly.
SW_ROVER_IMAGE=ghcr.io/apache/skywalking-rover/skywalking-rover:79292fe07f17f98f486e0c4471213e1961fb2d1d
# The collector that scrapes BanyanDB's FODC proxy and pushes OTLP to OAP —
# the only path by which the BANYANDB layer's metrics exist.
SW_OTEL_COLLECTOR_IMAGE=otel/opentelemetry-collector-contrib:0.115.1
# Becomes the BANYANDB service name: OAP's banyandb rules build the service
# from the `cluster` label the collector adds.
BANYANDB_E2E_CLUSTER=e2e-banyandb

# Reached from the browser container over the kind node's published NodePort.
HORIZON_E2E_NODE_PORT=30081
