Comments (12)
Of course! I have some thoughts about the developer experience if you would be interested.
It looks like it's cleared up as far as I can tell. I have a few more PR's out that I would like to check before closing for good
from gitstream.
Ill be happy to hear from you!
This is my email: [email protected]
You can send me email and we can schedule a call with the product team/ open some chat with them :)
from gitstream.
I'm getting a similar bug where GitStream runs in the first commit of a PR, but on any subsequent commits it shows the GitStream check as skipped. Would you like me to open another issue or continue here?
from gitstream.
@ianwesleyarmstrong can you please attach here your gitstream.cm
file + repository and PR number?
thanks!
from gitstream.
Thanks! The repo is opencareer/tf-infra
and it started on PR #75. On the newer PR's it is showing as successful, but the workflow isn't actually getting triggered.
gitstream.cm
# -*- mode: yaml -*-
manifest:
version: 1.0
automations:
welcome_message:
if:
- {{ repo.contributors | isFirstCommit(branch.author) }}
run:
- action: add-comment@v1
args:
comment: |
Welcome @{{ pr.author }}!
estimated_time_to_review:
if:
- true
run:
- action : add-label@v1
args:
label: '{{ calc.etr }} min review'
color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}
safe_changes:
# The `if` key has a list of conditions, each condition is specified as a Jinja expression
# in a double curly braces. Expressions are evaluated by gitStream on a PR when triggered.
if:
# Given the PR code changes, check that only formatting changes were made
- {{ is.formatting or is.docs or is.tests }}
# `run` key has a list of actions, which are executed one by one whenever the automation
# conditions are met.
run:
# When the changes are validated as formatting only, you can help to speed up the review
# by adding a label that marks it accordingly.
- action: add-label@v1
args:
label: 'safe-changes'
# You can uncomment the following action to get gitStream can even automatically approve
# such PRs to save reviewers time for such changes.
# - action: approve@v1
admin_autoapprove:
if:
- {{ is.admin }}
run:
- action: approve@v1
review_cicd:
if:
- {{ files | match(regex=r/.github\/workflows\/.*\.yml/) | some }}
run:
- action: add-reviewers@v1
args:
team_reviewers: [infrastructure]
snowflake_access:
if:
- {{ is.snowflake_access }}
run:
- action: add-reviewers@v1
args:
team_reviewers: [snowflake-infrastructure]
- action: add-comment@v1
args:
comment: |
Snowflake ...
aws_changes:
if:
- {{ is.aws and not is.admin }}
run:
- action: add-label@v1
args:
label: 'aws'
- action: add-reviewers@v1
args:
team_reviewers: [aws-infrastructure]
snowflake_changes:
if:
- {{ is.snowflake and not is.admin }}
run:
- action: add-label@v1
args:
label: 'snowflake'
- action: add-reviewers@v1
args:
team_reviewers: [snowflake-infrastructure]
calc:
etr: {{ branch | estimatedReviewTime }}
is:
formatting: {{ source.diff.files | isFormattingChange }}
docs: {{ files | allDocs }}
tests: {{ files | allTests }}
terragrunt: {{ files | match(regex=r/(...)\/terragrunt.hcl/) | some }}
admin: {{ pr.author | includes(list=['ianwesleyarmstrong']) }}
aws: {{ files | match(regex=r/aws\/(...)/) | some }}
snowflake: {{ files | match(regex=r/snowflake\/(...)/) | some }}
snowflake_access: {{ files | match(regex=r/(...)\/(roles)|(users)\.yaml/) | some }}
from gitstream.
i'm now running into this error as well:
Running tag v1.76
Already on 'share-refresh'
Already on 'share-refresh'
ARGS: { regex: /.github\/workflows\/.*\.yml/, __keywords: true }
ARGS: { regex: /(...)\/terragrunt.hcl/, __keywords: true }
/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:577
return file.includes(term);
^
TypeError: Cannot read properties of null (reading 'includes')
at /node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:577:17
at Array.some (<anonymous>)
at Context.parseIncludes (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:576:114)
at eval (eval at _compile (/node_modules/nunjucks/src/environment.js:633:18), <anonymous>:38:59)
at _callee$ (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:778:13)
at tryCatch (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:96:17)
at Generator._invoke (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:76:24)
at Generator.next (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:127:21)
at asyncGeneratorStep (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:360:24)
at _next (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:382:9)
from gitstream.
@ianwesleyarmstrong Hi, is it possible to also add the following automation to the gitstream.cm file?
Commit to main branch and merge it to the HEAD branch and share the results here?
debug_context:
if:
- true
run:
- action: add-comment@v1
args:
comment: |
{{ pr | dump | safe }}
Here is the complete gitstream.cm:
manifest:
version: 1.0
automations:
welcome_message:
if:
- {{ repo.contributors | isFirstCommit(branch.author) }}
run:
- action: add-comment@v1
args:
comment: |
Welcome @{{ pr.author }}!
estimated_time_to_review:
if:
- true
run:
- action : add-label@v1
args:
label: '{{ calc.etr }} min review'
color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}
safe_changes:
# The `if` key has a list of conditions, each condition is specified as a Jinja expression
# in a double curly braces. Expressions are evaluated by gitStream on a PR when triggered.
if:
# Given the PR code changes, check that only formatting changes were made
- {{ is.formatting or is.docs or is.tests }}
# `run` key has a list of actions, which are executed one by one whenever the automation
# conditions are met.
run:
# When the changes are validated as formatting only, you can help to speed up the review
# by adding a label that marks it accordingly.
- action: add-label@v1
args:
label: 'safe-changes'
# You can uncomment the following action to get gitStream can even automatically approve
# such PRs to save reviewers time for such changes.
# - action: approve@v1
admin_autoapprove:
if:
- {{ is.admin }}
run:
- action: approve@v1
review_cicd:
if:
- {{ files | match(regex=r/.github\/workflows\/.*\.yml/) | some }}
run:
- action: add-reviewers@v1
args:
team_reviewers: [infrastructure]
snowflake_access:
if:
- {{ is.snowflake_access }}
run:
- action: add-reviewers@v1
args:
team_reviewers: [snowflake-infrastructure]
- action: add-comment@v1
args:
comment: |
Snowflake ...
aws_changes:
if:
- {{ is.aws and not is.admin }}
run:
- action: add-label@v1
args:
label: 'aws'
- action: add-reviewers@v1
args:
team_reviewers: [aws-infrastructure]
snowflake_changes:
if:
- {{ is.snowflake and not is.admin }}
run:
- action: add-label@v1
args:
label: 'snowflake'
- action: add-reviewers@v1
args:
team_reviewers: [snowflake-infrastructure]
debug_context:
if:
- true
run:
- action: add-comment@v1
args:
comment: |
{{ pr | dump | safe }}
calc:
etr: {{ branch | estimatedReviewTime }}
is:
formatting: {{ source.diff.files | isFormattingChange }}
docs: {{ files | allDocs }}
tests: {{ files | allTests }}
terragrunt: {{ files | match(regex=r/(...)\/terragrunt.hcl/) | some }}
admin: {{ pr.author | includes(list=['ianwesleyarmstrong']) }}
aws: {{ files | match(regex=r/aws\/(...)/) | some }}
snowflake: {{ files | match(regex=r/snowflake\/(...)/) | some }}
snowflake_access: {{ files | match(regex=r/(...)\/(roles)|(users)\.yaml/) | some }}
Thanks!
from gitstream.
Hi,
The workflow is breaking before the rules can finish evaluating. I am adding a new directory/file, so maybe its erroring out on some kind of file diff?
EDIT:
I opened up another PR with just a whitespace change and the same error popped up as well
docker.io/gitstream/rules-engine:latest
> [email protected] start
> node src/app.js
Running tag v1.76
Switched to branch 'main'
Switched to branch '***'
fatal: no such path snowflake/et27231/us-east-2/production/databases/***/terragrunt.hcl in main
ARGS: { regex: /.github\/workflows\/.*\.yml/, __keywords: true }
ARGS: { regex: /(...)\/terragrunt.hcl/, __keywords: true }
/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:577
return file.includes(term);
^
TypeError: Cannot read properties of null (reading 'includes')
at /node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:577:17
at Array.some (<anonymous>)
at Context.parseIncludes (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:576:114)
at eval (eval at _compile (/node_modules/nunjucks/src/environment.js:633:18), <anonymous>:44:59)
at _callee$ (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:778:13)
at tryCatch (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:96:17)
at Generator._invoke (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:76:24)
at Generator.next (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:127:21)
at asyncGeneratorStep (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:360:24)
at _next (/node_modules/@linearb/gitstream-rule-parser/dist/gitstream-rule-parser.cjs.development.js:382:9)
from gitstream.
hello again!
first of all -> Im happy that you are trying our tool :) we are still in early stages so we are more than happy to get inputs from users.
I pushed a fix to a problem we had in this area and I can't reproduced this bug anymore in my repository.
Can you try again and let me know if it fixed at your end as well?
Thanks,
Shaked
from gitstream.
Just saw this pop up again under similar circumstances
/home/runner/work/_temp/d9d2aa2b-8a68-458f-ab85-3791bc7cfb7b.sh: line 10: unexpected EOF while looking for matching
''`
from gitstream.
hi @ianwesleyarmstrong !
I found something that may cause that issue, I pushed a fix and ill be happy if you could try trigger the action again by a dummy commit or something like that (not a re-run).
from gitstream.
iām closing this bug, @ianwesleyarmstrong if you still get this issue feel free to reopen it or open a new issue
from gitstream.
Related Issues (20)
- Github action fails with `Check could not be completed` HOT 5
- Trouble with Gitlab installation HOT 11
- Ignore directives that are commented out HOT 2
- Import YAML files with common configuration into .cm files HOT 3
- Help: Run gitStream for forked pull requests HOT 11
- Add visibility field for `repo` context HOT 2
- Required reviewer not being removed if automation not run HOT 10
- Add wildcard/regex for ignore_repositories HOT 2
- GitStream workflow is failing for all open PRs HOT 5
- Add gitStream Status Page HOT 1
- wait_for_all_checks timeout on merge with rulesets HOT 7
- Approve gets re-requested occasionally HOT 3
- Reuse automations for few projects HOT 4
- A PR that used to run gitstream no longer runs gitstream HOT 1
- set-required-approvals@v1 blocking PR after 2 approvals received HOT 2
- Add MS Teams Screenshots to Automation Examples
- Add explicit trigger for pr ready for review HOT 4
- Automation rules are triggered multiple times in a single run HOT 7
- Error in .cm/gitstream.cm - undefined HOT 8
- Formatting Issues on Multiple Integration Pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitstream.