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

Epics build on rocky9 #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bhill-slac
Copy link
Member

I got epics-build working on rocky9, specifically psbuild-rocky9, with this branch.
Primarily, I do two things.

  1. Added test for existence of package under [email protected]:slac-epics as part of the default location check. This used to just look around our AFS git area if package wasn't found in modulelist.txt. Now it also looks on github. This allows epics-build to work for modules already imported to github:slac-epics w/o needing a decision on how modulelist.txt will be moved and/or updated.
  2. Modified the code that determines if a package is an IOC, extension, or module, to make an EPICS module the default if unable to determine from the URL and packageName.

Note: I'm seeing issues with github API errors that keep epics-build from building more than around 10 packages. When I first saw this I couldn't even get through one package, but I worked to minimize the number of remote github operations and now can get around 10 or so. I looked into some info on github.com re rate limiting and was able to fetch rate limit data. I didn't see any obvious problem w/ the rate limit data. i.e. No counts showed me exceeding limits, but somehow I still get seemingly random failures.

…extension.

Hack to get around not having substring 'module' in the url.
Check for tag already checked out was incorrect leading to unneeded refetch.
Also fixed places where code assumed the current URL was the same as
remote origin's url.  That fails for repos originally cloned from AFS repos
that are now hosted on github.
Was getting many github api errors as code was generating tons
of queries for github paths that don't exist.
Can be quite helpful when trying to debug epics-build when
AFS may or may not be available, and most but not all EPICS repos
have been moved to github.com:slac-epics
@bhill-slac bhill-slac requested review from marciodo and JJL772 March 3, 2025 22:51
Copy link
Member

@JJL772 JJL772 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 to me, besides one comment/suggestion. Thanks for fixing this stuff!

Comment on lines +422 to +429
defRepoPath = DEF_GITHUB_REPOS + '/' + gitPackageDir
if 'github.com' in gitRoot:
# This results in an extra github API access, but is needed to test if the package is hosted on github
repoTags = gitGetRemoteTags( defRepoPath, verbose=verbose )
if len(repoTags) > 0:
if verbose:
print( "determinePathToGitRepo: github %s repo is %s" % (packagePath, defRepoPath) )
return defRepoPath
Copy link
Member

Choose a reason for hiding this comment

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

Another option here might be to check if $GIT_SITE_TOP/path/to/repo.git/hooks/pre-receive exits with an error not. The modules & packages that we migrated to GitHub have a pre-receive hook that prints an error message and exits return code 1. If the pre-receive hook exits with 0, then you can do the extra github.com check.

@bhill-slac
Copy link
Member Author

bhill-slac commented Mar 4, 2025 via email

@JJL772
Copy link
Member

JJL772 commented Mar 4, 2025

If you've pushed all the tags, branches, etc from the AFS git repo to github, why
not just delete the AFS git repo to avoid possible confusion over which one to use?

I left them intact to avoid "breaking" all existing clones. Since it's been a couple of months since things have been migrated, most of the AFS repos can probably be deleted.

A few have not been migrated to GitHub yet due to invalid commits. Those will need to have their git histories rewritten. Unfortunately GitHub doesn't allow us to disable git fsck checks on push.

Who handles the actual merge once these pull requests have been approved?

Either of us. I was holding off on merging because I wasn't sure if Marcio wanted to review or not. After talking to him, I'm going to go ahead with merging these.

@marciodo
Copy link
Member

marciodo commented Mar 4, 2025

Another ugly solution would be to check if there's a tar.gz for the Git repository in AFS:

└─>  ls /afs/slac.stanford.edu/g/cd/swe/git/repos/package/epics/modules/
a16vme.git                                                  ethercat_has_been_moved_to_github_see_readme.tar                  perfMeasure_has_been_moved_to_github_see_readme.tar
a16vme_has_been_moved_to_github_see_readme.tar              ethercatmc.git                                                    pgp.git
acm.git                                                     ethercatmc_has_been_moved_to_github_see_readme.tar                pgp_has_been_moved_to_github_see_readme.tar
acm_has_been_moved_to_github_see_readme.tar                 ether_ip.git                                                      plcAdmin.git
acqiris.git                                                 ether_ip_has_been_moved_to_github_see_readme.tar                  plcAdmin_has_been_moved_to_github_see_readme.tar
acqiris_has_been_moved_to_github_see_readme.tar             etherPSC.git                                                      pmac.git
ADAndor3.git                                                etherPSC_has_been_moved_to_github_see_readme.tar                  pmac_has_been_moved_to_github_see_readme.tar
ADAndor3_has_been_moved_to_github_see_readme.tar            ev2_driver.git                                                    PSCD_Camac.git
ADAndor.git                                                 ev2_driver_has_been_moved_to_github_see_readme.tar                PSCD_Camac_has_been_moved_to_github_see_readme.tar
ADAndor_has_been_moved_to_github_see_readme.tar             event2.git                                                        push2slac-epics.sh
ADAravis.git                                                event2_has_been_moved_to_github_see_readme.tar                    push2slac-epics-via-pat.sh
ADAravis_has_been_moved_to_github_see_readme.tar            event.git                                                         push2slac-epics-via-ssh.sh
ADArchon.git                                                event_has_been_moved_to_github_see_readme.tar                     pva2pva.git
ADArchon_has_been_moved_to_github_see_readme.tar            evrClient.git                                                     pva2pva_has_been_moved_to_github_see_readme.tar
ADCore.git                                                  evrClient_has_been_moved_to_github_see_readme.tar                 pvAccessCPP.git
ADCore_has_been_moved_to_github_see_readme.tar              exampleCPP.git                                                    pvAccessCPP_has_been_moved_to_github_see_readme.tar

Or to check the README_github file in the AFS $GIT_ROOT directory:

  1 spectrometer is now located at https://github.com/slac-epics/spectrometer.git
  2 pvAccessCPP is now located at https://github.com/slac-epics/pvAccessCPP.git
  3 pvDataCPP is now located at https://github.com/slac-epics/pvDataCPP.git
  4 pvDatabaseCPP is now located at https://github.com/slac-epics/pvDatabaseCPP.git
  5 pvExampleTestCPP is now located at https://github.com/slac-epics/pvExampleTestCPP.git
  6 pvCommonCPP is now located at https://github.com/slac-epics/pvCommonCPP.git
  7 pvaClientCPP is now located at https://github.com/slac-epics/pvaClientCPP.git
  8 pvaClientTestCPP is now located at https://github.com/slac-epics/pvaClientTestCPP.git
  9 pva2pva is now located at https://github.com/slac-epics/pva2pva.git
 10 pvaSrv is now located at https://github.com/slac-epics/pvaSrv.git
 11 normativeTypesCPP is now located at https://github.com/slac-epics/normativeTypesCPP.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants