lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7146) "Latest SVN" needs replaced on the website
Date Tue, 29 Mar 2016 00:31:25 GMT


Hoss Man commented on LUCENE-7146:

Quick summary of how the CMS currently gets that data...

* {{templates/core-sidebar.html}} & {{templates/solr-sidebar.html}} currently have blocks
that look like this...{code}
{% if svn %}
<div id="svn">
  <h1>Latest SVN</h1>
  <div class="status-item">
  {% for e in svn.list %}
  <div class="section-content">
    <a class="svn" href="{{ e.revision }};view=revision">r{{
e.revision }}</a>
    {{ e.message|safe|truncatewords_html:20 }} ({{
    e.projects|safe }}) &mdash;
    <a href="{{ }}">{{
{% endfor %}</div></div>
* the {{svn}} variable(s) are populated by some code in {{lib/}} when it detecs that
the page is either (core|solr)/index.html...{code}
# there is a similar looking block for solr's index.html
[qr!core\/index\.mdtext$!, main => { template => "core.html",
  preprocess => 1,
      jira     => ASF::Value::Jira->new(limit => 5,
                                    url => "", localMode =>
  svn      => ASF::Value::SVN->new(limit => 5, project => "/lucene/dev/trunk",
                                    localMode => $localMode),
  coreuser => ASF::Value::Mail->new(list => '',
                                        limit => 3,
                                        localMode => $localMode),
  dev => ASF::Value::Mail->new(list => '',
                                          limit => 3, localMode => $localMode),
* the ASF::Value::SVN package is some ASF CMS custom code that can be found here:
** it uses SVN::Client under the covers

A big caveat here, is that unless i'm remembering completely wrong, all of this code is only
evaluated when teh site is "built" just before it's "published" -- once upon a time there
was a cron that automatically rebuilt & republished the site once an hour in order to
dynamically update content like this, but IIRC we ask infra to disable that for our site because
it was anoying, and was pushing out site updates even when we really didn't want it to (like
when staging release announcement)


Now, with all the "existing" stuff out of the way, some misc notes on how we could "fix" "Latest

* we could always just choose to completley remove that section from those sidebars
* As you can see in the code snippet above, in addition to ASF::Value::SVN, there are a few
other "ASF::Value::" modules available to fetch data from ASF sources for sidebars:
** but none for GIT at the moment
** and even if there was it wouldn't solve the "this data will only updated on site publish"
part of the problem
* the web based git browser apache is running does have an option to get an ATOM or RSS feed
for a repo:
** you can even restrict it by path so we could have distinct sidebar content for lucene and
** by default it seems to constrain to master commits, but we could alternatively restrict
to any named branch:
* writting our own perl code to fetch these feeds and populate variables for use in our sidebar
templates would be fairly straight forward
** the existing ASF::Value::Blog class could almost be used as-is for this, except it's hard
coded to only work with the domain.
* one option to completely bypass the "this data will only updated on site publish" part of
the problem would be to switch to a javascript solution for fetching the data
** my understanding of using javascript for this however is that it would require {{}}
to provide a {{Access-Control-Allow-Origin: *}} or {{Access-Control-Allow-Origin: *}}
header when serving these feeds -- something not currently done.
** it's possible infra might be willing to configure the webserver on
to add this, but i have no idea if there would be objections to that -- or to the subsequent
load on that webserver (one ATOM feed request for ever index.html page view)

> "Latest SVN" needs replaced on the website
> ------------------------------------------
>                 Key: LUCENE-7146
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: general/website
>            Reporter: Hoss Man
> Mike ask a little while back on dev@lucene...
> {noformat}
> On the bottom right of Lucene's index.html we have "Latest SVN" but of
> course it only displays this last svn commit:
>   r1726344 LUCENE-6937: moving trunk from SVN to GIT. (lucene) — dweiss
> Does anyone know how to convert this to the "Latest GIT"?
> {noformat}
> This isn't particularly straight forward, so filing an issue to track it

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message