Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 225
    • Issues 225
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 41
    • Merge Requests 41
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • List
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !337

Our Privacy Policy has changed, please visit https://about.gitlab.com/privacy to review these changes.

Open
Opened 4 days ago by Ben Hayward@benhayward.ben
  • Report abuse
Report abuse

[Sprint/NuancedNumbat](feat): Enable feature flags when staging cookie set. #857

Summary

This allows for an override of the feature service by the setting of a cookie, containing a base64 encoded JSON object (see below for examples).

To test

  1. Add a new cookie to your session on the sandbox, staging-cookie.

  2. Set the value to a base64 encoded JSON object (I used https://www.base64encode.net/) containing a feature flag that you can test. At the time of writing cdn-jwt and cassandra-notifications are the only feature flags I see in there.

Example objects:

  • {"cdn-jwt":true} => eyJjZG4tand0Ijp0cnVlfQ==
  • {"cdn-jwt":false} => eyJjZG4tand0IjpmYWxzZX0=
  • {"cassandra-notifications":true} => eyJjYXNzYW5kcmEtbm90aWZpY2F0aW9ucyI6dHJ1ZX0=
  • {"cassandra-notifications":false} => eyJjYXNzYW5kcmEtbm90aWZpY2F0aW9ucyI6ZmFsc2V9
  1. Refresh and test whether the cookie worked.

note make sure to check the flag is still used! suggest a search of the codebase for ->has( if you're not sure.

Edited 18 hours ago by Ben Hayward

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b "fix/e2e-tests-staging" "origin/fix/e2e-tests-staging"

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "fix/e2e-tests-staging"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge fix/e2e-tests-staging into master
The source branch is 11 commits behind the target branch
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #85096811 passed for 5766ec2a on fix/e2e-tests-staging
          Requires 2 more approvals from Devs and Deployers.
          Marcelo Rivera
          Marcelo Rivera
          Rami Albatal
          Rami Albatal
          Mark Harding
          Mark Harding
          Brian Hatchet
          Brian Hatchet
          Emiliano Balbuena
          Emiliano Balbuena
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Mentions #857 (closed)

          Deletes source branch

          • Discussion 3
          • Commits 8
          • Pipelines 8
          • Changes 2
          2/2 threads resolved
          • Loading...
          • Ben Hayward @benhayward.ben added 1 commit 4 days ago

            added 1 commit

            • 645d13b1 - Allow specific flags, and false values

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 4 days ago

            added 1 commit

            • 62f24559 - Fixing tests

            Compare with previous version

          • Ben Hayward
            Ben Hayward @benhayward.ben started a thread on an old version of the diff 4 days ago
            Resolved by Ben Hayward 19 hours ago
          • Ben Hayward
            Ben Hayward @benhayward.ben started a thread on the diff 4 days ago
            Resolved by Ben Hayward 19 hours ago
          • Ben Hayward @benhayward.ben added 4 commits 19 hours ago

            added 4 commits

            • 62f24559...0070c0aa - 3 commits from branch master
            • c2668954 - Merge branch 'master' of gitlab.com:minds/engine into fix/e2e-tests-staging

            Compare with previous version

          • Ben Hayward @benhayward.ben resolved all threads 19 hours ago

            resolved all threads

          • Ben Hayward @benhayward.ben added 1 commit 19 hours ago

            added 1 commit

            • e75adff3 - Updated and fixed

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 19 hours ago

            added 1 commit

            • 941d5e29 - Quickfix

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 19 hours ago

            added 1 commit

            • ab3b1030 - Wrong commit

            Compare with previous version

          • Ben Hayward @benhayward.ben added 1 commit 18 hours ago

            added 1 commit

            • 5766ec2a - defaulting features to []

            Compare with previous version

          • Ben Hayward @benhayward.ben added MR::Awaiting Review Squad::Yellow scoped labels 18 hours ago

            added MR::Awaiting Review Squad::Yellow scoped labels

          • Ben Hayward
            Ben Hayward @benhayward.ben · 18 hours ago
            Developer

            Example test base64

            {dark-mode:false} should be eyJkYXJrLW1vZGUiOmZhbHNlfQ==

          • Ben Hayward @benhayward.ben changed the description 18 hours ago

            changed the description

          • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
          Please register or sign in to reply
          0 Assignees
          None
          Assign to
          None
          Milestone
          None
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Awaiting Review Squad::Yellow
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          7
          7 participants
          user avatar
          Marcelo Rivera
          user avatar
          Rami Albatal
          user avatar
          Mark Harding
          user avatar
          Brian Hatchet
          user avatar
          Emiliano Balbuena
          user avatar
          Martin Santangelo
          user avatar
          Ben Hayward
          Reference: minds/engine!337