[go: up one dir, main page]

Page MenuHomePhabricator

Codex PHP: Create and configure a new repo
Closed, ResolvedPublic2 Estimated Story Points

Description

After some consideration, we have decided to house the new Codex PHP code in a new, stand-alone repo in Gerrit. This will simplify versioning, releasing, and CI configuration. We can version this project independently of the Codex NPM packages if we so wish; the initial version will be 0.10.0 to signify that we are still in the initial development phase.

Code review is still happening on the open patch that adds a "codex-php" workspace within our NPM monorepo. We can continue using this patch for review until all necessary changes have been made, and then we'll close the patch and publish the code in a new repo (once it exists).

Acceptance Criteria

Event Timeline

egardner triaged this task as High priority.Sep 3 2024, 8:37 PM
egardner set the point value for this task to 2.

Thanks to @Ladsgroup for shedding some light on our CI configuration process.

It sounds like we will need to do something like this:

  • Open a patch in the integration/config repo to update the zuul/layout.yml file. This is where the CI jobs for each project are defined.
  • Codex is a NPM project so it uses the Node job template. We'll need to add another job template to run PHP Composer scripts. It looks like there are some node-plus-php templates available so I'll start with one of those.
  • We are in kind of a weird situation because the Codex monorepo is a NPM project, but we are now defining a workspace (sub-directory) that is a PHP project, which uses Composer instead of NPM. We may need to add a top-level composer.json file in the Codex root that essentially tells PHP to run all the composer scripts in packages/codex-php/. This is probably fine but I'll need to look into the Composer docs a bit to ensure I do this the right way.

The order of operations should probably be:

  • Merge the initial Codex PHP patch
  • Add whatever composer scaffolding we need in Codex after that
  • Open a patch in integration/config to update the job template.
  • Confirm that everything works under the new job configuration.
egardner renamed this task from Codex PHP: Enable PHP CI tasks in the Codex repo to Codex PHP: Create and configure a new repo.Sep 23 2024, 7:20 PM
egardner updated the task description. (Show Details)

To repeat what was said in Slack, I'd recommend against having a different repo. This will make aligned asset sharing, versioning, and releasing hard. Adding a couple of PHP jobs to the Codex repo is trivial CI configuration.

Change #1076164 had a related patch set uploaded (by Eric Gardner; author: Christian Aistleitner):

[integration/config@master] Zuul: [design/codex-php] Add CI

https://gerrit.wikimedia.org/r/1076164

egardner changed the task status from Open to In Progress.Sep 27 2024, 9:02 PM

Change #1076164 merged by jenkins-bot:

[integration/config@master] Zuul: [design/codex-php] Add CI

https://gerrit.wikimedia.org/r/1076164

egardner updated the task description. (Show Details)

Change #1078493 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[integration/config@master] Codex-PHP: Remove the postmerge tasks for now

https://gerrit.wikimedia.org/r/1078493

Change #1078493 abandoned by Hashar:

[integration/config@master] Codex-PHP: Remove the postmerge tasks for now

Reason:

It has been sorted out via T375939 using Doxygen to generate the documentation which is published at https://doc.wikimedia.org/design-codex-php/

https://gerrit.wikimedia.org/r/1078493