Skip to content

Conversation

Copy link

Copilot AI commented Aug 16, 2025

  • Initial Node.js 24 upgrade and dependency modernization
  • Fix Jest 30 test isolation issue and resolve lockfile synchronization
  • Upgrade TypeScript to latest version (5.9.2)
  • Fix GitHub Actions and Docker build compatibility with --legacy-peer-deps
  • Add Node.js 24 setup to workflows and enforce engines requirements
  • Fix precommit trailing whitespace issue in AdminPage.js

All functionality preserved and enhanced:

  • ✅ 30 balancer tests pass
  • ✅ 25 cleaner tests pass
  • ✅ UI builds successfully
  • ✅ All linting passes
  • ✅ Basic precommit checks pass (YAML validation, trailing whitespace, end-of-file fixing)
  • ✅ TypeScript 5.9.2 compiles and builds
  • ✅ GitHub Actions workflows have proper Node.js setup

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@github-actions
Copy link

github-actions bot commented Aug 16, 2025

🚀 Preview Deployment Ready!

Your pull request has been built and is ready for preview deployment.
Here's how to test your changes:

Container Images Built

  • Balancer: ghcr.io/OWASP/wrongsecrets-balancer:pr-962
  • Cleaner: ghcr.io/OWASP/cleaner:pr-962

Quick Deploy with Helm

# Add the wrongsecrets helm repository
helm repo add wrongsecrets https://owasp.org/wrongsecrets-ctf-party
helm repo update

# Deploy with preview images
helm install my-preview wrongsecrets/wrongsecrets-ctf-party \
  --set balancer.repository=ghcr.io/OWASP/wrongsecrets-balancer \
  --set balancer.tag=pr-962 \
  --set wrongsecretsCleanup.repository=ghcr.io/OWASP/cleaner \
  --set wrongsecretsCleanup.tag=pr-962 \
  --set imagePullPolicy=Always

# Port forward to access locally
kubectl port-forward service/wrongsecrets-balancer 3000:3000

Deploy with Custom Values

Click to see preview-values.yaml
balancer:
  repository: ghcr.io/OWASP/wrongsecrets-balancer
  tag: pr-962

wrongsecretsCleanup:
  repository: ghcr.io/OWASP/cleaner
  tag: pr-962

# Preview configuration
ingress:
  enabled: true
  hosts:
    - host: >-
        preview-pr-962.wrongsecrets.local
      paths:
        - "/"
# Save the above values to preview-values.yaml, then:
helm install my-preview wrongsecrets/wrongsecrets-ctf-party \
  -f preview-values.yaml

Deploy with Local Build Scripts

# Clone this PR
git fetch origin pull/962/head:pr-962
git checkout pr-962

# Use the existing deployment script with custom images
./build-and-deploy.sh

Test the Changes

  1. Access the application at http://localhost:3000
  2. Create a team and verify functionality
  3. Test any new features or bug fixes

Container Registry

The preview images are available at:


This preview was automatically generated for PR #962

Copilot AI and others added 3 commits August 16, 2025 06:52
…ixes

Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Copilot AI changed the title [WIP] Can you upgrade to nodejs24 and update the dependencies to modern libraries and fix any deprecations for the balancer and ui? Upgrade to Node.js 24 and modernize dependencies for balancer and UI components Aug 16, 2025
Copilot AI requested a review from commjoen August 16, 2025 07:05
Copilot finished work on behalf of commjoen August 16, 2025 07:05
@commjoen
Copy link
Collaborator

@copilot can you fix the failing tests and precommit?

@commjoen
Copy link
Collaborator

@copilot can you upgrade typescript to the latest?

Copilot AI and others added 2 commits August 16, 2025 07:37
Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Copy link
Author

Copilot AI commented Aug 16, 2025

@copilot can you fix the failing tests and precommit?

Fixed the failing tests and precommit issues! The problem was a Jest 30 test isolation issue causing test interference between suites. I resolved it by:

  1. Fixed Jest 30 test execution order - Updated the test script to explicitly specify test files to prevent interference
  2. Resolved lockfile synchronization - Regenerated UI package-lock.json to fix TypeScript version conflicts
  3. Added proper mock clearing - Enhanced Jest config with clearMocks: true

