Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多项目部署 domainAuto,绑定域名紊乱 #371

Closed
wss-git opened this issue Oct 22, 2021 · 1 comment
Closed

多项目部署 domainAuto,绑定域名紊乱 #371

wss-git opened this issue Oct 22, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wss-git
Copy link
Member

wss-git commented Oct 22, 2021

预期 customDomains 会绑定自己的函数上面,但是结果是仅仅绑定到了 express 这个项目上面

edition: 1.0.0          #  命令行YAML规范版本,遵循语义化版本(Semantic Versioning)规范
name: app       #  项目名称
access: yunxi

vars:
  region: cn-qingdao
  service:
    name: serverless-devs-custom-nodejs
    description: 'Serverless Devs示例: Express.js framework service'
    logConfig: auto
  triggers:
    - name: httpTrigger
      type: http
      config:
        authType: anonymous
        methods:
          - GET
  customDomains:
    - domainName: auto
      protocol: HTTP
      routeConfigs:
        - path: '/*'

services:
  express:
    component: devsapp/fc
    props:
      region: ${vars.region}
      service: ${vars.service}
      function:
        name: express
        description: express
        runtime: custom
        ossBucket: wss-demo
        codeUri: ./express
        handler: index.handler
        memorySize: 256
        timeout: 30
        environmentVariables:
          ENABLE_TS_REMOTE_DEBUG: "true"
      triggers: ${vars.triggers}
      customDomains: ${vars.customDomains}
  
  koa:
    component: devsapp/fc
    props:
      region: ${vars.region}
      service: ${vars.service}
      function:
        name: koa
        description: koa
        runtime: custom
        ossBucket: wss-demo
        codeUri: ./koa
        handler: index.handler
        memorySize: 256
        timeout: 30
        environmentVariables:
          ENABLE_TS_REMOTE_DEBUG: "true"
      triggers: ${vars.triggers}
      customDomains: ${vars.customDomains}
  
  egg:
    component: devsapp/fc
    props:
      region: ${vars.region}
      service: ${vars.service}
      function:
        name: egg
        description: egg
        runtime: custom
        ossBucket: wss-demo
        codeUri: ./egg
        handler: index.handler
        memorySize: 256
        timeout: 30
        environmentVariables:
          ENABLE_TS_REMOTE_DEBUG: "true"
      triggers: ${vars.triggers}
      customDomains: ${vars.customDomains}

  next:
    component: devsapp/fc
    props:
      region: ${vars.region}
      service: ${vars.service}
      function:
        name: next
        description: next
        runtime: custom
        ossBucket: wss-demo
        codeUri: ./egg
        handler: index.handler
        memorySize: 256
        timeout: 30
        environmentVariables:
          ENABLE_TS_REMOTE_DEBUG: "true"
      triggers: ${vars.triggers}
      customDomains: ${vars.customDomains}
@wss-git
Copy link
Member Author

wss-git commented Oct 25, 2021

测试结果:直接操作 inputs 会污染下次执行的入参,所以根据 fc-deploy 的逻辑仅会绑定到第一个服务和函数。问题解决:
步骤1. 组件操作 inputs 深拷贝的副本,先修复一下这个问题
步骤2. @heimanba 麻烦看看为什么会污染入参。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants