Skip to content

Conversation

@jhiemstrawisc
Copy link
Member

This PR creates a second server binary, which for now only enables Lotman by passing the lotman build tag through goreleaser. This is necessary for the long-term development goals we have to use Pelican as the distribution layer for lotman configuration across caches.

Eventually we can also use this second binary to fine-tune which modules are built into clients or servers, which should make the HTCondor developers happy as well. For now, the new server binary replaces the regular binary only in cache containers, since that's where lotman is needed.

As for testing, I've tried to split our GHA test runner across the two binaries. This resulted in creating a workflow template that I can pass build tags/binary names to.

…d flag

Regardless of the underlying host arch/os, this commit makes sure we only build
Lotman if the `lotman` build flag is passed to go. This setup will allow us to
trigger the build of a secondary binary with lotman enabled.
…suer

Between the writing and compiling out of this code, we've hidden direct access
through the param package to the 'Federation.DirectorUrl' key. Instead, this now
calls `config.GetFederation()`, which tries to perform metadata discovery in many
cases.

To fix this, the commit adjusts the way we grab this information, as well as fixes
tests that now mock the metadata discovery as well.
…ontainers

This creates a second `pelican-server` binary that passes the `lotman` build flag to
go, thereby enabling the previously-shimmed Lotman wrapper package. Since we only
envision this being used in caches (at least for the time being), this new binary
only replaces the binaries for the `cache` and `osdf-cache` targeted Docker builds.

Along with this, the entrypoints for these containers have been modified to accept
`pelican-server` and `osdf-server` arguments.
…gular

Github Actions workflows are not my forte, but the attempt here is to re-use the
workflow file (now test-template.yml) to duplicate all the tests but with the new
binary and with the lotman tests.

Since GHA doesn't provide a way to mock the action environment in a local dry-run,
I'll be developing through commits/pushes. Let's see how it goes...
@jhiemstrawisc
Copy link
Member Author

Closes #1722
Closes #1721

Copy link
Collaborator

@turetske turetske 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. Testing builds and docker containers seemed to pass.

@turetske turetske merged commit 6c9fc61 into PelicanPlatform:main Dec 6, 2024
21 checks passed
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.

Modify GHA test action to create cache container with CGO_ENABLED Modify go-releaser to create a second binary

2 participants