Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 576478

Summary: [pmi] Use Foundation DB to determine whether or not we can create a new project
Product: Community Reporter: Wayne Beaton <wayne.beaton>
Component: Project Management & PortalAssignee: Eric Poirier <eric.poirier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eric.poirier, mariateresa.delgado, wayne.beaton, webmaster
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Wayne Beaton CLA 2021-10-06 12:19:10 EDT
The PMI functionality for creating a new project from a proposal stops us from creating a project that does not already have a record in the Foundation database. That is, in order for us to be able to create a project in the PMI, we must first create a record with a matching ID for that project in the Foundation DB.

When we initially implemented this functionality, the Foundation DB was not configured to be accessed directly. So instead of hitting the Foundation DB directly, we worked against the 'eclipse' database, which contains a copy of some of the information in the Foundation DB. The Eclipse DB, AFAIK, is updated periodically from the Foundation DB, which means that the information contained in it lags somewhat behind the information in the Foundation DB. I'm not sure exactly how frequently this occurs, but I believe that it's every few hours.

We're in a situation now where it appears that the project record that we've created, 'iot.kiso-testing', in the Foundation DB has not been propagated to the Eclipse DB for what I believe is 24 hours (at least this is what we believe is happening based on the behaviour in the PMI).

Webmaster, can you check to see if a "project" record exists with "iot.kiso-testing" as the ID in the Eclipse DB? ... and whether or not the synchronisation script needs a kick?

Now that the Foundation DB is configured in a manner that we can access it directly, I'd like to remove the lag altogether. That is, I'd like to update the check to skip the Eclipse DB and hit the Foundation DB directly.

To do this, the "foundationdb" PMI module needs to be updated so that the SQL query selects against the "Projects" (not "projects") table and the query runs against the "foundation" (not "eclipse") DB.
Comment 1 Wayne Beaton CLA 2021-10-06 13:28:02 EDT
> To do this, the "foundationdb" PMI module needs to be updated so that the
> SQL query selects against the "Projects" (not "projects") table and the
> query runs against the "foundation" (not "eclipse") DB.

The field name also needs to be changed from "project_id" to "ProjectId".
Comment 2 Eric Poirier CLA 2022-02-03 09:59:40 EST
Here is the MR I created a week ago:

https://gitlab.eclipse.org/eclipsefdn/it/webdev/drupal/pmi/-/merge_requests/6
Comment 3 Wayne Beaton CLA 2022-02-08 16:46:04 EST
Maria Teresa, this change should mean that the lag between adding a new project record in the Foundation DB and being able to create a project using that ID should be zero. 

If you notice different behaviour the next time you create a project, let's circle back.