Skip to content

Instantly share code, notes, and snippets.

@aziz-712
Last active January 23, 2024 13:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aziz-712/f6a2dffa3bdfa773b914ef0f9c2f9f2c to your computer and use it in GitHub Desktop.
Save aziz-712/f6a2dffa3bdfa773b914ef0f9c2f9f2c to your computer and use it in GitHub Desktop.
GSoC Project submission trial

Google Summer of Code 2023 - Final Submission

Project Details

Project Name: Enviromage
Organization: Drupal Assocation
Mentor: Timothy Lehnen
Contributor: Ahmed Aziz Abbassi

Overview

Welcome to Enviromage, a powerful Drupal module designed to unleash the full potential of your website's performance and configuration management. With its comprehensive environment configuration settings, Enviromage empowers users to tailor their website's behavior across different deployment scenarios effortlessly. Delve into the magic of Composer performance checks (dry run), ensuring seamless package updates without disrupting your live environment's harmony. Enviromage's mystical memory size analysis reveals resource-intensive modules, enabling you to optimize your website's performance with ease. Unveil the secrets of your website's underlying magic with Enviromage's effortless retrieval of essential environment configurations. Embark on a captivating journey of Drupal development and performance optimization with the enchanting Enviromage by your side.

helpful links

NB: You could track my progress during the GSoC coding period in the project's GitHub repository.

Project Goals

Main idea: Check the PHP memory readiness when running In-Place updates because there is a high possibility the updates can fail because of the limited PHP memory.

Developed ideas and goals:
  1. Profile various components of a web site
  2. Profile Automatic Updates Module
  3. Retrieve environment configuration
  4. Gather a module's memory size
  5. Simulate a composer update (help us profile the update memory usage)

Applaying to GSoC 2023 phase

I wrote a python Web scraper that retrieves the best 10 organizations, which could fit with my skill set and my interests, from the Google Summer of Code web site. Then, I went through all the 10 organizations' project ideas that I could opt for my summer of code. Finally, I made my decision to go with Drupal Association. And, I wrote my proposal. My mentor Timothy had reviewed my proposal and was impressed by my proposal's quality. It was a good sign to me to be accepted in the Google Summer of Code program.

Link to the Google Summer of Code organizations scraper: GSoC22-23-scraper
Link to my proposal: summerofcode.withgoogle.com/aziz_propsal

Work Done During GSoC 2023

Preparation 1

  1. Set up ddev for Drupal development
  2. Follow the 'Hello World' module tutorial to understand how to create a Drupal 10 module!

Phase 1

  1. Write standalone php code for php environment configuration checking
  2. Write standalone PHP code for variable size checking
  3. Write standalone php code for php memory usage checking

Phase 2

  1. Feature request: Adapt your Hello World module example to include: PHP memory checker
  2. Feature request: Adapt your Hello World module example to include: Environment configuration report
  3. Feature request: Adapt your Hello World module example to include: Variable size checker
  4. Feature request: Create a page in your module to display the results of your php memory check, variable check, and environment check functions
  5. Remove Duplicated code: UtilsController::return_bytes()

Preparation 2

  • Go Deeper: Learn about Drupal Modules Development
  • Phase 3

    1. Research: Drupal's hook system and api's for other modules
    2. Using documentation or a tutorial - Implement your first hook in your module
    3. Feature request: Use the hook system to gather the variable size of *another module* and display on the page.
    4. Feature request: Use the hook system to gather the memory usage of *another module* and display on the page.
    5. Feature request: Use the hook system to gather the environment configuration and display on the page.

    Phase 4

    1. Simulate a composer update process - and report warnings/errors, etc - as well as performance
    2. Security audit of the module
    3. Enable PHP curl extension: composer run slower if it's not enabled

    Phase 5

    1. Publish this module on Drupal.org
    2. Store history of performance tests in the database
    3. Create the first release (following semantic versioning)
    4. Storing Invalid Data Into database: composer command field is empty - it should not
    5. Storing the Time Execution of a composer command as an INT - Should be FLOAT instead
    6. Ensure Compatibility: Change the Enviromage modules' memory size table
    7. Modules' size Table: module_name field should be not null
    8. Show history of previous performance cheks

    Important decision was made - 21st of July

  • Rename Project: Inconvenient project name
  • Tasks left to do

    1. Prototype: Temporarily 'hack' the auto updates module to insert your performance measurements directly - then abstract into custom module
    2. After checking site configuration and doing basic performance - add customized performance recommendations performance results page
    3. When the newest test is run, let's provide a diff or other comparison between the latest results and the last test results

    Important things I learned during my project

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment