Skip to content

Tag a users first post minds#3914

Ben requested to merge feat/first-post-tag-3914 into master

Ticket(s) / Related Merge Requests

minds#3914 (closed)

Summary of Changes

Tags the first post of a user with #hellominds in ElasticSearch.

Testing Considerations

  1. Bridge ES to your local:
kubectl port-forward -n opensearch opensearch-cluster-master-0 9200:9200
  1. Check the latest indexed entities in minds-search-activity (sort by timestamp) - Elasticvue is great for this - note you WILL need the username and password for sandbox ES - If you need these, DM me. Query to get the latest indexed activities can be found below:
{
   "query":{
      "query_string":{
         "query":"*"
      }
   },
   "size":10,
   "from":0,
   "sort":[
      {
         "@timestamp":{
            "order":"desc"
         }
      }
   ]
}
  1. Post from an existing user, run the above search query again, check you see your post, and check it has no tags (unless you set any).
  2. Make a new user and verify the email address - at the time of writing there are some timeouts when requesting emails for auth codes unrelated to this change - you may need to make a couple of accounts till you get the non-code experiment variant of email authentication, which will send you an email, OR manually confirm your user in Cassandra to get around this.
  3. Post from your new user (make the text something recognizable such as Hello Minds this is my first post), check ES by running the above query again and see that your post is there - see that it has the tag "hellominds".
  4. Make a second post with text something like second post no tags - verify in ES that the new second post has no tags.
  5. See your first post appears at https://feat-first-post-tag-3914.oke.minds.io/discovery/search?q=hellominds&f=latest&t=all

Note: the tag is NOT applied on the Cassandra entity as agreed.

Deployment Considerations

Standard deployment, going to runners. May be good to reset the runner image for the search indexer as It's been changed to test this MR. You are welcome to ping me and I'll do this.

Regression Scope

Search indexer.

Platform Affected (web, mobile, etc)

Web

Developer Testing Completed

Manual, unit (phpspec)

Screenshots / Screen Recording

simplescreenrecorder-2023-04-11_17.50.03

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports