Skip to content
Snippets Groups Projects

(1st MR) Refactorings to prepare to add a Logger

Merged Omar Qunsul requested to merge extract-rules-matching-into-router-engine into main
All threads resolved!

Preparing for: https://gitlab.com/gitlab-org/cells/http-router/-/issues/18

This was extracted from the (2nd MR) !205 (merged)

Context in this conversation: !205 (comment 2078617851)

What has been done in this MR?

  1. .gitignoreing wrangler.toml because it's generated by GDK, which makes it show up in the git diff. The original file content has been copied to wrangler.toml.example instead.
  2. Moving all the classify logic into classify.ts
  3. Moving the main rules matching into a new class RouterEngine that can encapsulate all the logic of rules matching and applying the matching rule. And keeping the main part of the Router minimal export default.
  4. Adding unique ID to the rules, so that we log which rule has been matched. Maybe we can add a validation that the IDs of the rules are unique in a follow up issue?
  5. Refactor the Documentation. Moved the development into its own page and added Blueprint relevant pages.

Validate changes

On both values GITLAB_RULES_CONFIG=passthrough & GITLAB_RULES_CONFIG=firstcell in your wrangler.toml in env.dev section, the Router should still forward requests to the GitLab instance. By visiting http://gdk.test:3000 you should still see GitLab running.

Edited by Omar Qunsul

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Bojan Marjanovic
  • Omar Qunsul added 1 commit

    added 1 commit

    • 37445d98 - Refactorings to prepare to add a Logger

    Compare with previous version

  • Bojan Marjanovic approved this merge request

    approved this merge request

  • Bojan Marjanovic requested review from @tkuah and removed review request for @bmarjanovic

    requested review from @tkuah and removed review request for @bmarjanovic

  • Lin Jen-Shin mentioned in merge request !218 (merged)

    mentioned in merge request !218 (merged)

  • Thong Kuah
  • Thong Kuah removed review request for @tkuah

    removed review request for @tkuah

  • Omar Qunsul mentioned in merge request !225 (closed)

    mentioned in merge request !225 (closed)

  • Omar Qunsul added 12 commits

    added 12 commits

    Compare with previous version

  • Omar Qunsul added 1 commit

    added 1 commit

    • 32d706ea - Undo .gitignor-ing wrangler.toml

    Compare with previous version

  • Omar Qunsul reset approvals from @bmarjanovic by pushing to the branch

    reset approvals from @bmarjanovic by pushing to the branch

  • Omar Qunsul added 1 commit

    added 1 commit

    • 8888e532 - Undo .gitignor-ing wrangler.toml

    Compare with previous version

  • Omar Qunsul requested review from @bmarjanovic

    requested review from @bmarjanovic

  • Bojan Marjanovic approved this merge request

    approved this merge request

  • Bojan Marjanovic resolved all threads

    resolved all threads

  • mentioned in commit bda080ec

  • Bojan Marjanovic resolved all threads

    resolved all threads

  • Omar Qunsul mentioned in merge request !230 (merged)

    mentioned in merge request !230 (merged)

  • Lin Jen-Shin mentioned in merge request !233 (merged)

    mentioned in merge request !233 (merged)

  • Please register or sign in to reply
    Loading