dwellons / DonationLog

An application that allows users to log and track donors and donation types, amounts, dates and other information.
1 stars 0 forks source link

Checkpoint 3 #9

Closed dwellons closed 1 month ago

dwellons commented 2 months ago

@pawaitemadisoncollege I am not going to have checkpoint 3 ready, but am creating this with problems I'm facing relating to the issues I have open, to communicate where I am and everything.

I'm not sure about how to implement Cognito into my own project yet. I was thinking about that though, is there somewhere other than in the .config file where I should be uploading the certificate and key files? I decided to move on from that and work on my unit tests, other things you've recommended.

I found that when I delete a donation the user remains but when I delete a user the donations get deleted as well. I don't have any constraints that make this happen on delete, I'm thinking it is happening because of the relationship that I have created between them in the screenshot I sent with my database.

I created a donors table and tried to create a foreign key constraint but I can't, it just gives me error #1215. from searching online I have made sure that my data types are the same and there are no on delete constraints that would stop it, I'm not really sure what I've got going on right now haha.

That makes me wonder though, I have user id's set for my first donations that I logged but if I log a new one now it logs the user id as null. I'm not sure if I can remember how I was even storing user id's in the first place with donations, I wasn't signing in any way until we started using Cognito, which I haven't been able to sign in at all with in my project, so I'm extra confused right now

In the process of trying to diagnose my Cognito today, I found that I'm not sure if my logs are working properly anymore if at all. I don't see anything in my server logs, the hibernate one works though. When i go into the AWS logs in my elastic beanstalk instance, it doesn't have any of the written logs from my application it just has the same information it prints out on the webpage.

This checkpoint is due today but I'm not going to be able to get the Cognito part of it done tonight, I'm not sure where to look next.

I'm probably going to create a new database, I got another email about action required "Deprecation of Amazon RDS M4, R4, and T2 database instance types on MySQL, MariaDB, and PostgreSQL". I just switched the database version a couple weeks ago and my charges got a lot lower but now I'll have to figure this out, with having to create a new tables and relationships it might just be easier to start from scratch.

dwellons commented 2 months ago

I looked at AWS cognito secure sign in one more time and after going back to where I was in week 7, starting over again again, now when I try to sign into the deployed version on AWS it still doesn't work, but if I remove the s from https then it does. I feel like I'm closer than I was before with that. I did that in a separate branch though so I could have something that works while I figure that out. Sometime though, the test for my weather api stopped working all together, and that is weird

pawaitemadisoncollege commented 2 months ago

Hi @dwellons! Hope you had a good weekend and time with the kids!

I realize I'm looking at this after you may have made a number of changes, so I'll comment where I can and hope you can give an update if things have changed.

  1. With regard to the auth - great job narrowing that down. If removing the "s" from https gets it working then it sounds like you have cognito set up properly, and maybe the https portion isn't quite right. The way I would test this is to see if a basic page on your site works with https. I just tried accessing your site on aws using https and it chugged for a long time and then errored - server not responding. This seems to point to an issue with the https set up. To start troubleshooting it - I would start by making sure the files that you add for https here, http://paulawaite.com/education/java113/Module2/Week7/AuthOnBeanstalk.html#3-create-the-following-directory-structure-under-the-existing-srcmain-directory, are making it into the war file that you are deploying. The logs on beanstalks after deploying would also be something to look at, specifically looking for any messages related to ssl.

  2. Even with the deprecated db, my understanding was that those version should still work until June 1, so I don't think the version would cause any issue between now and the end of the semester. If you choose to keep thing running after mid-May, then it would be time to look at another instance type.

  3. Is anything new with the issues you mentioned related to log4j and the table/foreign keys, or do those issues still exist? One thing I wonder is if the unit tests related to the entities/tables are all working as expected? Is the problem you identified with the null user happening in the test or when using the jsps or both?

pawaitemadisoncollege commented 2 months ago

One thing, which may or may not be related to the issue you mentioned above. Here, https://github.com/dwellons/DonationLog/blob/cceaf31f53d7d43bfc29117d7474f59393b77437/src/main/java/donationLog/entity/Donation.java#L49, I don't think the constructor should take a donation id - isn't that auto-incremented/handled by the database? And should the constructor take a user so that a user is associated with the donation entry?

dwellons commented 1 month ago

@pawaitemadisoncollege I am closing this issue as I'm pretty sure these have all been addressed or put on hold