Skip to content

Feature/reproducible builds console#151

Open
developerzohaib786 wants to merge 1 commit intoapache:mainfrom
developerzohaib786:feature/reproducible-builds-console
Open

Feature/reproducible builds console#151
developerzohaib786 wants to merge 1 commit intoapache:mainfrom
developerzohaib786:feature/reproducible-builds-console

Conversation

@developerzohaib786
Copy link
Contributor

@developerzohaib786 developerzohaib786 commented Jan 30, 2026

fixes #95

  • Add devbox.json with pinned Node.js 22.12.0 for reproducible environment
  • Update vite.config.ts with deterministic build options
  • Update Makefile with reproducible build and verification targets
  • Update Dockerfile to use npm ci for deterministic installs
  • Pin exact dependency versions in package.json (remove ^ prefix)
  • Update README.md with reproducible build documentation

I have tested and everything is working fine and here is the proof

Verifying devbox.json

the nodejs 22.12.0 is available in json content

1

Verifying package.json has pinned versions

As there is no ^ prefix in any dependency version so there is no output

image-2

Verifying that the npm ci has clean install

image-3

Clean build # 1

image-4

Build # 1 Sha256 hash

image-5

Clean build # 2

image-7

Build # 2 Sha256 hash

image-6

@developerzohaib786
Copy link
Contributor Author

developerzohaib786 commented Jan 30, 2026

@jbonofre @binarycat0 @dimas-b I have also update the readme to match the actual project structure (uses react-router-dom not TanStack Router):

@dimas-b dimas-b requested a review from jbonofre January 30, 2026 12:52
dimas-b
dimas-b previously approved these changes Jan 30, 2026
Copy link

@dimas-b dimas-b left a comment

Choose a reason for hiding this comment

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

+1 to reproducible builds. Thanks, @developerzohaib786 !

Changes LGTM, but I'm not a UI expert 😅

@binarycat0 @jbonofre WDYT?

Copy link
Contributor

@binarycat0 binarycat0 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution and for your interest in the apache/polaris-tools project.

In its current form, this PR is difficult to review and merge. It contains a large number of changes that are not directly related to the stated goal, which makes the diff unnecessarily complex and increases the risk of unintended side effects. In this project, PRs expected to be focused on a single, well-defined problem.

I recommend reducing this PR to only the changes strictly required for the intended feature or fix, and moving unrelated refactoring or experimental work to separate PRs or discussions.

Additionally, I noticed that parts of this contribution may have been generated with the help of AI tools. While the use of AI-assisted development is not prohibited, such code often requires extra validation, refinement, and alignment with the project’s conventions and architecture before it can be considered for merging.

Please also make sure to follow the contribution guidelines before submitting code:
https://polaris.apache.org/community/contributing-guidelines/#before-you-begin-contributing-code

@developerzohaib786
Copy link
Contributor Author

Thank you for the contribution and for your interest in the apache/polaris-tools project.

In its current form, this PR is difficult to review and merge. It contains a large number of changes that are not directly related to the stated goal, which makes the diff unnecessarily complex and increases the risk of unintended side effects. In this project, PRs expected to be focused on a single, well-defined problem.

I recommend reducing this PR to only the changes strictly required for the intended feature or fix, and moving unrelated refactoring or experimental work to separate PRs or discussions.

Additionally, I noticed that parts of this contribution may have been generated with the help of AI tools. While the use of AI-assisted development is not prohibited, such code often requires extra validation, refinement, and alignment with the project’s conventions and architecture before it can be considered for merging.

Please also make sure to follow the contribution guidelines before submitting code: https://polaris.apache.org/community/contributing-guidelines/#before-you-begin-contributing-code

YES i can make it possible by only focusing on only one thing (reproduceable builds) i think for this purpose pakage-lock.json and docker file would not be changed. we will open an another issue to discuss and work on other features later
and i think there will be only one change in docker file which is changing of npm install command to npm ci command. and i can make this pr more short and more focused that will be easy to merge

@dimas-b dimas-b dismissed their stale review January 30, 2026 16:33

apparently, I approved too early

@developerzohaib786 developerzohaib786 force-pushed the feature/reproducible-builds-console branch from 827b3a2 to aba2308 Compare January 31, 2026 03:28
@developerzohaib786
Copy link
Contributor Author

Self Testing

Minimal Changes

there are only two changes in docker file adding npm ci to install dependencies and package-lock.json fille to copy

image

npm ci command testing successful

image

First build

image

Second build

image

as i properly know that the procedure of building : source code -> dist folder -> sha256 hasesh. and hashes of both builds are matching i tested by my own self. here is the screenshots

build 1 sha256 hashes

image

build 2 sha256 hashes

image

both hashes are matching

@developerzohaib786
Copy link
Contributor Author

@binarycat0 i will open new issue to discuss other build and install problem

@jbonofre
Copy link
Member

jbonofre commented Feb 1, 2026

@developerzohaib786 can you please rebase and clean the PR ? It looks like a large part of the PR is generated by AI. While it's OK, it would be better if you can focus on your own change addressing the issue (reproducible build).

@jbonofre
Copy link
Member

jbonofre commented Feb 1, 2026

@developerzohaib786 also, please rebase and resolve conflict.

@developerzohaib786
Copy link
Contributor Author

@jbonofre yes some part is ai generated but with due respect not full pull request as you know AI can't take the context of such a large codebase.

if you would prefer, i can remove the devbox.json and readme changes and submit them as a separate pull request. please let me know which approach you prefer ??

Thank U

@jbonofre
Copy link
Member

jbonofre commented Feb 1, 2026

@developerzohaib786 if you can focus on the actual required changes, it will simplify the review. Also please rebase and fix conflict. Thanks.

@developerzohaib786 developerzohaib786 force-pushed the feature/reproducible-builds-console branch from 581d483 to 54686f6 Compare February 1, 2026 10:42
@developerzohaib786
Copy link
Contributor Author

Self testing results

installing dependencies via npm ci and first build via npm build

image

second build

image

@developerzohaib786
Copy link
Contributor Author

How to test this pull request ?

Step 1:

install dependencies via npm ci
Install

npm ci

Step 2:

do first build via npm build

npm run build

Step 3:

clean and rebuild

Remove-Item -Recurse -Force dist
npm run build

developerzohaib786 added a commit to developerzohaib786/polaris-tools that referenced this pull request Feb 1, 2026
…ache#151.

changes:
- add devbox.json to pin node.js version for consistent environment

fixes apache#163
@developerzohaib786
Copy link
Contributor Author

@binarycat0 @dimas-b @jbonofre please review updates on this pull request. so i can take another issue and work on it. also if changes needed in this pull request i will do. kindly review.
thank u

Copy link
Contributor

@binarycat0 binarycat0 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. I left a couple comments, please review.

Also, I checked the initial Issue and I'm not sure if it's really an issue or not. Could you validate with @snazy if this is necessary?

Thanks again.

},
},
},
server: {
Copy link
Contributor

Choose a reason for hiding this comment

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


# Install dependencies
RUN npm install
RUN npm ci
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to use install-clean instead of install?

@developerzohaib786 developerzohaib786 force-pushed the feature/reproducible-builds-console branch from 49bf4dc to 10b481a Compare February 4, 2026 16:19
@developerzohaib786
Copy link
Contributor Author

@binarycat0 any updates on this pull request?

@jbonofre
Copy link
Member

jbonofre commented Feb 8, 2026

I will take a look tomorrow.

@binarycat0
Copy link
Contributor

@developerzohaib786 Hello. I see that CI job is broken because of the changes RUN npm ci. Please check the CI job logs.

@snazy Hello, could you validate the build changes if it meets the requirements?


# Install dependencies
RUN npm install
RUN npm ci
Copy link
Member

Choose a reason for hiding this comment

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

I think install is required before ci.

.PHONY: install
install:
npm install
npm ci
Copy link
Member

Choose a reason for hiding this comment

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

I think install is required before ci.

assetFileNames: "assets/[name]-[hash][extname]",
manualChunks: (id) => {
if (id.includes("node_modules")) {
return "vendor"
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need that ?

@jbonofre
Copy link
Member

jbonofre commented Feb 8, 2026

@binarycat0 I will take a look as well (see my previous comment). I'm not sure the PR is good yet (a few comments to verify).

@developerzohaib786 developerzohaib786 force-pushed the feature/reproducible-builds-console branch from 10b481a to 6e80749 Compare February 9, 2026 13:58
@developerzohaib786
Copy link
Contributor Author

@developerzohaib786 Hello. I see that CI job is broken because of the changes RUN npm ci. Please check the CI job logs.

@snazy Hello, could you validate the build changes if it meets the requirements?

CI was failing because npm ci requires package_lock.json to be present. I havve updated the Dockerfile to copy both package.json and packagelock.json.

As i am beginner and I have not much experience of CI/CD pipelines, read some documentation and get some explanation from AI and issue is fixed now and i am getting familiar with real world things and practices.

@developerzohaib786
Copy link
Contributor Author

@binarycat0 @jbonofre i have tested locally the current code and reproduceable builds are working. please test the current code as soon as possible and if any changes still required I will be available to solve
thank you for your guidance to get the chance to solve real world problems 🙌

@developerzohaib786
Copy link
Contributor Author

@jbonofre @binarycat0 please take this up

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.

Console: ensure packaged builds are reproducible

4 participants