Skip to content

Final Report of my Google Summer of Code project @json-schema-org. This report covers the work done in Google Summer of Code 2024. It includes results, possible improvements, and future plans. It's also the final project report with all contributions listed.

Notifications You must be signed in to change notification settings

aialok/GSoC24-JSON-Schema-Final-Report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

GSOCImage

GSoC'24 - Final Project Report

This report covers the work done in Google Summer of Code 2024. It includes results, possible improvements, and future plans. It's also the final project report with all contributions listed.

Basic Info

Background

My journey into open source began just a year ago, with my first contribution being a simple change to update the Twitter logo to X. That small step marked the beginning of an incredible adventure. What I've come to appreciate most about open source is that it's not just about writing code. It's about how you write code, how you collaborate with others, how you help and learn from your peers, and ultimately, how you contribute to making the world a better place.

Open source has taught me invaluable lessons, from improving my coding skills to collaborating on projects that impact millions, if not billions, of people. Through this community, I've met amazing individuals from around the world, forming friendships and finding mentors who have been instrumental in guiding my journey. At the end, I just want to say once you immerse yourself in the world of open source, there's no turning back. It becomes an addiction—one that you'll grow to love and cherish.

Project: CI/CD Pipeline and Testing for JSON Schema Website

Brandmark-Blue

The JSON Schema project, hosted on GitHub under the organization "json-schema-org", consists of multiple repositories for the specification and supporting resources. While the JSON Schema specification itself is published through the Internet Engineering Task Force (IETF) as a series of "personal drafts", our focus is on improving the development and deployment process for the JSON Schema website.

Project Goals:

  1. Enhance the existing CI/CD pipeline for the JSON Schema website using GitHub Actions to incorporate:

    • Linting
    • Code formatting
    • Broken link checking
    • Unit testing
    • Build processes
    • UI testing
  2. Develop and integrate a foundational set of UI tests into the workflow, with the intention of expanding these tests over time.

  3. Review and optimize existing GitHub workflows to balance CI/CD processes with community operations (Community Ops).

This project aims to improve code quality, ensure consistency, and facilitate secure feature additions to the JSON Schema website. By strengthening the CI/CD pipeline and introducing robust testing practices, we'll create a more reliable and maintainable development process for the JSON Schema community.

Goals Achieved:

CI/CD Pipeline

  • CI/CD Workflows for the JSON Schema Website

    • Setup linting, formatting, broken link checks, unit tests, build processes, UI tests, stale issue and PR detection, and unauthorized file detection.
    • Migrated Cloudflare native deployment to GitHub Actions manual deployment workflow due to limitations with preview deployments from forked repositories.
  • JSON Schema Bot

    • Created the JSON Schema Bot for community operations and integrated its token into workflows.

Testing

  • Unit and UI Testing
    • Configured Cypress for local test environment setup.
    • Added Codecov for code coverage reporting and PR notifications.
    • Implemented GitHub Actions workflow for running Cypress tests.
    • Added component testing for the website.

Community Operations

  • Community Operations and GitHub Workflows
    • Developed workflows for preview deployments from forked repositories and deployment to Cloudflare Pages.
    • Created workflows for fetching contributor and project roadmap data.
    • Implemented workflows for detecting unauthorized file changes.
    • Added workflows for notifying failed actions and reminding office hours.

Miscellaneous

  • Additional Contributions
    • Introduced GitVote for automated voting processes.
    • Added stale issues and PR workflows for the community and landscape repositories.

Contributions

Pull Request Summary

PR Number Title URL Status Tag
Website PRs
870 testing(component-testing) : Add component test Link Merged Feature
869 chore(github-actions): update contributor and project sync workflows Link ✅Merged Chore
842 chore(yarn) : migrated yarn to modern yarn berry Link ✅Merged Enhancement
837 Fix algolia search and removed duplicate dependencies Link ✅Merged Bug Fix
829 Set up Cypress and configure local test environment Link ✅Merged Feature
797 chore(documentation) : updated docs for setting up environment variables Link ✅Merged Chore
789 Chore(github-actions) : add CI/CD workflows guidelines and improve naming conventions Link ✅Merged Chore
785 Feat: Add workflow to get preview from fork repository and deploy to cf pages Link ✅Merged Feature
781 Feat: Added two workflows for fetching contributor and project roadmap data Link ✅Merged Feature
750 chore(link.yml) : using github-app authentication and fixes failing link.yml workflow Link ✅Merged Chore
748 chore(unauthorized-file) : updated unauthorised file detection jobs Link ✅Merged Chore
713 Fixes: failing workflow pull-request-target-yml Link ✅Merged Bug Fix
696 Feat : Added job to detect changes in unauthorized files Link ✅Merged Feature
695 Enhancement : Merge both greet-on-first-pr and merge in pull-request-target-yml Link ✅Merged Enhancement
693 Feature: Added Issue-yml Link ✅Merged Feature
690 Feature : github-actions - Setup stale Issues and PRs workflow Link ✅Merged Feature
Miscellaneous PRs
772 chore(github-actions) : Fixes notify-failed-actions workflow Link ✅Merged Chore
771 chore(github-actions) : Fixes slack-ocwm-reminder.yml with office hour time and timezone. Link ✅Merged Chore
9 Add gitvote for automated voting process Link ✅Merged Feature
738 Feat : added stale issues and PR workflow Link ✅Merged Feature
60 Feat : added stale issue and PR workflow Link ✅Merged Feature

Issues Summary

All the issues related to the GSoC project are listed here

Code Under Review

Code under review can be found here

Problems Faced

  • Cypress Code Coverage Setup: This is one of the interesting challenges I faced during the project. Setting up Cypress was easy, but the code coverage part took a good amount of time. The problem was that Cypress code coverage uses the Babel compiler for JS/TS, while Next.js uses the SWC compiler. When configuring Cypress code coverage with Istanbul (a tool for code coverage reporting), we needed to set up .babelrc files. Because of the .babelrc file, Next.js started using the Babel compiler instead of the SWC compiler, causing most of the Next.js parts to fail because they are compatible with the SWC compiler. After spending more than a day and going through 100+ tabs of blogs, GitHub issues, discussions, and the Cypress Discord, I could not find a good solution. This problem still exists.

    After lots of struggle, I found a little hacky solution. Basically, I found docs on babel documentation that if you use Babel in package.json, then Next.js will not be able to find the Babel config and will use the SWC compiler. And it worked! https://babeljs.io/docs/configuration#packagejson

  • Cloudflare Pages Deployment: The Cloudflare Pages Does not support the preview deployment from the forked repository. So, I have to create a manual deployment workflow for the preview deployment from the forked repository.

Current Status of Project

During the GSoC period, I've successfully improved the JSON Schema website project by setting up a good CI/CD pipeline, implementing Cypress for UI testing, and adding component tests. I've also enhanced community operations and GitHub workflows, integrated GitVote for automated voting processes, and added workflows to manage stale issues and pull requests in both the community and landscape repositories. With all project goals now achieved, we've moved into the maintenance phase. I'll remain available to provide any necessary help or support to ensure these new systems and processes continue to run smoothly, thereby strengthening the JSON Schema website's development workflow, testing procedures, and community engagement for the future.

Future Work

Since the project goals have been achieved, the focus now shifts to maintaining and improving the existing systems. Here are some areas for future work:

  • The project goal is to setup minimal testing for the JSON Schema website. We can expand the test coverage by adding more component and E2E tests.
  • We can add more GitHub workflows for automating community operations and enhancing the development process.

My Learnings

Participating in GSoC has been rewarding both technically and non-technically. Here are the key lessons from my journey:

  • Gained experience working with a large codebase and collaborating with a diverse team of developers.
  • Learned how to set up CI/CD pipelines, write unit tests, and implement components tests.
  • Improved communication skills with the community and learned to manage project requirements.
  • Enhanced time management and task prioritization to meet deadlines.
  • Developed skills in code review, documentation, and contributing to open-source projects.

Note of Thanks

I would like to express my sincere gratitude to my mentor Benjamin Granados for his guidance, support, and encouragement throughout the GSoC program. His expertise, patience, and mentorship have been invaluable to me, and I am grateful for the opportunity to work with him on this project. I would also like to thank the JSON Schema community for their feedback, support, and collaboration during the GSoC program. Lastly, I would like to thank the GSoC program organizers for providing me with this opportunity to learn, grow, and contribute to open source projects. I am grateful for the experience and look forward to continuing my journey in the open source community.

About

Final Report of my Google Summer of Code project @json-schema-org. This report covers the work done in Google Summer of Code 2024. It includes results, possible improvements, and future plans. It's also the final project report with all contributions listed.

Resources

Stars

Watchers

Forks