Skip to content

Avoid accidental calling of TC BUS API when setup locally #506

@maxceem

Description

@maxceem

It seems someone is sending the kafka events to the dev env from local machine for test projects:

{
    "name": "tc-projects-consumer-dev",
    "hostname": "7f1987bcec5e",
    "pid": 34,
    "level": 20,
    "msg": "Consume topic 'connect.notification.project.plan.updated' with message: '{\"topic\":\"connect.notification.project.plan.updated\",\"originator\":\"project-api\",\"timestamp\":\"2020-03-18T07:08:35.038Z\",\"mime-type\":\"application/json\",\"payload\":{\"projectId\":1,\"projectName\":\"test1\",\"projectUrl\":\"https://local.topcoder-dev.com/projects/1\",\"userId\":40051331,\"initiatorUserId\":40051331,\"allowedUsers\":null}}'.",
    "time": "2020-03-18T07:08:35.687Z",
    "v": 0
}

12:38:35
{"name":"tc-projects-consumer-dev","hostname":"7f1987bcec5e","pid":34,"level":50,"msg":"Message processing failed: Error: Project with id 1 not found","time":"2020-03-18T07:08:35.699Z","v":0}
{
    "name": "tc-projects-consumer-dev",
    "hostname": "7f1987bcec5e",
    "pid": 34,
    "level": 50,
    "msg": "Message processing failed: Error: Project with id 1 not found",
    "time": "2020-03-18T07:08:35.699Z",
    "v": 0
}

Notes:

  • in our local setup the default value for busApiUrl: "http://localhost:8002/v5",
  • probably we can prohibit calling BUS API in the M2M credentials, that we are sharing with the community. Or no, maybe it’s not a good idea if there are any cases we want to setup Projec Service locally and still point to TC BUS API on DEV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions