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

Issues upgrading to 1.3.0rc0 #1394

Closed
hayescode opened this issue Oct 2, 2024 · 7 comments
Closed

Issues upgrading to 1.3.0rc0 #1394

hayescode opened this issue Oct 2, 2024 · 7 comments
Labels
backend Pertains to the Python backend. bug Something isn't working frontend Pertains to the frontend. needs-triage

Comments

@hayescode
Copy link
Contributor

Describe the bug
When upgrading from 1.1.404 to 1.3.0rc0 I have found the below issues - diff here - All of these worked properly in 1.1.404

  • Step avatars disappeared
    • image
  • threads.userId changed breaking SQLAlchemyDataLayer NOTE: This only happens when steps are involved.
    • This issue is caused by a new method that was added where userId isn't encapsulated with double-quotes so the SQL engine converts userId --> userid which doesn't exist.
2024-10-02 12:12:23 - An error occurred: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: column "userid" does not exist
HINT:  Perhaps you meant to reference the column "threads.userId".
[SQL: SELECT userId FROM threads WHERE id = $1]
[parameters: ('c15cf3b5-a38a-42cd-9e4e-82a8e69db495',)]

I can make a PR for the SQL Alchemy issue. @dokterbob @willydouhard can you advise on the step avatar issue?

Copy link

dosubot bot commented Oct 2, 2024

Hey @hayescode, I'm here to help you with the issues you're experiencing while upgrading to 1.3.0rc0. I can assist you in solving bugs, answering questions, and becoming a contributor. Let's work together to get this resolved!

For the step avatars issue in version 1.3.0rc0, the disappearance of avatars is likely due to changes in how avatars are handled. The cl.Avatar element was removed, and now avatars should be placed in the /public/avatars directory. For example, if the message author is My Assistant, the avatar should be placed in /public/avatars/my-assistant.png. If no avatar is found, it defaults to the favicon [1].

Regarding the userId issue in the SQLAlchemyDataLayer, it seems that the new method does not encapsulate userId with double-quotes, causing the SQL engine to convert userId to userid, which results in an error. This might require a code change to ensure userId is properly quoted in SQL queries. You mentioned you could make a PR for this issue, which would be a good approach to address it.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added backend Pertains to the Python backend. bug Something isn't working frontend Pertains to the frontend. labels Oct 2, 2024
@hayescode
Copy link
Contributor Author

@dosu For the step avatars, I have all of my avatars in /public/avatars/ already. My code with the working avatars is after the cl.Avatar removal so the 1.3.0rc0 release broken this functionality. For example I have a step with the name as "Code Interpreter" and I have the icon I want to use in /public/avatars/code_interpreter.png which was working but now it isn't.

Copy link

dosubot bot commented Oct 2, 2024

Ensure that the file name in the /public/avatars/ directory matches the message author's name exactly, using underscores instead of spaces. For example, if the message author is "Code Interpreter", the avatar should be named code_interpreter.png. If this is already the case and the issue persists, it might be worth checking if there are any additional configuration settings or caching issues that could be affecting the avatar loading.

To continue talking to Dosu, mention @dosu.

@hayescode
Copy link
Contributor Author

@dokterbob @willydouhard The only Avatar related thing I could find in the diff was #1325 . I don't see an explanation for why this change was made in the PR and I'm not strong in Typescript/React so I'd like your feedback before I make a PR reverting the changes to frontend/src/components/molecules/messages/Message.tsx

@AidanShipperley
Copy link
Contributor

Hey @hayescode, the issue with avatars disappearing already has an issue opened for it - all avatar names that contain spaces or punctuation are blocked by a regular expression added to the backend. See my comment on the ticket here. You can fix it by overwriting the regex in server.py with what I put in my comment.

@dokterbob
Copy link
Collaborator

dokterbob commented Oct 3, 2024

Yes, this seems a dup of #1370 which we're aware of. Thanks for the PR for the "threads.userId changed breaking SQLAlchemyDataLayer" issue, we'll review it shortly.

dokterbob pushed a commit that referenced this issue Oct 8, 2024
@hayescode
Copy link
Contributor Author

Hey @hayescode, the issue with avatars disappearing already has an issue opened for it - all avatar names that contain spaces or punctuation are blocked by a regular expression added to the backend. See my comment on the ticket here. You can fix it by overwriting the regex in server.py with what I put in my comment.

@AidanShipperley would you mind posting the full monkey-patch here for me and others to use while they figure out how to fix this?

dokterbob pushed a commit that referenced this issue Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Pertains to the Python backend. bug Something isn't working frontend Pertains to the frontend. needs-triage
Projects
None yet
Development

No branches or pull requests

3 participants