TEAMMATES / teammates

This is the project website for the TEAMMATES feedback management tool for education
https://teammatesv4.appspot.com/
GNU General Public License v2.0
1.64k stars 3.26k forks source link

[#11878] Account Request Indexing Script #13076

Closed domoberzin closed 2 months ago

domoberzin commented 2 months ago

Part of #11878

Outline of Solution

Steps to run this: 1) Clear current documents for account requests from Solr (SSH into Solr instance, otherwise replace host accordingly)

curl "http://localhost:8983/solr/accountrequests/update?commit=true" -H "Content-Type: application/json" --data-binary '{"delete": {"query":"*:*"}}'

2) Verify documents are removed from Solr (SSH into Solr instance, otherwise replace host accordingly)

curl "http://localhost:8983/solr/accountrequests/select?q=*:*"

Response should look something like this:

{
  "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "q":"*:*"}},
  "response":{"numFound":0,"start":0,"numFoundExact":true,"docs":[]
  }}

3) In client.properties, ensure these fields are field in:

client.api.url=
client.backdoor.key=
client.csrf.key=

client.script.api.url=
client.script.api.name=
client.script.api.password=

Example:

client.api.url=https\://8-0-0-dot-teammates.appspot.com
client.backdoor.key=key
client.csrf.key=key

# For SQL Data Migration Staging Test
client.script.api.url=jdbc\:postgresql\://11.222.333.444\:5432/postgres
client.script.api.name=user
client.script.api.password=pw

4) Run this command using home wifi (please whitelist home wifi in GCP connection before running this)

./gradlew execScript -PuserScript="UpdateAccountRequestIndexing"

5) Re-run command in step 2, verify that new documents have been uploaded

github-actions[bot] commented 2 months ago

Hi @domoberzin, thank you for your interest in contributing to TEAMMATES! However, your PR does not appear to follow our contribution guidelines:

Please address the above before we proceed to review your PR.