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

Provide the branch of active deployment in PreCompile event #1356

Closed
martinlyra opened this issue Jan 26, 2022 · 3 comments
Closed

Provide the branch of active deployment in PreCompile event #1356

martinlyra opened this issue Jan 26, 2022 · 3 comments
Assignees
Labels
Feature Request Requested functionality Work In Progress Issue being actively worked on
Milestone

Comments

@martinlyra
Copy link

Is your feature request related to a problem? Please describe.
I work on a fork of a codebase and server that has two branches, one for old stable master and another for unstable that they (used to) commit lot of development changes to. My codebase currently only has one branch, and is not labelled master like on tgstation, and for the sake of knowing what branch is active on the deployment would be helpful. Specially when getting the revision data for putting in issue repots.

Describe the solution you'd like

/datum/tgs_revision_information
	//...
	var/branch_name // something like this

Describe alternatives you've considered
Writing an EventScript that copies the .git folder to the active deployment after a successful compilation/deployment. As the local TGS-less version uses .git/HEAD to find the active branch, this is the case on old Baycode versions, like this codebase.

@martinlyra martinlyra added Backlog Issue to be scheduled for addressing Feature Request Requested functionality labels Jan 26, 2022
@martinlyra martinlyra changed the title Provide the branch of active reposity deployment in /datum/tgs_revision_information Provide the branch of active deployment in /datum/tgs_revision_information Jan 26, 2022
@Cyberboss Cyberboss added Area: DMAPI Communication between TGS and DM Ready Issue ready to be addressed and removed Backlog Issue to be scheduled for addressing labels Feb 7, 2022
@Cyberboss Cyberboss added this to the v4.17.0 milestone Feb 7, 2022
@Cyberboss Cyberboss modified the milestones: v4.17.0, Backlog Feb 15, 2022
@Cyberboss Cyberboss added Backlog Issue to be scheduled for addressing and removed Ready Issue ready to be addressed labels Feb 15, 2022
@Cyberboss
Copy link
Member

So, I thought this would be easy but it's not. Revision info is stored in the compile jobs as Tgstation.Server.Api.Models.Internal.RevisionInformation. This is the class that we'd have to add the info to but because of how widespread the use is we'd have to go over it with a fine toothed comb to check that we add the current repository reference to it wherever it is created.

@Cyberboss Cyberboss added the Design Research required into the best way to implement or fix a given issue label Mar 18, 2022
@Cyberboss
Copy link
Member

This is doable... Branches would have to be a many relationship to the rev info.

@Cyberboss
Copy link
Member

@martinlyra I'm going to propose a different solution that'll take some more effort on your part, but is a lot easier on the codebase. I'll add the repository's active reference as a 4th argument to the PreCompile script. From there, you can generate a .dm file in Configuration/CodeModifications with that information and access it at runtime.

@Cyberboss Cyberboss added Work In Progress Issue being actively worked on and removed Backlog Issue to be scheduled for addressing labels Apr 20, 2024
@Cyberboss Cyberboss modified the milestones: Backlog, v6.5.0 Apr 20, 2024
@Cyberboss Cyberboss removed Area: DMAPI Communication between TGS and DM Design Research required into the best way to implement or fix a given issue labels Apr 20, 2024
@Cyberboss Cyberboss self-assigned this Apr 20, 2024
@Cyberboss Cyberboss changed the title Provide the branch of active deployment in /datum/tgs_revision_information Provide the branch of active deployment in PreCompile event Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Requested functionality Work In Progress Issue being actively worked on
Projects
None yet
Development

No branches or pull requests

2 participants