Closed miszo closed 2 years ago
Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience.
I wonder why I'm getting the message like this in dashboard step
Resolving repository path...
Retrieving changes between 4edc0786a63e176c429514293013c787b5d68018 (develop) → 4766508dda1eb2aa0024a5993125cd28ad15976d (chore/merge-quality-gate)
Getting diff...
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
grep: /tmp/527d24c3-451b-4168-9d1f-bce23c6fffa2.txt:1: Unmatched [, [^, [:, [., or [=
@miszo Can you try changing the glob pattern
FROM
- app_scope: dashboard
package_path: ./apps/dashboard
eslint_flags: '**/*.{ts,tsx}'
files: |
apps/dashboard/**/*
packages/app-config/**/*
packages/jest-config/**/*
packages/linters-config/**/*
packages/tsconfig/**/*
packages/types/**/*
packages/ui/**/*
packages/webpack-loaders/**/*
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
TO
- app_scope: dashboard
package_path: ./apps/dashboard
eslint_flags: '**/*.{ts,tsx}'
files: |
apps/dashboard/**
packages/app-config/**
packages/jest-config/**
packages/linters-config/**
packages/tsconfig/**
packages/types/**
packages/ui/**
packages/webpack-loaders/**
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
@jackton1, actually I've tried that also. With the same result.
@miszo Can you verify the output of the tempfile
Run:
find /tmp -type f -name "*.txt" -exec head -n5 {} \;
After executing tj-actions/changed-files action
@jackton1, should I search for something specific in the tempfile? You know, it is a private repo with client-facing platform, and I'm not comfortable to share this publicly. Maybe I can send you this file through some private channel? E-mail perhaps?
@jackton1, here's the private repo with the file output. I've sent you an invitation.
@miszo Thanks the output looks correct, I’ll spend sometime debugging this.
Found the issue I’ll create a fix later today
@jackton1, I've just tried to use action from branch fix/bug-with-pattern-matching
and I'm getting the same results as before 😿
Here's log for the dashboard
app:
Run tj-actions/changed-files@fix/bug-with-pattern-matching
with:
files: apps/dashboard/**
packages/app-config/**
packages/jest-config/**
packages/linters-config/**
packages/tsconfig/**
packages/types/**
packages/ui/**
packages/webpack-loaders/**
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
token: ***
separator:
files_separator:
files_ignore_separator:
sha: 4d477[2](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:2)d5e7407d6829e[3](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:3)68[4](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:4)b12d0c7b1811e43f[5](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:5)
since_last_remote_commit: false
use_fork_point: false
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
Run # "Set base sha..."
Run # "Calculating the previous and current SHA..."
changed-files-diff-sha
Run tj-actions/glob@v7.13
with:
files: apps/dashboard/**
packages/app-config/**
packages/jest-config/**
packages/linters-config/**
packages/tsconfig/**
packages/types/**
packages/ui/**
packages/webpack-loaders/**
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
files-separator:
escape-paths: true
excluded-files-separator:
base-sha: be7c[6](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:6)fbeb28d8f9439582d1936aa2a3f269d[7](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:7)59a
sha: 4d4772d5e7407d6[8](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:8)2[9](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:9)e3684b12d0c7b18[11](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:11)e43f5
include-deleted-files: true
separator: |
files-from-source-file-separator:
excluded-files-from-source-file-separator:
follow-symbolic-links: true
strip-top-level-dir: true
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
/usr/bin/git rev-parse --show-toplevel
/home/runner/work/**REDACTED**
/usr/bin/git diff --diff-filter=D --name-only be7c6fbeb28d8f9439582d1936aa2a3f269d759a 4d4772d5e7407d6829e3684b[12](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:12)d0c7b1811e43f5
.github/workflows/dashboard-quality-gate.yml
.github/workflows/homepage-quality-gate.yml
.github/workflows/storybook-quality-gate.yml
.github/workflows/ui-quality-gate.yml
Successfully created paths-output-file: /tmp/d3e95ebe-37fd-43ac-b01c-ca270a[13](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:13)069d.txt
Run bash $GITHUB_ACTION_PATH/entrypoint.sh
bash $GITHUB_ACTION_PATH/entrypoint.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
GITHUB_ACTION_PATH: /home/runner/work/_actions/tj-actions/changed-files/fix/bug-with-pattern-matching
INPUT_FILES_PATTERN_FILE: /tmp/d3e95ebe-37fd-43ac-b01c-ca270a13069d.txt
INPUT_SEPARATOR:
INPUT_PATH:
INPUT_PREVIOUS_SHA: be7c6fbeb28d8f9439582d1936aa2a3f269d759a
INPUT_CURRENT_SHA: 4d4772d5e7407d6829e3684b12d0c7b[18](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:18)11e43f5
INPUT_TARGET_BRANCH: develop
INPUT_CURRENT_BRANCH: chore/merge-quality-gate
changed-files
Resolving repository path...
Retrieving changes between be7c6fbeb28d8f9439582d[19](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:19)36aa2a3f[26](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:26)9d759a (develop) → 4d4772d5e7407d6829e3684b12d0c7b[181](https://github.com/**REDACTED**/runs/5738809273?check_suite_focus=true#step:3:181)1e43f5 (chore/merge-quality-gate)
Getting diff...
Non Matching changed files: .github/workflows/quality-gate.yml apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx apps/dashboard/src/common/transforms/parseDate/parseDate.ts apps/homepage/src/components/organisms/RfpModal/OfficeForm.tsx packages/ui/components/NavigationBar/NavigationBar.tsx
Non Matching modified files: .github/workflows/dashboard-quality-gate.yml .github/workflows/homepage-quality-gate.yml .github/workflows/quality-gate.yml .github/workflows/storybook-quality-gate.yml .github/workflows/ui-quality-gate.yml apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx apps/dashboard/src/common/transforms/parseDate/parseDate.ts apps/homepage/src/components/organisms/RfpModal/OfficeForm.tsx packages/ui/components/NavigationBar/NavigationBar.tsx
Non Matching deleted files: .github/workflows/dashboard-quality-gate.yml .github/workflows/homepage-quality-gate.yml .github/workflows/storybook-quality-gate.yml .github/workflows/ui-quality-gate.yml
Added files:
Copied files:
Deleted files:
Modified files:
Renamed files:
Type Changed files:
Unmerged files:
Unknown files:
All changed and modified files:
All changed files:
All modified files:
@jackton1, there's no log about grep error, but the outcome is the same.
@jackton1, looks like last change resolved the issue for dashboard
.
Run tj-actions/changed-files@fix/bug-with-pattern-matching
with:
files: apps/dashboard/**
packages/app-config/**
packages/jest-config/**
packages/linters-config/**
packages/tsconfig/**
packages/types/**
packages/ui/**
packages/webpack-loaders/**
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
token: ***
separator:
files_separator:
files_ignore_separator:
sha: 3ccf5234dc28c9ce4c1b695758a0456acd450489
since_last_remote_commit: false
use_fork_point: false
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
Run # "Set base sha..."
Run # "Calculating the previous and current SHA..."
changed-files-diff-sha
Run tj-actions/glob@v7.14
with:
files: apps/dashboard/**
packages/app-config/**
packages/jest-config/**
packages/linters-config/**
packages/tsconfig/**
packages/types/**
packages/ui/**
packages/webpack-loaders/**
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
files-separator:
escape-paths: true
excluded-files-separator:
base-sha: be7c6fbeb28d8f9439582d1936aa2a3f269d759a
sha: 3ccf5234dc28c9ce4c1b695758a0456acd450489
include-deleted-files: true
separator: |
files-from-source-file-separator:
excluded-files-from-source-file-separator:
follow-symbolic-links: true
strip-top-level-dir: true
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
/usr/bin/git rev-parse --show-toplevel
/home/runner/work/**REDACTED**
/usr/bin/git diff --diff-filter=D --name-only be7c6fbeb28d8f9439582d1936aa2a3f269d759a 3ccf5234dc28c9ce4c1b695758a0456acd450489
.github/workflows/dashboard-quality-gate.yml
.github/workflows/homepage-quality-gate.yml
.github/workflows/storybook-quality-gate.yml
.github/workflows/ui-quality-gate.yml
Successfully created paths-output-file: /tmp/dca9856d-2c5c-4432-a6a3-46b49fef9c00.txt
Run bash $GITHUB_ACTION_PATH/entrypoint.sh
changed-files
Resolving repository path...
Retrieving changes between be7c6fbeb28d8f9439582d1936aa2a3f269d759a (develop) → 3ccf5234dc28c9ce4c1b695758a0456acd450489 (chore/merge-quality-gate)
Getting diff...
Matching changed files: apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx|apps/dashboard/src/common/transforms/parseDate/parseDate.ts|packages/ui/components/NavigationBar/NavigationBar.tsx
Non Matching changed files: .github/workflows/quality-gate.yml apps/homepage/src/components/organisms/RfpModal/OfficeForm.tsx
Matching modified files: apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx|apps/dashboard/src/common/transforms/parseDate/parseDate.ts|packages/ui/components/NavigationBar/NavigationBar.tsx
Non Matching modified files: .github/workflows/dashboard-quality-gate.yml .github/workflows/homepage-quality-gate.yml .github/workflows/quality-gate.yml .github/workflows/storybook-quality-gate.yml .github/workflows/ui-quality-gate.yml apps/homepage/src/components/organisms/RfpModal/OfficeForm.tsx
Non Matching deleted files: .github/workflows/dashboard-quality-gate.yml .github/workflows/homepage-quality-gate.yml .github/workflows/storybook-quality-gate.yml .github/workflows/ui-quality-gate.yml
Added files:
Copied files:
Deleted files:
Modified files: apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx apps/dashboard/src/common/transforms/parseDate/parseDate.ts packages/ui/components/NavigationBar/NavigationBar.tsx
Renamed files:
Type Changed files:
Unmerged files:
Unknown files:
All changed and modified files: apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx apps/dashboard/src/common/transforms/parseDate/parseDate.ts packages/ui/components/NavigationBar/NavigationBar.tsx
All changed files: apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx apps/dashboard/src/common/transforms/parseDate/parseDate.ts packages/ui/components/NavigationBar/NavigationBar.tsx
All modified files: apps/dashboard/src/common/layouts/DashboardLayout/DashboardLayout.stories.tsx apps/dashboard/src/common/transforms/parseDate/parseDate.ts packages/ui/components/NavigationBar/NavigationBar.tsx
Let me just try last time with all packages and apps.
@miszo Oh okay, it should be resolved for all apps now using the latest release.
@jackton1, it works for most of the cases, but for some reason it doesn't work when I change only GitHub workflow definition files.
Here's the log:
Run tj-actions/changed-files@v18.5
with:
files: apps/homepage/**
packages/app-config/**
**/actions/checkout-remote-actions/action.yml
**/workflows/quality-gate.yml
token: ***
separator:
files_separator:
files_ignore_separator:
sha: ccf71c5b1ac4a814506fc[2](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:2)e0181ae52fc6ecfcc1
since_last_remote_commit: false
use_fork_point: false
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
Run # "Set base sha..."
Run # "Calculating the previous and current SHA..."
changed-files-diff-sha
Run tj-actions/glob@v7.14
with:
files: apps/homepage/**
packages/app-config/**
**/actions/checkout-remote-actions/action.yml
**/workflows/quality-gate.yml
files-separator:
escape-paths: true
excluded-files-separator:
base-sha: be7c6fbeb28d8f94[3](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:3)9582d1936aa2a3f269d759a
sha: ccf71c5b1ac[4](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:4)a814[5](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:5)0[6](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:6)fc2e0181ae52fc6ecfcc1
include-deleted-files: true
separator: |
files-from-source-file-separator:
excluded-files-from-source-file-separator:
follow-symbolic-links: true
strip-top-level-dir: true
env:
REVIEWDOG_LEVEL: error
REVIEWDOG_FILTER_MODE: file
REVIEWDOG_REPORTER: github-pr-review
/usr/bin/git rev-parse --show-toplevel
/home/runner/work/**REDACTED**
/usr/bin/git diff --diff-filter=D --name-only be[7](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:7)c6fbeb2[8](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:8)d8f[9](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:9)439582d1936aa2a3f269d759a ccf71c5b1ac4a8[14](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:14)506fc2e0181ae52fc6ecfcc1
.github/workflows/dashboard-quality-gate.yml
.github/workflows/homepage-quality-gate.yml
.github/workflows/storybook-quality-gate.yml
.github/workflows/ui-quality-gate.yml
Successfully created paths-output-file: /tmp/3fe3ce[16](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:16)-71bf-4ac3-a20f-22a33ba05d40.txt
Run bash $GITHUB_ACTION_PATH/entrypoint.sh
changed-files
Resolving repository path...
Retrieving changes between be7c6fbeb28d8f9439582d1936aa2a3f269d759a (develop) → ccf71c5b1ac4a814506fc2e0[18](https://github.com/**REDACTED**/runs/5740322474?check_suite_focus=true#step:3:18)1ae52fc6ecfcc1 (chore/merge-quality-gate)
Getting diff...
Non Matching changed files: .github/workflows/conventional-pull-requests.yml .github/workflows/dashboard-build.yml .github/workflows/homepage-build.yml .github/workflows/label.yml .github/workflows/pr-meme.yml .github/workflows/quality-gate.yml .github/workflows/storybook-build.yml
Non Matching modified files: .github/workflows/conventional-pull-requests.yml .github/workflows/dashboard-build.yml .github/workflows/dashboard-quality-gate.yml .github/workflows/homepage-build.yml .github/workflows/homepage-quality-gate.yml .github/workflows/label.yml .github/workflows/pr-meme.yml .github/workflows/quality-gate.yml .github/workflows/storybook-build.yml .github/workflows/storybook-quality-gate.yml .github/workflows/ui-quality-gate.yml
Non Matching deleted files: .github/workflows/dashboard-quality-gate.yml .github/workflows/homepage-quality-gate.yml .github/workflows/storybook-quality-gate.yml .github/workflows/ui-quality-gate.yml
Added files:
Copied files:
Deleted files:
Modified files:
Renamed files:
Type Changed files:
Unmerged files:
Unknown files:
All changed and modified files:
All changed files:
All modified files:
And I've tried with both:
files: |
apps/homepage/**
packages/app-config/**
**/actions/checkout-remote-actions/action.yml
**/workflows/quality-gate.yml
and
files: |
apps/homepage/**
packages/app-config/**
.github/actions/checkout-remote-actions/action.yml
.github/workflows/quality-gate.yml
@miszo The pattern looks off .github/workflows/quality-gate.yml
would need to be .github/workflows/*-quality-gate.yml
to match .github/workflows/homepage-quality-gate.yml
@jackton1, but I've modified .github/workflows/quality-gate.yml
file and deleted .github/workflows/homepage-quality-gate.yml
. So, I assume that it should mark the file .github/workflows/quality-gate.yml
as modified.
Generally, I've merged .github/workflows/dashboard-quality-gate.yml
, .github/workflows/homepage-quality-gate.yml
, .github/workflows/storybook-quality-gate.yml
, .github/workflows/ui-quality-gate.yml
into one .github/workflows/quality-gate.yml
.
So in this case files .github/workflows/dashboard-quality-gate.yml
, .github/workflows/homepage-quality-gate.yml
, .github/workflows/storybook-quality-gate.yml
, .github/workflows/ui-quality-gate.yml
are fitting perfectly in Non Matching deleted files
category, but I think that .github/workflows/quality-gate.yml
should be in All modified files
@miszo Strange this works as expected from the test: https://github.com/tj-actions/changed-files/runs/5740545078?check_suite_focus=true#step:17:103
I’ll recommend verifying that the diff actually contains changes related to the workflows files listed.
You might optionally need to enable since_last_remote_commit
Hm... that's weird. I'll try to reproduce it in public repository and then send you the link.
Hi @jackton1, I've reproduced the situation in public repository – you can verify the outcome here https://github.com/miszo/tj-actions_changed-files/actions/workflows/quality-gate.yml
I've added you as a contributor to the repo, so feel free to create another branch and play with the patterns.
@jackton1, It works a charm! Thanks for the fix!
Have a great day!
No worries. Thanks for creating the public/private repositories they were super helpful in resolving this.
Is there an existing issue for this?
Does this issue exist in the latest version?
Describe the bug?
Files that are modified in the pull request are being somehow skipped. It is funny because I do it for 3 packages in monorepo and
dashboard
is the only one that acts this way.To Reproduce
homepage
anddashboard
andui
package in turborepo.ui
,homepage
anddashboard
to test it jobs are triggering.ui
andhomepage
works as expected -dashboard
have issues.What OS are you seeing the problem on?
ubuntu-latest or ubuntu-20.04
Expected behavior?
If files from the provided files list are modified, then they should be recognized as modified files.
Relevant log output
Anything else?
No response
Code of Conduct