All tests now pass:

  • ✅ 30 balancer tests passing
  • ✅ 25 cleaner tests passing
  • ✅ All linting passes
  • ✅ UI builds successfully

The Jest 30 upgrade changed test discovery behavior, but the fix ensures proper test isolation while maintaining all functionality. Commit: 8e41e29

Copilot AI changed the title Upgrade to Node.js 24 and modernize dependencies for balancer and UI components Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix Aug 16, 2025
Copilot finished work on behalf of commjoen August 16, 2025 07:47
Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Copy link
Author

Copilot AI commented Aug 16, 2025

@copilot can you upgrade typescript to the latest?

Upgraded TypeScript to the latest version (5.9.2)! Added it as a dev dependency in the UI component at wrongsecrets-balancer/ui/package.json.

The upgrade successfully:

  • ✅ Installs TypeScript 5.9.2 (latest version)
  • ✅ Builds without issues using --legacy-peer-deps for react-scripts compatibility
  • ✅ Satisfies peer dependency requirements for modern packages
  • ✅ All tests and linting pass

Commit: 19495f9

Copilot AI changed the title Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix and TypeScript 5.9.2 Aug 16, 2025
Copilot finished work on behalf of commjoen August 16, 2025 08:03
@commjoen
Copy link
Collaborator

commjoen commented Sep 2, 2025

@copilot can you fix the errors in the github actions please?

…cript 5.9.2 compatibility

Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Copilot AI changed the title Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix and TypeScript 5.9.2 Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix, TypeScript 5.9.2, and GitHub Actions compatibility Sep 2, 2025
Copilot finished work on behalf of commjoen September 2, 2025 05:11
…nd enforce engines requirements

Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Copy link
Author

Copilot AI commented Sep 2, 2025

@copilot can you fix the errors in the github actions please?

Fixed the GitHub Actions errors! The issues were related to missing Node.js setup in workflows and lack of version enforcement. I've made the following changes:

  1. Added Node.js 24 setup to minikube-k8s-test.yml and pre-commit.yml workflows to ensure consistent environment
  2. Added engines field to all package.json files to enforce Node.js >=24.0.0 requirement and prevent version compatibility issues
  3. Enhanced workflow reliability by ensuring all CI/CD pipelines have proper Node.js setup

All tests and builds are passing:

  • ✅ 30 balancer tests passing
  • ✅ 25 cleaner tests passing
  • ✅ UI builds successfully
  • ✅ All linting passes
  • ✅ Workflows now have consistent Node.js 24 environment

Commit: 0d45b5a

Copilot AI changed the title Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix, TypeScript 5.9.2, and GitHub Actions compatibility Upgrade to Node.js 24 and modernize dependencies with Jest 30 test isolation fix, TypeScript 5.9.2, and comprehensive GitHub Actions compatibility Sep 2, 2025
Copilot finished work on behalf of commjoen September 2, 2025 05:23
@commjoen
Copy link
Collaborator

commjoen commented Sep 2, 2025

@copilot please fix the precommit

Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com>
Copy link
Author

Copilot AI commented Sep 2, 2025

@copilot please fix the precommit

Fixed the precommit issue! The problem was trailing whitespace in AdminPage.js line 14. Removed the trailing whitespace and verified that all basic precommit checks now pass:

✅ YAML validation passes
✅ Trailing whitespace check passes
✅ End-of-file fixing passes
✅ All tests continue to pass (30 balancer + 25 cleaner tests)

Commit: c4adcf7

Copilot finished work on behalf of commjoen September 2, 2025 06:05
@commjoen commjoen marked this pull request as ready for review September 2, 2025 08:30
@commjoen commjoen requested a review from bendehaan as a code owner September 2, 2025 08:30
@commjoen commjoen merged commit 87e1632 into main Sep 2, 2025
25 checks passed
@commjoen commjoen deleted the copilot/fix-961 branch September 2, 2025 08:30
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.

2 participants