-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature:RainbowGrades] Display RainbowGrades version #56
Conversation
#closes Submitty/Submitty/issues/9492 |
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.
It may be causing error when ran on web-base-customization page
fatal: detected dubious ownership in repository at '/usr/local/submitty/GIT_CHECKOUT/RainbowGrades'
To add an exception for this directory, call:
git config --global --add safe.directory /usr/local/submitty/GIT_CHECKOUT/RainbowGrades
Will fix it
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.
In addition to safe directory, we need to give submitty_daemon_php group read permission in /etc/gitconfig file.
Resolved merge conflict |
Related to Submitty/RainbowGrades#56 ### What is the current behavior? ![Screen Shot 2023-07-31 at 12 10 48 PM](https://github.com/Submitty/Submitty/assets/123261952/3a0f5664-0e74-4c19-9336-db4b6d6482e5) Currently, Git has security feature called safe directory. Checking version on web-based customization page is ran by submitty_daemon, which has permission problem. (Running it locally, the user is most likely a root user, won't encounter this issue) ### What is the new behavior? ![Screen Shot 2023-08-14 at 11 40 40 AM](https://github.com/Submitty/Submitty/assets/123261952/74ca0bf3-9ec0-403e-9c5e-0734579d73b6) During install_system process, the script will now create .gitconfig file in /home/submitty_daemon with owner/group being submitty_daemon. In .gitconfig file contains the safe directory: usr/local/submitty/GIT_CHECKOUT/RainbowGrades ### Other information? /etc/gitconfig file has hierarchy over this - causing permission error, so be careful when running git config --global --edit command or --system. Although local config can override system/global config, in our case it is checking etc/gitconfig file first and gives error (fatal: unable to access '/etc/gitconfig': permission denied) --------- Co-authored-by: Barb Cutler <[email protected]>
Related to Submitty/RainbowGrades#56 ### What is the current behavior? ![Screen Shot 2023-07-31 at 12 10 48 PM](https://github.com/Submitty/Submitty/assets/123261952/3a0f5664-0e74-4c19-9336-db4b6d6482e5) Currently, Git has security feature called safe directory. Checking version on web-based customization page is ran by submitty_daemon, which has permission problem. (Running it locally, the user is most likely a root user, won't encounter this issue) ### What is the new behavior? ![Screen Shot 2023-08-14 at 11 40 40 AM](https://github.com/Submitty/Submitty/assets/123261952/74ca0bf3-9ec0-403e-9c5e-0734579d73b6) During install_system process, the script will now create .gitconfig file in /home/submitty_daemon with owner/group being submitty_daemon. In .gitconfig file contains the safe directory: usr/local/submitty/GIT_CHECKOUT/RainbowGrades ### Other information? /etc/gitconfig file has hierarchy over this - causing permission error, so be careful when running git config --global --edit command or --system. Although local config can override system/global config, in our case it is checking etc/gitconfig file first and gives error (fatal: unable to access '/etc/gitconfig': permission denied) --------- Co-authored-by: Barb Cutler <[email protected]>
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.
I tested this on my mac. I had to change the path where the RG_version is written. The original code made assumptions about the directory on the instructor's machine.
Before we merge this, please re-test that it works on the server with the nightly build with the replaced path. AND please get someone to test that it works on a Windows installation (I'm not sure that the environment variables syntax is compatible on all platforms).
@ziesski |
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.
Looks good, reviewed this on my mac.
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.
This update allows all users of RainbowGrades (i.e. instructors and students) to see the build version at the bottom of the RainbowGrades page. This version info is vital as it allows instructors to know which version they are currently using.
Having this version information readily available will enable instructors to provide accurate details when reporting any issues or errors they encounter. In turn, developers can use this version information to identify any potential discrepancies caused by outdated versions and assist instructors more efficiently in resolving their concerns.
[Instructor view]
[student view]