-
Notifications
You must be signed in to change notification settings - Fork 31
Restore lotman through splitting off a second server binary #1755
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a4a7042
Trigger lotman package build on compatible systems with 'lotman' buil…
jhiemstrawisc b55d4e1
Perform standard federation metadata discovery for determining fed is…
jhiemstrawisc 2008113
Enable a few extra debugging tools for lotman
jhiemstrawisc 5aa710e
Adjust mock lot config to reflect metadata discovery
jhiemstrawisc a81a7ac
Create Lotman-enabled server binary and plumb through to prod cache c…
jhiemstrawisc 76f3f94
Attempt running dual test suites -- one for server binary, one for re…
jhiemstrawisc 2641408
Split binary archives to ameliorate goreleaser warning
jhiemstrawisc 3cbbe7a
Use binary name 'pelican' and not 'pelican-server' for all CI tests
jhiemstrawisc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| name: Test Template | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| tags: | ||
| required: true | ||
| type: string | ||
| coverprofile: | ||
| required: true | ||
| type: string | ||
| binary_name: | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: hub.opensciencegrid.org/pelican_platform/pelican-dev:latest-itb | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - name: Fetch tags | ||
| run: | | ||
| git config --global --add safe.directory /__w/pelican/pelican | ||
| git fetch --force --tags | ||
| - name: Cache Next.js | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.npm | ||
| ${{ github.workspace }}/.next/cache | ||
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | ||
| - name: Test | ||
| run: | | ||
| make web-build | ||
| go test -tags=${{ inputs.tags }} -timeout 15m -coverpkg=./... -coverprofile=${{ inputs.coverprofile }} -covermode=count ./... | ||
| - name: Get total code coverage | ||
| if: github.event_name == 'pull_request' | ||
| id: cc | ||
| run: | | ||
| set -x | ||
| cc_total=`go tool cover -func=${{ inputs.coverprofile }} | grep total | grep -Eo '[0-9]+\.[0-9]+'` | ||
| echo "cc_total=$cc_total" >> $GITHUB_OUTPUT | ||
| - name: Restore base test coverage | ||
| id: base-coverage | ||
| if: github.event.pull_request.base.sha != '' | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| unit-base.txt | ||
| key: ${{ runner.os }}-unit-test-coverage-${{ (github.event.pull_request.base.sha != github.event.after) && github.event.pull_request.base.sha || github.event.after }} | ||
| - name: Run test for base code | ||
| if: steps.base-coverage.outputs.cache-hit != 'true' && github.event.pull_request.base.sha != '' | ||
| run: | | ||
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
| git fetch origin main ${{ github.event.pull_request.base.sha }} | ||
| HEAD=$(git rev-parse HEAD) | ||
| git reset --hard ${{ github.event.pull_request.base.sha }} | ||
| make web-build | ||
| go generate ./... | ||
| go test -tags=${{ inputs.tags }} -timeout 15m -coverpkg=./... -coverprofile=base_coverage.out -covermode=count ./... | ||
| go tool cover -func=base_coverage.out > unit-base.txt | ||
| git reset --hard $HEAD | ||
| - name: Get base code coverage value | ||
| if: github.event_name == 'pull_request' | ||
| id: cc_b | ||
| run: | | ||
| set -x | ||
| cc_base_total=`grep total ./unit-base.txt | grep -Eo '[0-9]+\.[0-9]+'` | ||
| echo "cc_base_total=$cc_base_total" >> $GITHUB_OUTPUT | ||
| - name: Add coverage information to action summary | ||
| if: github.event_name == 'pull_request' | ||
| run: echo 'Code coverage ' ${{steps.cc.outputs.cc_total}}'% Prev ' ${{steps.cc_b.outputs.cc_base_total}}'%' >> $GITHUB_STEP_SUMMARY | ||
| - name: Run GoReleaser for Ubuntu | ||
| uses: goreleaser/goreleaser-action@v5 | ||
| with: | ||
| distribution: goreleaser | ||
| version: latest | ||
| args: build --single-target --clean --snapshot | ||
| - name: Copy files (Ubuntu) | ||
| run: | | ||
| cp dist/${{ inputs.binary_name }}_linux_amd64_v1/${{ inputs.binary_name }} ./pelican | ||
| - name: Run Integration Tests | ||
| run: ./github_scripts/citests.sh | ||
| - name: Run End-to-End Test for Object get/put | ||
| run: ./github_scripts/get_put_test.sh | ||
| - name: Run End-to-End Test for Director stat | ||
| run: ./github_scripts/stat_test.sh | ||
| - name: Run End-to-End Test of x509 access | ||
| run: ./github_scripts/x509_test.sh | ||
| - name: Run End-to-End Test for --version flag | ||
| run: ./github_scripts/version_test.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.