1. 12 Apr, 2017 8 commits
  2. 05 Apr, 2017 1 commit
    • Denis Laxalde's avatar
      [server] Add source_by_eid and source_by_uri methods to repository · d540defa0591
      Denis Laxalde authored
      Most of the times we only need to retrieve one source (either by uri or eid)
      and querying sources_by_eid and sources_by_uri properties on repository just
      for one item is costly. So these methods query what's needed. We issue a
      ValueError (instead of KeyError for sources_by_{eid,uri} dict) in case the key
      is not found.
      branch : 3.25
  3. 04 Apr, 2017 1 commit
  4. 05 Apr, 2017 2 commits
    • Denis Laxalde's avatar
      [server] Inline _entity_update method into init method of AbstractSource · f54286c1cef5
      Denis Laxalde authored
      This _entity_update method does not make sense now that we do not update
      source from database information but always build them afresh.
      branch : 3.25
    • Denis Laxalde's avatar
      [server] Drop update_config method of source · a446124bcf3c
      Denis Laxalde authored
      It does not make sense anymore to update the config of a source instance
      (subclass of cubicweb.server.sources.AbstractSource) now that they are always
      built from database information (CWSource). In datafeed and ldapfeed, we
      move all code from "update_config" method in "init" method.
      This changeset fixes LDAPFeedUserDeletionTC.test_a_filter_inactivate() failure
      (unittest_ldapsource.py) introduces in previous changeset.
      branch : 3.25
  5. 04 Apr, 2017 1 commit
    • Denis Laxalde's avatar
      [server] Make "sources_by_uri" and "sources_by_eid" properties of repository · db2fc87348ab
      Denis Laxalde authored
      I.e. do not populate these dict as repo initialization (bootstrap step) but
      always use information from database. This is needed because when multiple
      instances of the same application run, if one instance adds a CWSource the
      other ones will not see it. In particular, when using a scheduler instance,
      new CWSource will be added by the web instance and not seen by the scheduler
      which is supposed to update them.
      We thus define properties for sources_by_eid and sources_by_uri instead
      attributes on repository instance. CWSource entities are thus retrieved from
      database every time these properties are accessed. We factor out
      initialization of the "source" instance (subclass of
      cubicweb.server.source.AbstractSource) in a _sources() method. Note that this
      method takes care of calling "init" method on the source as well as
      "set_schema" (previously done in repo.set_schema(), which now only touches
      system_source). Accordingly the "init_sources_from_database" method is dropped
      along with "add_source"/"remove_source" methods.
      In syncsources hook, we thus drop:
      * SourceAddedOp operation which called repo.add_source() so that the
        SourceAddedHook only cares about checking source configuration now;
      * SourceRemovedOp and SourceRenamedOp operations for the same reason;
      * SourceConfigUpdatedOp as updating the live config of source is
        meaningless once we rely on them being retrieved from the database;
      * SourceHostConfigUpdatedHook hook which is now useless without call to
      In 3.10 migration script, remove usage of sources_by_uri repo attribute which,
      unless I'm missing something, appears useless (at least now).
      In tests:
      * unittest_datafeed: remove test_update_url method since we dropped respective
      * unittest_ldapsource: LDAPFeedUserDeletionTC.test_a_filter_inactivate()
        currently fails because it still relies on live config being updated, this
        will be fixed in the next changeset once all "live source" logic will be
      branch : 3.25
  6. 21 Feb, 2017 1 commit
    • Denis Laxalde's avatar
      Add a "Contributing" section to README with patch submission guidelines · 29d032bb70d8
      Denis Laxalde authored
      For the CubicWeb project and its dependencies, we now prefer patches
      submission and review by email on a public mailing list. We are thus moving
      away from the previous vcreview-based workflow taking place on the forge.
      This change is motivated by the following points:
      - the current reviewer assignment mechanism (pick a random reviewer, rely on
        reviewer availability rather than on willingness to review, send related
        patches to distinct people, etc.) is inefficient if not counter-productive;
      - most of the times, discussion only happens between the patch submitter and a
        reviewer with no easy way to increase the audience;
      - cubicweb-vcreview has no concept of patch series;
      - cubicweb-vcreview is not actively maintained anymore and its usability keeps
      We expect that email-based submission and review of patches will circumvent
      these limitations. Anybody interested in the project is welcome to subscribed
      to the mailing list and participate to the review process.
      This patch documents the basic workflow of patches submissions by email.
      branch : 3.25
  7. 04 Apr, 2017 1 commit
  8. 03 Apr, 2017 1 commit
  9. 07 Apr, 2017 2 commits
    • Denis Laxalde's avatar
      [cwconfig] Add "pyramid" config type to MCOMPAT dict · 10a18c6c5e10
      Denis Laxalde authored
      I don't know what this is for exactly, but the accept_mode method below
      queries this dict with the configuration type name. And if the latter is
      "pyramid", it crashes since there's no key in MCOMPAT dict. So add one with
      the same value as "all-in-one". This code is called during "upgrade"
      migration in particular.
      branch : 3.25
    • Denis Laxalde's avatar
      [pyramid] Avoid shutting down the repository at exit if it's already shutting down · 4db0f2251960
      Denis Laxalde authored
      For install `cubicweb-ctl pyramid` command will explicitly call
      `repo.shutdown()` so the atexit hook is redundant. Prevent the latter to be
      executed when the repository is already shutting down (otherwise one gets an
      assertion error).
      branch : 3.25
  10. 05 Apr, 2017 1 commit
  11. 04 Apr, 2017 1 commit
  12. 05 Apr, 2017 3 commits
  13. 04 Apr, 2017 2 commits
  14. 30 Mar, 2017 7 commits
  15. 29 Mar, 2017 8 commits