From d0955b82695eca13825aef8045c35be64a8d5e52 Mon Sep 17 00:00:00 2001 From: Sergey Baranov Date: Tue, 2 Jun 2026 10:19:16 +0000 Subject: [PATCH 1/2] fix(generator): run check-repository for every repo at startup (ACWEB-6) check-repositories built its result with a lazy map realized only by notifier/complete-sync. The notifier is now a no-op stub, so the map was never realized -> check-repository never ran -> repos kept :git nil and the startup sync silently never happened (staging frozen since 2019; redis jobs hit nil :git -> NPE). Wrap the map in doall to decouple the sync from the notifier. Refs ACWEB-6. --- src/playground/generator/core.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/playground/generator/core.clj b/src/playground/generator/core.clj index 6ccc0c1..68f3e9d 100644 --- a/src/playground/generator/core.clj +++ b/src/playground/generator/core.clj @@ -162,7 +162,11 @@ (timbre/info "Delete repos: " (pr-str (map :name deleted-repos))) (doseq [repo deleted-repos] (delete-repo db repo)) - (let [result (map #(check-repository generator db % (get-repo-by-name-fn @% db-repos)) repos)] + ;; ACWEB-6: force realization — check-repository must run for every repo + ;; (sets :git, triggers startup sync). The notifier is a no-op stub, so the + ;; lazy `map` was never realized → check-repository never ran → repos had + ;; :git nil and no startup sync. `doall` decouples the sync from the notifier. + (let [result (doall (map #(check-repository generator db % (get-repo-by-name-fn @% db-repos)) repos))] (notifier/complete-sync notifier (remove :e result) (filter :e result))))) From eeb2e3dfcda707701bf082ff700754ea23936090 Mon Sep 17 00:00:00 2001 From: Sergey Baranov Date: Tue, 2 Jun 2026 10:52:50 +0000 Subject: [PATCH 2/2] feat(editor): include AnyChart release tags in version selector (ACWEB-6) update-anychart-versions fetched only /branches, so the editor's AnyChart version dropdown showed branch names (RC-*, feature) but none of the bare release tags (8.8.0..8.14.1). Also fetch /tags and merge; strip the leading v from semver tags (v8.14.1 -> 8.14.1) since cdn.anychart.com/releases// is bare (v8.14.1 -> 404, 8.14.1 -> 200). v7/v8 aliases left intact. Refs ACWEB-6. --- src/playground/data/config.clj | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/playground/data/config.clj b/src/playground/data/config.clj index 19b8836..66073f5 100644 --- a/src/playground/data/config.clj +++ b/src/playground/data/config.clj @@ -1,6 +1,7 @@ (ns playground.data.config (:require [cheshire.core :as json] [clj-http.client :as http] + [clojure.string :as string] [playground.utils.utils :as utils])) @@ -33,12 +34,32 @@ (defonce *anychart-versions (atom [])) +(defn- gh-names + "Fetch the :name field from a GitHub list endpoint (branches/tags)." + [url] + (->> (http/get url) :body (#(json/parse-string % true)) (map :name))) + + +(defn- tag->version + "Strip the leading v from semver release tags (v8.14.1 -> 8.14.1) so the + cdn.anychart.com/releases// URLs resolve; leave aliases like v7/v8 as-is." + [name] + (string/replace name #"^v(\d+\.\d+\.\d+)$" "$1")) + + (defn update-anychart-versions [] + ;; ACWEB-6: include release TAGS (v8.8.0..v8.14.1), not just branches, so the + ;; editor's AnyChart-version selector shows the full release list. Tags are + ;; v-prefixed but CDN release paths are bare, so strip the v from semver tags. + ;; NOTE: per_page=100 single page (engine has ~24 branches / ~50 tags); add + ;; pagination if either ever exceeds 100. (try - (let [data (http/get "https://api.github.com/repos/AnyChart/AnyChart/branches?per_page=100") - branches (json/parse-string (:body data) true) - branches (map :name branches)] - (reset! *anychart-versions branches)) + (reset! *anychart-versions + (distinct + (concat + (gh-names "https://api.github.com/repos/AnyChart/AnyChart/branches?per_page=100") + (map tag->version + (gh-names "https://api.github.com/repos/AnyChart/AnyChart/tags?per_page=100"))))) (catch Exception _ (reset! *anychart-versions '()))))