#598  Build fired repeatedly in some cases
Released
lainnetwork opened 2 years ago

您好,如题所述,今天我升级到了6.3.10后,配置没有改变的情况下,构建任务会自动重新运行多次,除非手动停下来。。如图所示:image.png 等我发现的时候已经重复跑了500多次了TAT... 自动重跑的日志如下: image_2.png 我的配置也没有自己依赖自己呀,如图: image_3.png 不知道是不是自动升级出了什么问题?

Robin Shen commented 2 years ago

能创建一个简单的buildspec来复现这个问题吗?

lainnetwork commented 2 years ago
version: 15
jobs:
- name: build static web
  steps:
  - !CheckoutStep
    name: checkout
    cloneCredential: !DefaultCredential {}
    withLfs: false
    withSubmodules: true
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !CommandStep
    name: command
    runInContainer: true
    image: node:16.3.0
    interpreter: !DefaultInterpreter
      commands:
      - npm install
      - npm run build
      - ls
    useTTY: false
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !PublishArtifactStep
    name: publish Artifacts
    artifacts: dist/
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  triggers:
  - !BranchUpdateTrigger
    branches: master
  retryCondition: never
  maxRetries: 3
  retryDelay: 30
  cpuRequirement: 250
  memoryRequirement: 128
  timeout: 3600
- name: Sync Main
  steps:
  - !CheckoutStep
    name: Check Out
    cloneCredential: !DefaultCredential {}
    withLfs: false
    withSubmodules: true
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  - !CommandStep
    name: Sync To Github
    runInContainer: true
    image: alpine/git:v2.30.2
    interpreter: !DefaultInterpreter
      commands:
      - git push -f https://oauth2:@secret:githubAccessToken@@@github.com/LainNetWork/hana-web
        HEAD:main
    useTTY: false
    condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
  triggers:
  - !DependencyFinishedTrigger {}
  jobDependencies:
  - jobName: build static web
    requireSuccessful: true
    artifacts: '**'
  retryCondition: never
  maxRetries: 3
  retryDelay: 30
  cpuRequirement: 250
  memoryRequirement: 128
  timeout: 3600

lainnetwork commented 2 years ago

@robin 您可以试一下这个,我测试了一下,移除了依赖的SyncMain任务后,就不会重复构建了,感觉和构建任务的依赖有关

Robin Shen commented 2 years ago

非常感谢,找到问题所在了。

Robin Shen changed title 2 years ago
Previous Value Current Value
升级到6.3.10后,出现自动重复构建的问题
Build fired repeatedly in some cases
OneDev changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
OneDev commented 2 years ago

State changed as code fixing the issue is committed

OneDev changed state to 'Released' 2 years ago
Previous Value Current Value
Closed
Released
OneDev commented 2 years ago

State changed as build #2335 is successful

lainnetwork commented 2 years ago

感谢修复,经过一段时间的使用,没有再复现这个问题,已推荐给其他朋友使用了:+1:

issue 1 of 1
Type
Bug
Priority
Major
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (4)
Reference
onedev/server#598
Please wait...
Page is in error, reload to recover