<div dir="ltr"><div><div>So just to wrap this up -- that admonition is not saying that modifying the data API for local use is impossible or illegal or something -- just that we will not take steps to make it easy to upgrade Buildbot after having made such a change.  You will be on your own to re-apply your patches.  That's why there's no easy points in the source code to hook in such things via configuration.<br><br></div>Pierre's suggestion of adding a web extension sounds like a good approach in your case, though.<br><br></div>Dustin<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-03 16:08 GMT-04:00 Sveto Krchnavy <span dir="ltr"><<a href="mailto:sveto70@gmail.com" target="_blank">sveto70@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hi Pierre.</p>
    <p>Thanks for pointing this. We need something similar as buildbot
      travis config (to define extra configuration data). Data are not
      in DB but on file system resp. in noSQL database.</p>
    <p><br>
    </p>
    <p>Best regards.</p><span class="HOEnZb"><font color="#888888">
    <p>Sveto.</p></font></span><div><div class="h5">
    <p><br>
    </p>
    <div class="m_-3546142648740971515moz-cite-prefix">On 03/05/2017 21:07, Pierre Tardy
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Sveto,
        <div><br>
        </div>
        <div>Could you please explain what kind of specific data you
          want to put in buildbot? Do you need the real time
          capabilities?</div>
        <div><br>
        </div>
        <div>Data API is a middleware between REST and mq/DB apis, so in
          order to add more Data API, you need to add db table, and db
          api to manage that. It is not that simple.</div>
        <div><br>
        </div>
        <div>There are much more simple way to create REST API. e.g:</div>
        <div><br>
        </div>
        <div><a href="http://couchdb.apache.org/" target="_blank">http://couchdb.apache.org/</a><br>
        </div>
        <div><a href="https://github.com/Kinto/kinto" target="_blank">https://github.com/Kinto/kinto</a></div>
        <div><a href="http://python-eve.org/" target="_blank">http://python-eve.org/</a><br>
        </div>
        <div><br>
        </div>
        <div>If you really want to add REST endpoints to buildbot, you
          can create a web plugin. This is something that is
          demonstrated in buildbot_travis:</div>
        <div><a href="https://github.com/buildbot/buildbot_travis/blob/master/buildbot_travis/api.py" target="_blank">https://github.com/buildbot/<wbr>buildbot_travis/blob/master/<wbr>buildbot_travis/api.py</a><br>
        </div>
        <div>You can see there the /config endpoint, which implement
          loading and saving the buildbot travis config via the web UI.</div>
        <div><br>
        </div>
        <div>Regards</div>
        <div>Pierre</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Wed, May 3, 2017 at 8:24 PM Sveto Krchnavy
          <<a href="mailto:sveto70@gmail.com" target="_blank">sveto70@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <p>Hi.</p>
            <p>Thanks for the answer. The way you proposed is
              understood, but is not inline with buildbot needs, we need
              specific data to be available via a REST API.</p>
            <p>In reality, we don't need to extend api v2, we want to
              have there parallel API but data concept is good to be
              reused. What is proposed way to do the extension?<br>
            </p>
            <p><br>
            </p>
            <p>Best regards.</p>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <p>Sveto.<br>
            </p>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <p><br>
            </p>
            <div class="m_-3546142648740971515m_-525358378464630120moz-cite-prefix">On
              03/05/2017 20:07, Dustin J. Mitchell wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>The idea is, you should not develop a custom
                  extension that you do not intend to upstream -- that's
                  why there's no "pluggability" included.  Instead, if
                  you have a need to add functionality, you should write
                  a patch to Buildbot and work to get it included in the
                  framework itself.  So you can extend the list of
                  submodules by editing the source :)<br>
                  <br>
                </div>
                Dustin<br>
              </div>
              <div class="gmail_extra"><br>
                <div class="gmail_quote">2017-05-03 8:25 GMT-04:00 Sveto
                  Krchnavy <span dir="ltr"><<a href="mailto:sveto70@gmail.com" target="_blank">sveto70@gmail.com</a>></span>:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div dir="ltr"><span style="font-size:12.8px">Hi.</span>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px">I wrote this request
                        to users mailing list but probably devel is
                        better list.</div>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px">I checked the
                        section '3.2.2.4. Extending the Data API' in
                        documentation and there is written:</div>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px">"The data API may be
                        extended in various ways: adding new endpoints,
                        new fields to resource types, new update
                        methods, or entirely new resource types. In any
                        case, you should only extend the API if you plan
                        to submit the extensions to be merged into
                        Buildbot itself. Private API extensions are
                        strongly discouraged."</div>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px">What is main reason
                        to discourage extending data API?</div>
                      <div style="font-size:12.8px">What is preferred
                        way to extend data API with new endpoints with
                        additional resources (extending REST API)?</div>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px">I checked the code
                        and there is no support to extend the list of
                        submodules in DataConnector class.</div>
                      <div style="font-size:12.8px"><br>
                      </div>
                      <div style="font-size:12.8px">Thanks.</div>
                    </div>
                    <br>
                    ______________________________<wbr>_________________<br>
                    devel mailing list<br>
                    <a href="mailto:devel@buildbot.net" target="_blank">devel@buildbot.net</a><br>
                    <a href="https://lists.buildbot.net/mailman/listinfo/devel" rel="noreferrer" target="_blank">https://lists.buildbot.net/<wbr>mailman/listinfo/devel</a><br>
                  </blockquote>
                </div>
                <br>
              </div>
            </blockquote>
            <br>
          </div>
          ______________________________<wbr>_________________<br>
          devel mailing list<br>
          <a href="mailto:devel@buildbot.net" target="_blank">devel@buildbot.net</a><br>
          <a href="https://lists.buildbot.net/mailman/listinfo/devel" rel="noreferrer" target="_blank">https://lists.buildbot.net/<wbr>mailman/listinfo/devel</a></blockquote>
      </div>
    </blockquote>
    <br>
  </div></div></div>

<br>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@buildbot.net">devel@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/devel" rel="noreferrer" target="_blank">https://lists.buildbot.net/<wbr>mailman/listinfo/devel</a><br></blockquote></div><br></div>