[ 
https://issues.apache.org/jira/browse/YUNIKORN-3388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18108665#comment-18108665
 ] 

KAI-JAY TU commented on YUNIKORN-3388:
--------------------------------------

[[email protected]]

Quick status + question on YUNIKORN-3389 before I finish the PR.

PR: [https://github.com/apache/yunikorn-site/pull/576] (Draft)

h2. Status

Local branch YUNIKORN-3389 has 4 commits (on top of master
{{66ef06cc62}}) fixing 42 of 51 broken-anchor warnings reported by
{{pnpm build}}. No content rewrites; only anchor targets and one
clearly dangling link were changed.

# {{[YUNIKORN-3389] Correct case in versioned-doc anchor links}} -- 26 files
  Case-only fix; Docusaurus slugs are lowercase-hyphenated so
  {{#Cleanup}}, {{#Deploy-YuniKorn}}, {{#Namespace-quota}} etc. resolve
  to nothing.
# {{[YUNIKORN-3389] Update stale cross-page anchor targets in versioned docs}} 
-- 10 files
  Back-port fixes already present in 1.6.3+ / 1.8.0+ to older
  versioned copies: {{#tag-for-release}} rename in {{release_procedure}},
  {{api/scheduler.md}} -> {{api/cluster.md}} for
  {{#configuration-validation}} and {{#metrics}} in 1.7.0, and drop
  {{#Overview}} from 1.7.0 {{api/system.md}} (the body h1 is absorbed
  into the frontmatter title so no slug is produced).
# {{[YUNIKORN-3389] Drop trailing '?' from quota_preemptor anchor references}} 
-- 3 files
  Docusaurus strips trailing punctuation from heading slugs; the
  self-references still carried the {{?}}.
# {{[YUNIKORN-3389] Point 1.0.0/1.1.0 run_flink label link to 
workload_overview}} -- 2 files
  The {{#run-workloads-with-yunikorn-scheduler}} target never existed
  in that page; adopt the 1.2.0+ fix.

h2. Remaining: 9 pages, all use the same footnote HTML anchor pattern

* {{design/cache_removal.md}} @ 1.0.0, 1.1.0
* {{design/scheduler_configuration.md}} @ 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 
1.5.2, 1.7.0

Pattern:
{code}
Some text <sup id="s1">[1](#f1)</sup>.
...
<br/><b id="f1"></b>1: https://... [return](#s1)
{code}

Docusaurus 3.9.2's {{onBrokenAnchors}} check does not pick up ids on
empty inline elements ({{<b id="">}}, {{<a id="">}}). The runtime HTML
anchor actually works -- users clicking [1] do jump to the target --
but the build check flags them. The 1.6.3 copy of
{{scheduler_configuration.md}} handled this by rewriting the footnote
with {{<p id="footnoteN">}} and inlining one of the two footnotes,
which is a content rewrite, not a mechanical fix.

h2. Options for the 9 remaining pages

* *A.* Convert each footnote target line to an MDX heading with
  explicit id ({{##### 1 \{#f1\}}}). Guaranteed to be recognised by
  Docusaurus, but adds a small visible heading and a sidebar TOC entry
  per footnote.
* *B.* Replace {{<br/><b id="fX"></b>...}} with
  {{<p id="fX">...</p>}}, same pattern as the 1.6.3 rewrite. Proven
  precedent in the repo; minor block-vs-inline visual shift.
* *C.* Move the id onto an inline element that already has content:
  keep the original {{<sup id="s1">[1](#f1)</sup>}} on the forward
  reference and change the return target to
  {{<br/><span id="f1">1</span>: ...}}. Rendering stays essentially
  identical -- but needs a quick verify build to confirm Docusaurus
  recognises non-empty inline ids.
* *D.* Set {{onBrokenAnchors: 'warn'}} in {{docusaurus.config.js}}.
  Not preferred; hides future breakages.

h2. Question

Which approach would you prefer? Or is there a red line on editing
older versioned docs at all (e.g. only fix current {{docs/}}, leave
older versioned copies as-is)?

I will keep the PR as Draft until we agree on direction.

h2. Side note: JIRA description

The description on this ticket is a copy-paste of YUNIKORN-3388
(quota_preemptor design doc). I have a corrected description ready to
paste; can either fix it before or after PR review, whichever is
easier.

> Update quota_preemptor design doc to match current implementation
> -----------------------------------------------------------------
>
>                 Key: YUNIKORN-3388
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-3388
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - scheduler
>            Reporter: KAI-JAY TU
>            Assignee: KAI-JAY TU
>            Priority: Minor
>              Labels: design-doc, documentation, newbie, pull-request-available
>
> While working on YUNIKORN-3248 (user guide update), three descriptions in the
> design doc docs/design/quota_preemptor.md were found to no longer match the
> current implementation. This was acknowledged by @manirajv06 on 
> apache/yunikorn-site#570
> as a follow-up item.
> Reference: apache/yunikorn-site master 66ef06c, docs/design/quota_preemptor.md
> 1) Timer behavior on config changes (around line 110)
>    Design doc says:
>      "In case of any such changes, timers reset and start again from the
>       beginning."
>    Implementation actually does:
>      - Delay change: delta adjustment, startTime += (newDelay - oldDelay).
>      - Consecutive quota decreases: preserves the earliest startTime instead
>        of resetting.
>    References: internalQuotaPreemption() in scheduler.go, quota_preemptor.go,
>    tryAcquirePreemption() in queue.go.
> 2) Delay format and placement (lines 74, 94, 107)
>    Design doc shows the delay as an integer in seconds under the resources:
>    block, for example:
>      resources:
>        max: \{memory: 10G}
>        quota.preemption.delay: 7200
>    Implementation actually uses Go time.Duration format under queue
>    properties:, for example:
>      properties:
>        quota.preemption.delay: 2h
> 3) Impact of Restart section (around lines 113-115)
>    Design doc only says the timer "would start again from the beginning"
>    after restart. It does not explain that during recovery,
>    IncAllocatedResource() triggers setPreemptionTime() when usage > max,
>    which effectively restarts the countdown from the recovery moment.
> Acceptance criteria:
> - docs/design/quota_preemptor.md updated so the three items above match the
>   current implementation.
> - Sample YAML in the doc reflects properties: placement and time.Duration
>   format.
> - Restart section explains the setPreemptionTime() trigger during recovery.
> Not in scope:
> - User guide (already covered by YUNIKORN-3248 / apache/yunikorn-site#570).
> - Implementation changes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to