-
Notifications
You must be signed in to change notification settings - Fork 66
Web: Fix CAN options visibility for non-CAN boards #209
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
base: main
Are you sure you want to change the base?
Conversation
| f"Redis connection established with {redis_host}:{redis_port}" | ||
| ) | ||
| self.__boards_key_prefix = "boards-" | ||
| # bump version to invalidate stale board metadata in cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this change. We can handle the upgrade by manually clearing the cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the change
|
|
||
| def __get_boards_at_commit_from_repo(self, remote: str, | ||
| commit_ref: str) -> tuple[list, list]: | ||
| commit_ref: str) -> tuple[list[dict], list[dict]]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be documented in the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the comment
| try: | ||
| non_periph_boards, periph_boards = boards | ||
| needs_upgrade = False | ||
| if non_periph_boards and isinstance(non_periph_boards[0], str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this as well. No need to worry about the upgrade due to cached stuff. We can clear it manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
| vehicle_id=vehicle, | ||
| ) | ||
| if board not in boards_at_commit: | ||
| board_names_at_commit = [b["name"] for b in boards_at_commit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better define a class for board with id, name and attributes, in the attributed put the has_can thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defined a BoardMetadata class for above listed
|
Hey @shiv-tyagi thanks for reviewing, I have addressed all the requested changes could you re-review it. |
This PR fixes Issue #151 where the "CAN" feature category remained visible even when selecting a board that does not support CAN.
The Fix:
fillBuildOptionsin JS to re-render the category list whenever the board selection changes.has_can: false.includedirectives inhwdef.dat.Test Plan:
Closes #151