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

Device Generator: produces wrong branch reference in .gitmodules in EPICS-top #7935

Closed
1 task
zsoltkebel opened this issue Jul 25, 2023 · 2 comments
Closed
1 task
Assignees
Labels
2 no_release_notes Tickets that do not need release notes, use sparingly! training

Comments

@zsoltkebel
Copy link
Contributor

Issue

On newly created submodules we realised that the generator puts refs/head/main as branch reference instead of the correct main.

image

We saw this issue with the new IOCs of Meas 905 and Pace 5000.

You can see the correct format around here: https://github.com/ISISComputingGroup/EPICS/blob/a01672b08ce4f38809aa843476bf7209a3c6c5c7/.gitmodules#L746

Get started

Probably look around somewhere here to investigate: https://github.com/ISISComputingGroup/IBEX_device_generator/blob/22331cb0549a3e729179262a055472530a1ac3fe/utils/git_utils.py#L155C49-L155C49

Acceptance criteria

  • The script generator adds the correct branch name when run to generate a new device submodule.

How to Test

Probably by creating a new dummy device and seeing the format of the .gitmodules in EPICS-top

@KathrynBaker KathrynBaker added the 2 label Sep 7, 2023
@github-actions github-actions bot added ready and removed proposal labels Sep 7, 2023
@esmith1729 esmith1729 self-assigned this Sep 7, 2023
@github-actions github-actions bot added in progress and removed ready labels Sep 7, 2023
@KathrynBaker KathrynBaker added this to the SPRINT_2023_09_07 milestone Sep 7, 2023
@rerpha rerpha self-assigned this Sep 12, 2023
@rerpha
Copy link
Contributor

rerpha commented Sep 12, 2023

after extensive debugging, Evan and I found that this is the cause: https://github.com/ISISComputingGroup/IBEX_device_generator/blob/master/utils/git_utils.py#L157

the annoying thing about this is it's a call to gitpython itself, which doesn't allow for any sort of method to disable the remote prefix (ie the /refs/heads/ part) so we're having to call subprocess.run() instead. We have added a comment for this in the code as well.

@esmith1729
Copy link
Contributor

Pull Request:

To test:

  • create a dummy device, and check that the .gitmodules file has the correct "branch" (should be just "main) in Instrument/Apps/EPICS

@rerpha rerpha added the no_release_notes Tickets that do not need release notes, use sparingly! label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 no_release_notes Tickets that do not need release notes, use sparingly! training
Projects
None yet
Development

No branches or pull requests

5 participants