Skip to content

fix: ensure UI directory is created when building debian-dev image#12754

Closed
sihyeonn wants to merge 1 commit intoapache:masterfrom
sihyeonn:fix/sh-build-failure
Closed

fix: ensure UI directory is created when building debian-dev image#12754
sihyeonn wants to merge 1 commit intoapache:masterfrom
sihyeonn:fix/sh-build-failure

Conversation

@sihyeonn
Copy link
Copy Markdown
Contributor

Description

This PR fixes a build failure when running make build-on-debian-dev.

The debian-dev image build failed at:

[2/2] STEP 9/21: COPY --chown=nobody:root ui/ /usr/local/apisix/ui/
Error: building at STEP "COPY --chown=nobody:root ui/ /usr/local/apisix/ui/": checking on sources under "/var/tmp/libpod_builder971763380/build": copier: stat: "/ui": no such file or directorybecause the ui directory does not exist in the build context.

To resolve this, the build script now ensures that an (empty) ui directory is created before building the debian-dev image, so the COPY ui/ /usr/local/apisix/ui/ step always succeeds even when no UI assets are present.

Which issue(s) this PR fixes:

Fixes #

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

Signed-off-by: Sihyeon Jang <sihyeon.jang@navercorp.com>
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Nov 18, 2025
@Baoyuantop
Copy link
Copy Markdown
Contributor

Hi @sihyeonn, you can merge the latest main branch to make CI pass.

@sihyeonn
Copy link
Copy Markdown
Contributor Author

Hi @sihyeonn, you can merge the latest main branch to make CI pass.

Thank you for your review! But I still need 2 more reviews to merge 🥲 Merging is blocked!

@Baoyuantop
Copy link
Copy Markdown
Contributor

The failed test appears to be unrelated to this change and has already been fixed in the main branch.

Copy link
Copy Markdown
Member

@SkyeYoung SkyeYoung left a comment

Choose a reason for hiding this comment

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

🤔 What you're doing is feasible, but currently, the debian-dev build is used like this: https://github.com/apache/apisix/blob/master/.github/workflows/push-dev-image-on-commit.yml#L37-L54

So I think, you might as well move the part of building the UI directly into the Makefile.

Or is your idea that you don’t want a UI?

@SkyeYoung SkyeYoung requested a review from bzp2010 November 21, 2025 08:31
@Baoyuantop Baoyuantop added the wait for update wait for the author's response in this issue/PR label Nov 26, 2025
@sihyeonn
Copy link
Copy Markdown
Contributor Author

sihyeonn commented Dec 9, 2025

Hi @SkyeYoung, thanks for the review!

Yes, this is for use cases where the UI is not needed.

I use make build-on-debian-dev locally when testing just the gateway functionality without the UI, and the build fails at the COPY step when the ui directory doesn't exist.

Moving the UI build from the workflow into the Makefile as you suggested is one approach, but it would increase build time and complexity for development environments where the UI isn't necessary.

The current fix just creates an empty directory to allow builds to succeed without UI assets - it's a minimal change. Do you think there's a better approach to handle this?

@Baoyuantop Baoyuantop removed wait for update wait for the author's response in this issue/PR user responded labels Dec 10, 2025
@Baoyuantop
Copy link
Copy Markdown
Contributor

Hi @sihyeonn, thank you for your contribution, but we are unsure if this requirement aligns with the needs of most users, so we need more discussion on this topic within the community.

@Baoyuantop Baoyuantop added discuss and removed bug Something isn't working labels Dec 19, 2025
@sihyeonn
Copy link
Copy Markdown
Contributor Author

Hi @Baoyuantop, I think the direction here is appropriate and consistent with the existing pattern. It’s just a bit disappointing to hear that it doesn’t fully align with the current approach, since applying the same func_check_folder behavior to ui seems like a natural extension of how it’s already used (e.g., for release).

@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 4 weeks if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Feb 28, 2026
Comment thread Makefile
shasum -a 512 $(project_release_name).tgz > $(project_release_name).tgz.sha512

$(call func_check_folder,release)
$(call func_check_folder, release)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please retain spaces.

Comment thread Makefile
.PHONY: build-on-debian-dev
build-on-debian-dev:
@$(call func_echo_status, "$@ -> [ Start ]")
$(call func_check_folder, ui)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
$(call func_check_folder, ui)
$(call func_check_folder,ui)

@Baoyuantop Baoyuantop added wait for update wait for the author's response in this issue/PR and removed user responded labels Mar 11, 2026
@github-actions github-actions Bot removed the stale label Mar 11, 2026
@moonming moonming closed this Mar 16, 2026
@moonming
Copy link
Copy Markdown
Member

Hi @sihyeonn, thank you for looking into the build/Makefile issue!

After reviewing the discussion thread (7 comments), it seems there wasn't a clear consensus on the right approach for the ui/ directory handling. Given that:

  1. This is a build configuration change with differing opinions on the correct solution
  2. The change is small (3 lines) but touches infrastructure that affects all build environments
  3. The discussion hasn't converged on a direction

I think we should close this PR for now and revisit the ui/ directory question as part of a broader build system review. If you'd like to continue this discussion, opening an issue might be a better venue to reach consensus first before implementing.

Thank you for the contribution, and I hope you'll continue contributing to APISIX! 🙏

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

Labels

discuss size:XS This PR changes 0-9 lines, ignoring generated files. wait for update wait for the author's response in this issue/PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants