only_commits.files not honored

mperron's Avatar

mperron

18 Apr, 2019 03:19 PM

The issue closed here still happens.

To give you a concrete example:

Given this appveyor.yml config:

version: 1.0.{build}
environment:
  nodejs_version: 6
branches:
  only:
  - master
  - beta
  - staging
image: Ubuntu
only_commits:
  files:
    - backend/posserver/*/
[...]

This build 23947410 was triggered by this commit 242f8c1, which modified the following files:

+1 -0 M CHANGELOG.md
+1 -1 M backend/api/services/ordering/OrderingApi/DI/DIRegistry.cs
+31 -0 A backend/api/services/ordering/OrderingApi/GraphQL/Queries/MinimumAmountResolver.cs
+8 -1 M backend/api/services/ordering/OrderingApi/GraphQL/Types/Restaurants/OrderModeType.cs
+16 -4 M backend/api/services/ordering/OrderingData/Gps/DeliveryAreaSpecs.cs
+13 -0 M backend/api/services/ordering/OrderingDomain/Models/Restaurants/Franchise.cs
+1 -1 M backend/api/services/ordering/OrderingDomain/Models/Restaurants/IDeliveryAreaSpecs.cs
+2 -2 M backend/api/services/ordering/OrderingDomain/Services/Franchises/ChangeFranchiseModeService.cs
+2 -2 M backend/api/services/ordering/OrderingDomain/Services/OrderService.cs
+2 -1 R backend/api/services/ordering/OrderingDomain/Services/Orders/Fees/ { IOrderDeliveryFeeService.cs → IOrderDeliveryService.cs } (67% similar)
+19 -2 R backend/api/services/ordering/OrderingDomain/Services/Orders/Fees/ { OrderDeliveryFeesService.cs → OrderDeliveryService.cs } (74% similar)
+2 -2 M backend/api/services/ordering/Tests.OrderingDomain/Services/Franchises/ChangeFranchiseModeServiceTest.cs

... none of which touches anything near backend/posserver/**/*.

We have 10 different projects hooked to a mono-repo. All of them have a specific appveyor.yml config with a only_commits.files rules that point to different paths.

The issue appears quite often, so much that at some points in the day we're constantly building and have a big queue of builds and it deplays our releases.

It does seem kind of random though: sometimes touching a single file will trigger the 10 projects to build, sometimes only the proper projects build.

We have a file at the root (CHANGELOG.md) in which we manage our changelog for all projects. It's modified in every PR. Could that be causing the issue?

  1. Support Staff 1 Posted by Owen McDonnell on 19 Apr, 2019 01:59 PM

    Owen McDonnell's Avatar

    Can you please post your full appveyor.yaml.

  2. 2 Posted by mperron on 23 Apr, 2019 09:13 PM

    mperron's Avatar

    Here it is:

    /ueat/backend/posserver/appveyor.yml

    version: 1.0.{build}
    environment:
      priv_key:
        secure: [redacted]
      nodejs_version: 6
    branches:
      only:
      - master
      - beta
      - staging
    image: Ubuntu
    only_commits:
      files:
        - backend/posserver/**/*
    install:
    - sh: >-
        curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
        sudo apt-get install -y nodejs
        nvm use v8
        npm install -g yarn
    cache:
    - '%LOCALAPPDATA%\Yarn'
    - backend/posserver/node_modules
    build_script:
    - sh: >-
        cd backend/posserver
        yarn
        yarn build
        7z a build.zip package.json yarn.lock release config deploy.ps1
        appveyor PushArtifact build.zip -DeploymentName ueat-pos-server
    test_script:
    - cmd: yarn test
    deploy:
    - provider: Environment
      name: ueat-mtl-beta-posserver
      on:
        branch: master
    - provider: Environment
      name: ueat-mtl-staging-posserver
      on:
        branch: staging
    notifications:
    - provider: Slack
      incoming_webhook: https://hooks.slack.com/services/[redacted]
      on_build_success: false
      on_build_failure: true
      on_build_status_changed: true
    
  3. 3 Posted by mperron on 23 Apr, 2019 09:17 PM

    mperron's Avatar

    Here's why it's such an issue:

    A single commit touching a file under ueat/frontend/order-app/ triggers builds on every projects, even if they are configured exactly like the one above (with only_commits.files)

    https://imgur.com/MUnjADX

  4. Support Staff 4 Posted by Owen McDonnell on 26 Apr, 2019 11:58 PM

    Owen McDonnell's Avatar

    Can you try to remove the wildcards, i.e. backend/posserver/ and see if that changes anything.

  5. Ilya Finkelshteyn closed this discussion on 27 Jun, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac