Skip to content

Conversation

joaquimrocha
Copy link
Contributor

@joaquimrocha joaquimrocha commented Sep 25, 2025

Summary

This PR allows building and running Headlamp by using npm alone, instead of having to install and use make for some things and using npm for others.

Steps to Test

  1. Check the scrips with npm run
  2. Check different npm commands to build/run Headlamp to see if it works

Still Missing

  • Replacing Github workflows to use npm

Copy link

linux-foundation-easycla bot commented Sep 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joaquimrocha

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 25, 2025
Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR introduces npm-based build and development workflows for the Headlamp project, replacing the existing make-based approach with standardized npm scripts. The changes enable developers to build, test, and run the entire project using only npm commands.

  • Adds a root-level package.json with comprehensive npm scripts for all project components
  • Updates build scripts and configurations to use npm commands instead of make
  • Renames package names across workspaces to follow consistent naming conventions

Reviewed Changes

Copilot reviewed 8 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Adds root package.json with workspaces configuration and comprehensive npm scripts for building, testing, and running all project components
frontend/vite.config.ts Updates monaco-editor path to work with workspace structure
frontend/package.json Renames package from "headlamp" to "headlamp-frontend" for consistency
e2e-tests/package.json Renames package from "e2e-tests" to "headlamp-e2e-tests" for consistency
app/scripts/start.js Replaces make commands with npm equivalents for backend building and starting
app/scripts/build-backend.js Replaces make backend command with npm run backend:build
app/package.json Adds electronVersion and semver dependency
app/e2e-tests/package.json Renames package from "e2e-tests" to "headlamp-app-e2e-tests" for consistency
Files not reviewed (3)
  • app/e2e-tests/package-lock.json: Language not supported
  • e2e-tests/package-lock.json: Language not supported
  • load-tests/package-lock.json: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@illume illume marked this pull request as draft September 26, 2025 10:53
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2025
@joaquimrocha joaquimrocha force-pushed the add-root-npm branch 15 times, most recently from 91f7569 to c4c90a5 Compare September 29, 2025 08:43
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2025
@k8s-ci-robot k8s-ci-robot removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Oct 3, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 3, 2025
@joaquimrocha joaquimrocha marked this pull request as ready for review October 6, 2025 10:14
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 6, 2025
@illume illume marked this pull request as draft October 6, 2025 14:44
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 6, 2025
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

It seems one of the CI jobs is failing still, so I put it in draft mode.

When it's working for you, I think breaking this up into separate PRs would be good. To reduce the size and risk. Probably a bunch of your commits are separate enough to do this?

Can you please confirm which platforms you've tested on in the PR?

@illume illume added kind/feature Categorizes issue or PR as related to a new feature. dx backend Issues related to the backend frontend Issues related to the frontend app e2e-tests End to end tests labels Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app approved Indicates a PR has been approved by an approver from all required OWNERS files. backend Issues related to the backend cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dx e2e-tests End to end tests frontend Issues related to the frontend kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants