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

[Feature:RainbowGrades] Display RainbowGrades version #56

Merged
merged 13 commits into from
Jun 26, 2024
Merged

Conversation

ziesski
Copy link
Member

@ziesski ziesski commented Jul 28, 2023

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]
Screen Shot 2023-07-28 at 11 49 10 AM

[student view]
Screen Shot 2023-07-28 at 1 39 52 PM

@ziesski ziesski requested a review from bmcutler July 28, 2023 17:41
@ziesski
Copy link
Member Author

ziesski commented Jul 30, 2023

#closes Submitty/Submitty/issues/9492

Copy link
Member Author

@ziesski ziesski left a 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

Copy link
Member Author

@ziesski ziesski left a 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.

@ziesski
Copy link
Member Author

ziesski commented Aug 29, 2023

Resolved merge conflict

bmcutler added a commit to Submitty/Submitty that referenced this pull request Feb 24, 2024
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]>
Xiayucheng1212 pushed a commit to Xiayucheng1212/Submitty that referenced this pull request Apr 3, 2024
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]>
Copy link
Member

@bmcutler bmcutler left a 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).

@bmcutler
Copy link
Member

@ziesski
Please see my note above

@ziesski ziesski requested a review from oliiso June 25, 2024 16:40
Copy link
Contributor

@oliiso oliiso left a 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.

Copy link

@zacharymnp zacharymnp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on Windows 10
image

@bmcutler bmcutler merged commit f911fe0 into main Jun 26, 2024
1 check passed
@bmcutler bmcutler deleted the rainbow_version branch June 26, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants