Skip to content

feature/integration-testsdevelop#1263

Open
lbeckman314 wants to merge 16 commits into
developfrom
feature/integration-tests
Open

feature/integration-testsdevelop#1263
lbeckman314 wants to merge 16 commits into
developfrom
feature/integration-tests

Conversation

@lbeckman314
Copy link
Copy Markdown
Contributor

@lbeckman314 lbeckman314 commented Dec 3, 2025

Important

This PR can be revisited after #1404 is merged

Need to add note on how it's different than the integration_tests_on_kind.yaml, for example:

  • Smaller focus/scope (only tests basic TES task submissions + nf-canary workflow as opposed to full Gen3 stack)

Overview

This PR adds initial support for integration tests against the Gen3 data platform!

Caution

Couple issues with Integration Tests + K8s Tests:

Integration Test Workflow

➜ wget https://raw.githubusercontent.com/uc-cdis/fence/refs/heads/master/.github/workflows/integration_tests.yaml -P .github/workflows
‘.github/workflows/integration_tests.yaml’ saved

Copilot AI review requested due to automatic review settings December 3, 2025 23:46
@lbeckman314 lbeckman314 changed the base branch from main to develop December 3, 2025 23:47
@lbeckman314 lbeckman314 self-assigned this Dec 3, 2025
@lbeckman314 lbeckman314 moved this to In Progress in Funnel Dec 3, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 3, 2025

Deploy Preview for funnel-dev ready!

Name Link
🔨 Latest commit 038b539
🔍 Latest deploy log https://app.netlify.com/projects/funnel-dev/deploys/69377a735ffc1b000856c268
😎 Deploy Preview https://deploy-preview-1263--funnel-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Added commands to initialize and tidy Hugo modules in the website build process.
@lbeckman314 lbeckman314 changed the title developfeature/integration-tests feature/integration-testsdevelop Dec 5, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 30, 2026

Deploy Preview for funnel-dev ready!

Name Link
🔨 Latest commit 97720f4
🔍 Latest deploy log https://app.netlify.com/projects/funnel-dev/deploys/69cb0f02cc89250008153e53
😎 Deploy Preview https://deploy-preview-1263--funnel-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread .github/workflows/gen3-integration-tests.yaml Fixed
Comment thread .github/workflows/gen3-integration-tests.yaml Fixed
Comment thread .github/workflows/gen3-integration-tests.yaml Fixed
Comment thread .github/workflows/gen3-integration-tests.yaml Fixed
@paulineribeyre
Copy link
Copy Markdown
Collaborator

This is being done in #1402 instead

@paulineribeyre
Copy link
Copy Markdown
Collaborator

Replaced by #1404

Comment thread .github/workflows/gen3-integration-tests.yaml Fixed
Comment thread .github/workflows/gen3-integration-tests.yaml Fixed
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Comment on lines +13 to +154
runs-on: ubuntu-latest

steps:
# -----------------
# 1. Cluster Setup
# -----------------

- name: Create Kind cluster
uses: helm/kind-action@v1
with:
cluster_name: funnel-gen3

- name: Install Helm
uses: azure/setup-helm@v4

# ---------------------------
# 2. Install Funnel via Helm
# ---------------------------

- name: Add ohsu Helm repo
run: helm repo add ohsu https://calypr.org/helm-charts && helm repo update

- name: Install Funnel
run: |
# 'standard' is the default StorageClass created by Kind
helm upgrade --install funnel ohsu/funnel \
--set storage.className=standard \
--set storage.provisioner=rancher.io/local-path \
--wait --timeout=60s

- name: Wait for Funnel server
run: kubectl rollout status deployment/funnel-server --timeout=60s

# ----------------------------------
# 3. Install Gen3-Workflow via Helm
# ----------------------------------

- name: Install gen3workflow
run: |
helm upgrade --install gen3workflow ohsu/gen3workflow \
--set funnelUrl=http://funnel:8000 \
--wait --timeout=60s

- name: Wait for gen3workflow
run: kubectl rollout status deployment/gen3workflow --timeout=60s

# -------------------------------------
# 4. Expose services for local testing
# -------------------------------------

- name: Port-forward Funnel
run: kubectl port-forward svc/funnel 8000:8000 &

- name: Port-forward gen3workflow
run: kubectl port-forward svc/gen3workflow 8080:8080 &

# ----------------------------
# 5. Run Nextflow + nf-canary
# ----------------------------

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'

- name: Install Nextflow
run: |
curl -s https://get.nextflow.io | bash
chmod +x nextflow
mkdir -p $HOME/.local/bin
mv nextflow $HOME/.local/bin/
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Clone nf-canary
run: git clone https://github.com/seqeralabs/nf-canary

- name: Configure nf-canary for TES (Funnel)
run: |
cat >> nf-canary/nextflow.config <<'EOF'
plugins {
id 'nf-ga4gh'
}
process.executor = 'tes'
tes.endpoint = 'http://localhost:8000'
EOF

- name: Run nf-canary tests
id: nf_canary
run: |
cd nf-canary
nextflow run main.nf -with-report report.html 2>&1 | tee nextflow.log
echo "exit_code=${PIPESTATUS[0]}" >> $GITHUB_OUTPUT

# -------------------
# 6. Verify K8s Jobs
# -------------------

- name: Verify Kubernetes jobs completed
run: |
echo "=== All jobs in default namespace ==="
kubectl get jobs -o wide

FAILED=$(kubectl get jobs \
--field-selector=status.failed!=0 \
-o jsonpath='{.items[*].metadata.name}' 2>/dev/null || true)

if [ -n "$FAILED" ]; then
echo "Failed jobs: $FAILED"
for JOB in $FAILED; do
echo "--- Logs for $JOB ---"
kubectl logs job/$JOB --tail=50 || true
done
exit 1
fi

SUCCEEDED=$(kubectl get jobs \
--field-selector=status.successful!=0 \
-o jsonpath='{.items[*].metadata.name}' 2>/dev/null || true)

if [ -z "$SUCCEEDED" ]; then
echo "No jobs completed successfully — did any tasks run?"
kubectl describe jobs || true
exit 1
fi

echo "All Kubernetes jobs completed successfully: $SUCCEEDED"

# ------------------------------
# 7. Upload test logs + reports
# ------------------------------

- name: Upload Nextflow logs
if: always()
uses: actions/upload-artifact@v4
with:
name: nextflow-logs
path: |
nf-canary/nextflow.log
nf-canary/report.html
nf-canary/.nextflow.log
if-no-files-found: ignore

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 2 days ago

Add an explicit workflow-level permissions block near the top of .github/workflows/integration-tests.yaml (after on: and before concurrency:) so all jobs inherit least-privilege defaults.
For this workflow, the best minimal non-breaking baseline is:

  • contents: read (CodeQL-recommended minimum for checkout/read access patterns)
  • actions: read (safe for reading workflow/action metadata)
  • packages: read (commonly needed when pulling package/container artifacts; low-risk read scope)

No imports, methods, or definitions are needed (YAML workflow change only).

Suggested changeset 1
.github/workflows/integration-tests.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml
--- a/.github/workflows/integration-tests.yaml
+++ b/.github/workflows/integration-tests.yaml
@@ -3,6 +3,11 @@
 on:
   push:
 
+permissions:
+  contents: read
+  actions: read
+  packages: read
+
 # Cancel redundant jobs
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
EOF
@@ -3,6 +3,11 @@
on:
push:

permissions:
contents: read
actions: read
packages: read

# Cancel redundant jobs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Copilot is powered by AI and may make mistakes. Always verify output.
# -----------------

- name: Create Kind cluster
uses: helm/kind-action@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Integration Tests (K8s)' step
Uses Step
uses 'helm/kind-action' with ref 'v1', not a pinned commit hash
cluster_name: funnel-gen3

- name: Install Helm
uses: azure/setup-helm@v4

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Integration Tests (K8s)' step
Uses Step
uses 'azure/setup-helm' with ref 'v4', not a pinned commit hash
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Comment thread .github/workflows/integration-tests.yaml Fixed
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
EOF

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Integration Tests (K8s)' step
Uses Step
uses 'mxschmitt/action-tmate' with ref 'v3', not a pinned commit hash
@@ -0,0 +1,31 @@
name: Integration Tests (Gen3)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hey @lbeckman314 , this one needs to be deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants