Skip to content

Conversation

techsmyth
Copy link
Member

Describe the background of your pull request

What does your pull request do? Does it solve a bug (which one?), add a feature?

Additional context

Add any other context

Governance

  • Documentation is added
  • Test cases are added or updated

By submitting this pull request I confirm that:

@larssondenise larssondenise marked this pull request as ready for review August 4, 2023 12:59
@larssondenise
Copy link
Contributor

@techsmyth to check! can't make you reviewer as you created the PR

Copy link
Member

@valentinyanakiev valentinyanakiev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are indeed very nice but will be felt by like 1% of the cases unless we have a data migration, check whether this data exists, and if not - add it.

@techsmyth
Copy link
Member Author

@valentinyanakiev afraid not our rights to add them into existing spaces etc. but we can add callout templates to the library to make them more accessible & maybe do some handholding with key spaces…

@techsmyth
Copy link
Member Author

@valentinyanakiev please bring this one down to develop if it is working ok. The story about getting existing spaces / challenges updated should be raised as a separate story - and it is a non-trivial one as we cannot just go and modify existing spaces / challenges with new data.

Copy link
Member

@valentinyanakiev valentinyanakiev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These templates fail the most basic test - creating a Space:

{
  "errors": [
    {
      "message": "Please provide a whiteboard",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "createSpace"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "Error: Please provide a whiteboard",
            "    at CalloutService.createCallout (/home/valentin/work/repos/alkemio/server/src/domain/collaboration/callout/callout.service.ts:90:13)",
            "    at CollaborationService.addDefaultCallouts (/home/valentin/work/repos/alkemio/server/src/domain/collaboration/collaboration/collaboration.service.ts:102:49)",
            "    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
            "    at SpaceService.createSpace (/home/valentin/work/repos/alkemio/server/src/domain/challenge/space/space.service.ts:141:27)",
            "    at SpaceResolverMutations.createSpace (/home/valentin/work/repos/alkemio/server/src/domain/challenge/space/space.resolver.mutations.ts:70:19)"
          ]
        }
      }
    }
  ],
  "data": null
}

@larssondenise I'd expect this to be tested locally before this is moved to review:

  • creating a new space
  • creating a new challenge inside a new / old space
  • creating a new opportunity inside a new / old challenge

@techsmyth techsmyth changed the title callouts Extended default callouts for new journeys Aug 10, 2023
@techsmyth
Copy link
Member Author

@valentinyanakiev they should now be creating ok.

@valentinyanakiev
Copy link
Member

valentinyanakiev commented Aug 10, 2023

@valentinyanakiev they should now be creating ok.

@techsmyth A super quick test and it fails on the first attempt:

{
  "errors": [
    {
      "message": "CreatedBy not set on Whiteboard with id 057d3b0f-12a3-4c8c-a19c-1f64d9de2a0a",
      "locations": [
        {
          "line": 194,
          "column": 3
        }
      ],
      "path": [
        "space",
        "challenge",
        "collaboration",
        "callouts",
        1,
        "whiteboards",
        0,
        "createdBy"
      ],
      "extensions": {
        "code": "ENTITY_NOT_INITIALIZED",
        "exception": {
          "message": "CreatedBy not set on Whiteboard with id 057d3b0f-12a3-4c8c-a19c-1f64d9de2a0a",
          "error": "CreatedBy not set on Whiteboard with id 057d3b0f-12a3-4c8c-a19c-1f64d9de2a0a",
          "context": "collaboration",
          "code": "ENTITY_NOT_INITIALIZED",
          "stacktrace": [
            "GraphQLError: CreatedBy not set on Whiteboard with id 057d3b0f-12a3-4c8c-a19c-1f64d9de2a0a",
            "    at new BaseException (/home/valentin/work/repos/alkemio/server/src/common/exceptions/base.exception.ts:10:5)",
            "    at new EntityNotInitializedException (/home/valentin/work/repos/alkemio/server/src/common/exceptions/entity.not.initialized.exception.ts:6:5)",
            "    at WhiteboardResolverFields.createdBy (/home/valentin/work/repos/alkemio/server/src/domain/common/whiteboard/whiteboard.resolver.fields.ts:42:13)",
            "    at /home/valentin/work/repos/alkemio/server/node_modules/@nestjs/core/helpers/external-context-creator.js:70:33",
            "    at runMicrotasks (<anonymous>)",
            "    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
            "    at Object.target [as createdBy] (/home/valentin/work/repos/alkemio/server/node_modules/@nestjs/core/helpers/external-context-creator.js:77:28)"
          ]
        }
      }
    }
  ],

Maybe I should have mentioned - please, after creating the Journeys, try to open them. It fails on every level.

@techsmyth techsmyth requested a review from alstojanovic August 10, 2023 16:12
@techsmyth
Copy link
Member Author

@valentinyanakiev ok I thought I had done that but clearly missed something. @alstojanovic as Valentin is away tomorrow can you please take a look at the latest fix?

@alstojanovic
Copy link
Contributor

Sure, will take a look.

Copy link
Contributor

@alstojanovic alstojanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested crating space, challenge and opportunity. Default callouts are in place in regards to new changes.

@techsmyth techsmyth merged commit eff0802 into develop Aug 11, 2023
@techsmyth techsmyth deleted the update-callouts branch August 11, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants