Skip to content

RestServer - add image regex to limit the valid image - #107

Merged
Yuting Jiang (yukirora) merged 7 commits into
devfrom
yutji/add-config-forceacr
Nov 7, 2025
Merged

RestServer - add image regex to limit the valid image#107
Yuting Jiang (yukirora) merged 7 commits into
devfrom
yutji/add-config-forceacr

Conversation

@yukirora

@yukirora Yuting Jiang (yukirora) commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

Major Revision

  • RestServer - add image regex to limit the valid image

Copilot AI review requested due to automatic review settings October 24, 2025 07:57

Copilot AI left a comment

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.

Pull Request Overview

This PR adds a configurable option to control whether container images must be pulled from Azure Container Registry (ACR). The feature allows administrators to enforce or relax ACR-only image requirements based on deployment needs.

Key changes:

  • Added forceAcr configuration option that can be set via environment variable
  • Made ACR validation conditional based on the new configuration flag
  • Set default value to false for backward compatibility

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/rest-server/src/middlewares/v2/quota.js Wrapped existing ACR validation logic in conditional check based on forceAcr config
src/rest-server/src/config/launcher.js Added forceAcr configuration property parsed from FORCE_ACR environment variable
src/rest-server/deploy/rest-server.yaml.template Added FORCE_ACR environment variable to deployment template with conditional logic
src/rest-server/config/rest-server.yaml Added default force_acr: false configuration value

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

Comment thread src/rest-server/deploy/rest-server.yaml.template Outdated
Comment thread src/rest-server/src/config/launcher.js Outdated
Comment thread src/rest-server/src/middlewares/v2/quota.js Outdated
@yukirora Yuting Jiang (yukirora) changed the title RestServer - add option for force to pull image from acr or not RestServer - add image regex to limit the valid image Nov 4, 2025
@yukirora Yuting Jiang (yukirora) mentioned this pull request Nov 4, 2025
26 tasks

@hippogr Rui Gao (hippogr) left a comment

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.

Overall it is good to merge except one of my little questions. I will approve it.

Comment thread src/rest-server/src/middlewares/v2/protocol.js
Comment thread src/rest-server/deploy/rest-server.yaml.template Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js
Comment thread src/rest-server/src/middlewares/v2/protocol.js
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js

Copilot AI left a comment

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.

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/rest-server/src/middlewares/v2/protocol.js
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js Outdated
Comment thread src/rest-server/src/middlewares/v2/protocol.js
Comment thread src/rest-server/src/utils/error.d.ts
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.

4 participants