Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts setup in the thread-focused SOAP notes didn't get saved in OS #17

Open
kapil1garg opened this issue Feb 23, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@kapil1garg
Copy link
Contributor

Looks like the opportunity was not sent properly from SOAP to /createActiveIssue

[orchestration-engine] [2024-02-21 23:34:56] Strategy: {
[orchestration-engine] [2024-02-21 23:34:56]     "name": "actionable follow-up for Orchestration Scripting Environments in morning of studio",
[orchestration-engine] [2024-02-21 23:34:56]     "description": "how are you doing on the case library for non-detectable scripts?"
[orchestration-engine] [2024-02-21 23:34:56] }
[orchestration-engine] [2024-02-21 23:34:56] Error when creating ActiveIssue via API route: Error: No strategies were computed
[orchestration-engine] [2024-02-21 23:34:56]     at file:///workspace/routes/activeIssues.routes.js:76:13
[orchestration-engine] [2024-02-21 23:34:56]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[orchestration-engine] [2024-02-21 23:34:56] Error in computing opportunity: 
[orchestration-engine] [2024-02-21 23:34:56] Org Object: {
[orchestration-engine] [2024-02-21 23:34:56]     "project": {
[orchestration-engine] [2024-02-21 23:34:56]         "targetType": "project",
[orchestration-engine] [2024-02-21 23:34:56]         "name": "Orchestration Scripting Environments"
[orchestration-engine] [2024-02-21 23:34:56]     },
[orchestration-engine] [2024-02-21 23:34:56]     "processes": [
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "process",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Sprint 3",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "Sprint",
[orchestration-engine] [2024-02-21 23:34:56]             "startDay": "2024-02-05T06:00:00.000Z",
[orchestration-engine] [2024-02-21 23:34:56]             "endDay": "2024-02-19T05:59:59.000Z"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "process",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Sprint 0",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "Sprint",
[orchestration-engine] [2024-02-21 23:34:56]             "startDay": "2024-01-01T06:00:00.000Z",
[orchestration-engine] [2024-02-21 23:34:56]             "endDay": "2024-01-08T05:59:59.000Z"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "process",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Sprint 2",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "Sprint",
[orchestration-engine] [2024-02-21 23:34:56]             "startDay": "2024-01-22T06:00:00.000Z",
[orchestration-engine] [2024-02-21 23:34:56]             "endDay": "2024-02-05T05:59:59.000Z"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "process",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Sprint 1",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "Sprint",
[orchestration-engine] [2024-02-21 23:34:56]             "startDay": "2024-01-08T06:00:00.000Z",
[orchestration-engine] [2024-02-21 23:34:56]             "endDay": "2024-01-22T05:59:59.000Z"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "process",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Sprint 4",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "Sprint",
[orchestration-engine] [2024-02-21 23:34:56]             "startDay": "2024-02-19T06:00:00.000Z",
[orchestration-engine] [2024-02-21 23:34:56]             "endDay": "2024-03-04T05:59:59.000Z"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "process",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Sprint 5",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "Sprint",
[orchestration-engine] [2024-02-21 23:34:56]             "startDay": "2024-03-04T06:00:00.000Z",
[orchestration-engine] [2024-02-21 23:34:56]             "endDay": "2024-03-11T04:59:59.000Z"
[orchestration-engine] [2024-02-21 23:34:56]         }
[orchestration-engine] [2024-02-21 23:34:56]     ],
[orchestration-engine] [2024-02-21 23:34:56]     "socialStructures": [
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "social structure",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Networked Orchestration Technologies",
[orchestration-engine] [2024-02-21 23:34:56]             "description": "The Networked Orchestration Technologies (NOT) SIG develops novel interactions and technologies that will help learners and workers develop effective strategies for orchestrating work in networked communities and organizations.",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "SigStructure",
[orchestration-engine] [2024-02-21 23:34:56]             "members": [
[orchestration-engine] [2024-02-21 23:34:56]                 {
[orchestration-engine] [2024-02-21 23:34:56]                     "name": "Grace Wang",
[orchestration-engine] [2024-02-21 23:34:56]                     "role": "NonPhdStudent",
[orchestration-engine] [2024-02-21 23:34:56]                     "email": "[email protected]",
[orchestration-engine] [2024-02-21 23:34:56]                     "slackId": "U04CQNKQ3TP"
[orchestration-engine] [2024-02-21 23:34:56]                 },
[orchestration-engine] [2024-02-21 23:34:56]                 {
[orchestration-engine] [2024-02-21 23:34:56]                     "name": "Linh Ly",
[orchestration-engine] [2024-02-21 23:34:56]                     "role": "NonPhdStudent",
[orchestration-engine] [2024-02-21 23:34:56]                     "email": "[email protected]",
[orchestration-engine] [2024-02-21 23:34:56]                     "slackId": "U05BEN0MH9N"
[orchestration-engine] [2024-02-21 23:34:56]                 }
[orchestration-engine] [2024-02-21 23:34:56]             ],
[orchestration-engine] [2024-02-21 23:34:56]             "abbreviation": "NOT",
[orchestration-engine] [2024-02-21 23:34:56]             "slackChannel": "sig-not",
[orchestration-engine] [2024-02-21 23:34:56]             "sigHead": {
[orchestration-engine] [2024-02-21 23:34:56]                 "name": "Kapil Garg",
[orchestration-engine] [2024-02-21 23:34:56]                 "role": "PhdStudent",
[orchestration-engine] [2024-02-21 23:34:56]                 "email": "[email protected]",
[orchestration-engine] [2024-02-21 23:34:56]                 "slackId": "U0G17CVCZ"
[orchestration-engine] [2024-02-21 23:34:56]             }
[orchestration-engine] [2024-02-21 23:34:56]         }
[orchestration-engine] [2024-02-21 23:34:56]     ],
[orchestration-engine] [2024-02-21 23:34:56]     "venues": [
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "venue",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Networked Orchestration Technologies SIG Meeting",
[orchestration-engine] [2024-02-21 23:34:56]             "description": "Weekly SIG meeting for NOT SIG",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "SigMeeting",
[orchestration-engine] [2024-02-21 23:34:56]             "dayOfWeek": "Monday",
[orchestration-engine] [2024-02-21 23:34:56]             "startTime": "17:00:00",
[orchestration-engine] [2024-02-21 23:34:56]             "endTime": "18:00:00",
[orchestration-engine] [2024-02-21 23:34:56]             "timezone": "America/Chicago"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "venue",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Networked Orchestration Technologies Office Hours",
[orchestration-engine] [2024-02-21 23:34:56]             "description": "Weekly office hours for NOT SIG",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "OfficeHours",
[orchestration-engine] [2024-02-21 23:34:56]             "dayOfWeek": "Wednesday",
[orchestration-engine] [2024-02-21 23:34:56]             "startTime": "11:00:00",
[orchestration-engine] [2024-02-21 23:34:56]             "endTime": "12:00:00",
[orchestration-engine] [2024-02-21 23:34:56]             "timezone": "America/Chicago"
[orchestration-engine] [2024-02-21 23:34:56]         },
[orchestration-engine] [2024-02-21 23:34:56]         {
[orchestration-engine] [2024-02-21 23:34:56]             "targetType": "venue",
[orchestration-engine] [2024-02-21 23:34:56]             "name": "Studio Meeting",
[orchestration-engine] [2024-02-21 23:34:56]             "description": "Weekly studio meeting with all members of the community.",
[orchestration-engine] [2024-02-21 23:34:56]             "kind": "StudioMeeting",
[orchestration-engine] [2024-02-21 23:34:56]             "dayOfWeek": "Friday",
[orchestration-engine] [2024-02-21 23:34:56]             "startTime": "12:00:00",
[orchestration-engine] [2024-02-21 23:34:56]             "endTime": "15:00:00",
[orchestration-engine] [2024-02-21 23:34:56]             "timezone": "America/Chicago"
[orchestration-engine] [2024-02-21 23:34:56]         }
[orchestration-engine] [2024-02-21 23:34:56]     ]
[orchestration-engine] [2024-02-21 23:34:56] }
@kapil1garg kapil1garg added the bug Something isn't working label Feb 23, 2024
@kapil1garg
Copy link
Contributor Author

the hell? why is there an "a" in await this.morningOfVenue(await this.venues.find(this.where("kind",a)))}) after the "kind"???

[interactive-soap-notes] [2024-02-23 22:39:37]   strategyToEnact: {
[interactive-soap-notes] [2024-02-23 22:39:37]     name: 'actionable follow-up for Orchestration Scripting Environments in morning of studio',
[interactive-soap-notes] [2024-02-23 22:39:37]     description: 'have you thought about the interface / system for showing non-detectable scripts? too early to think about that? (might want to consider how we can have a rough prototype of it by the end of the quarter, though)',
[interactive-soap-notes] [2024-02-23 22:39:37]     strategy_function: 'async function(){return await this.messageChannel({message:"have you thought about the interface / system for showing non-detectable scripts? too early to think about that? (might want to consider how we can have a rough prototype of it by the end of the quarter, though)",projectName:this.project.name,opportunity:(async function(){return await this.morningOfVenue(await this.venues.find(this.where("kind",a)))}).toString()})}'
[interactive-soap-notes] [2024-02-23 22:39:37]   }

@kapil1garg
Copy link
Contributor Author

More console logs from production:

[interactive-soap-notes] [2024-02-23 23:08:42] In parseFollowUpPlans, inputs are:  65d63b8580a13f21c408fa71 Orchestration Scripting Environments at studio test on prod at studio 1
[interactive-soap-notes] [2024-02-23 23:08:42] In parseFollowUpPlans, venueOrgObj:  StudioMeeting
[interactive-soap-notes] [2024-02-23 23:08:42] In parseFollowUpPlans, strategyFunction before replacement:  async function(){return await this.messageChannel({message:strategyFromScript,projectName:this.project.name,opportunity:(async function(){return await this.startOfVenue(await this.venues.find(this.where("kind",a)))}).toString()})}
[interactive-soap-notes] [2024-02-23 23:08:42] In parseFollowUpPlans, newActiveIssue:  {
[interactive-soap-notes] [2024-02-23 23:08:42]   scriptId: 'd85f242c5a0d734c62b51a0e',
[interactive-soap-notes] [2024-02-23 23:08:42]   scriptName: 'actionable follow-up for Orchestration Scripting Environments in at studio',
[interactive-soap-notes] [2024-02-23 23:08:42]   dateTriggered: 2024-03-01T23:08:42.240Z,
[interactive-soap-notes] [2024-02-23 23:08:42]   expiryTime: 1709334522240,
[interactive-soap-notes] [2024-02-23 23:08:42]   shouldRepeat: false,
[interactive-soap-notes] [2024-02-23 23:08:42]   issueTarget: {
[interactive-soap-notes] [2024-02-23 23:08:42]     targetType: 'project',
[interactive-soap-notes] [2024-02-23 23:08:42]     name: 'Orchestration Scripting Environments'
[interactive-soap-notes] [2024-02-23 23:08:42]   },
[interactive-soap-notes] [2024-02-23 23:08:42]   strategyToEnact: {
[interactive-soap-notes] [2024-02-23 23:08:42]     name: 'actionable follow-up for Orchestration Scripting Environments in at studio',
[interactive-soap-notes] [2024-02-23 23:08:42]     description: 'test on prod at studio 1',
[interactive-soap-notes] [2024-02-23 23:08:42]     strategy_function: 'async function(){return await this.messageChannel({message:"test on prod at studio 1",projectName:this.project.name,opportunity:(async function(){return await this.startOfVenue(await this.venues.find(this.where("kind",a)))}).toString()})}'
[interactive-soap-notes] [2024-02-23 23:08:42]   }
[interactive-soap-notes] [2024-02-23 23:08:42] }

Looks like the lines of code that are bad are in pages/api/soap[id].ts in parseFollowUpPlans:

  • await this.venues.find(this.where('kind', venueOrgObj)) initialized without a value (or should be no value) but is an "a"

Can't replicate this in a dev env. Could try running a production server locally and seeing if I can reproduce the issue.

@kapil1garg
Copy link
Contributor Author

could try to use ${} instead of replacement

@kapil1garg
Copy link
Contributor Author

ok cool, the bug is replicable locally by creating a production build:

yarn build
yarn start

console.log should still print

kapil1garg added a commit that referenced this issue Feb 27, 2024
@kapil1garg
Copy link
Contributor Author

f91050c is a hacky fix for now. still don't know what's causing the bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant