stratospheric icon indicating copy to clipboard operation
stratospheric copied to clipboard

Collaborator - user not able to login to accepts the invite.

Open andsus opened this issue 2 years ago • 6 comments

What's going wrong and not working?

Steps:

  1. User A invites user B (Actions, click user B on drop down)
  2. User A sees "You successfully shared your todo with the user B . Once the user accepts the invite, you'll see them as a collaborator on your todo."
  3. User B got email notification:
  4. Hi user B

someone shared a Todo from https://app.stratospheric.dev/ with you.

Information about the shared Todo item:

Title: Let's build Description: Let's build the document Priority: LOW

You can accept the collaboration by clicking this link: https://app.stratospheric.dev/todo/1/collaborations/2/confirm?token=f59f6892-d4c2-4374-803a-540e42fae860

  1. When B user accept by click the link, it takes to cognito login.
  2. User B try to login with correct crendential, but always came back as user name password not correct.

How do I trouble shoot the problem? What would be the problem.

Thanks Kind regards, Stratospheric

Expected outcome

User B should be able to authenticated and authorized to accept invitation.

On application.yaml, the external_url is set to: custom: invitation-codes: DUKE, HELLO_WORLD, STRATOSPHERIC # TODO: outsource them -> e.g. env variable or database sharing-queue: stratospheric-todo-sharing external-url: https://app.devops.prime-video.amazon.dev/

public TodoSharingListener( MailSender mailSender, TodoCollaborationService todoCollaborationService, @Value("${custom.auto-confirm-collaborations}") boolean autoConfirmCollaborations, @Value("${custom.confirm-email-from-address}") String confirmEmailFromAddress, @Value("${custom.external-url}") String externalUrl) { this.mailSender = mailSender; this.todoCollaborationService = todoCollaborationService; this.autoConfirmCollaborations = autoConfirmCollaborations; this.confirmEmailFromAddress = confirmEmailFromAddress; this.externalUrl = externalUrl; }

Why TodoSharingListener.listenToSharingMessages() got https://app.stratospheric.dev/ instead of https://app.devops.prime-video.amazon.dev/

No response

andsus avatar Jul 07 '23 21:07 andsus

Apparently, there's an issue with ECS cluster task not updating, after latest image is pushed to ECR. I've run the aws ecs update-service --force to take redeploy. Is there any npm run task associated with update-servce? I ran npm run service:deploy .. but it does not update ecs to redeploy.

andsus avatar Jul 09 '23 07:07 andsus

@andsus So, if I understand this correctly, the issue is the external URL not being updated from https://app.stratospheric.dev/ to https://app.devops.prime-video.amazon.dev/ after a new deployment?

The ServiceApp in the project's cdk folder should usually take care of that. Since we're using CDK for deployments, there should be no need to manually call update-service from the CLI.

Can you provide a link to a GitHub repository with a project that experiences this issue?

BjoernKW avatar Jul 09 '23 15:07 BjoernKW

@BjoernKW Sure, here's the repo https://github.com/andsus/todo-app.git

andsus avatar Jul 09 '23 19:07 andsus

@rieckpil Do you have an idea as to what this issue might be caused by? The code in the linked repository looks correct to me.

BjoernKW avatar Jul 09 '23 20:07 BjoernKW

If the URL is pointing to https://app.stratospheric.dev and you change it inside your application.yml afterwards, you have to re-deploy the whole application.

If your re-deployment fails, I would take a look at that, as from the code perspective it looks fine.

To manually trigger a new service deployment, you need to attach the Docker Image Tage you want to deploy:

npm run service:deploy -- -c dockerImageTag=YOUR_IMAGE_TAG_WITH_UPDATED_APPLICATION_YML

Make sure to previously push a new Docker Image to the ECR and use x64 for the CPU arch.

rieckpil avatar Jul 10 '23 06:07 rieckpil

The steps to deploy application

  • Gradle build
  • docker build todo-app and tag latest
  • docker push to ecr
  • check ecr got latest tag image
  • npm deploy:service. Read the parameters from cdk.json

I am using dockerImageUrl and dockerImageTag https://github.com/andsus/todo-app/blob/main/cdk/cdk.json

I noticed the ecs doesn't redeploy .

Using AWS ecs update-service --force triggered redeployment.

Would passing the parameters running npm run solves the problem?

On Sun, Jul 9, 2023, 11:36 PM Philip Riecks @.***> wrote:

If the URL is pointing to https://app.stratospheric.dev and you change it inside your applicaiton.yml afterwards, you have to re-deploy the whole application.

If your re-deployment fails, I would take a look at that, as from the code perspective it looks fine.

To manually trigger a new service deployment, you need to attach the Docker Image Tage you want to deploy:

npm run service:deploy -- -c dockerImageTag=YOUR_IMAGE_TAG_WITH_UPDATED_APPLICATION_YML

— Reply to this email directly, view it on GitHub https://github.com/stratospheric-dev/stratospheric/issues/213#issuecomment-1628329440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFKBE3ZAWVBUJ4YNE3COBLXPOPGTANCNFSM6AAAAAA2CJJ5WI . You are receiving this because you were mentioned.Message ID: @.***>

andsus avatar Jul 10 '23 17:07 andsus