Giter Club home page Giter Club logo

oasdiff-action's People

Contributors

effoeffi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

martinformi

oasdiff-action's Issues

Error: goroutine stack exceeds 1000000000-byte limit

I have this github action:

jobs:
  schema_breaking_changes:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout comparison branch
        uses: actions/checkout@v2
        with:
          ref: ${{ github.event.pull_request.base.sha }}
          path: base
      - name: Checkout current branch
        uses: actions/checkout@v2
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          path: head
      - name: Running OpenAPI Spec diff action
        id: test_breaking_changes
        uses: Tufin/[email protected]
        with:
          base: './base/schema.json'
          revision: './head/schema.json'
          format: 'text'
          check-breaking: true
          fail-on-diff: false

And I'm getting this error:

running default...
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc020400460 stack=[0xc020400000, 0xc040400000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x9a3fdc?, 0xd2d4a0?})
	/usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0x7ffd8d258dd8 sp=0x7ffd8d258da8 pc=0x434d5d
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1105 +0x5bd fp=0x7ffd8d258f88 sp=0x7ffd8d258dd8 pc=0x44e2dd
runtime.morestack()
	/usr/local/go/src/runtime/asm_amd64.s:574 +0x8b fp=0x7ffd8d258f90 sp=0x7ffd8d258f88 pc=0x46432b

goroutine 1 [running]:
github.com/tufin/oasdiff/lint.checkSchema(0xc00007b1e0, 0xc0403ffac0?)
	/go/src/app/lint/check-regexp.go:101 +0x970 fp=0xc020400470 sp=0xc020400468 pc=0x8d5f50
github.com/tufin/oasdiff/lint.checkSchemaRef(...)
	/go/src/app/lint/check-regexp.go:133
github.com/tufin/oasdiff/lint.checkSchema(0xc00007aea0, 0x0?)
	/go/src/app/lint/check-regexp.go:[12](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:13)4 +0x7eb fp=0xc020400630 sp=0xc020400470 pc=0x8d5dcb
github.com/tufin/oasdiff/lint.checkSchemaRef(...)
	/go/src/app/lint/check-regexp.go:[13](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:14)3
github.com/tufin/oasdiff/lint.checkSchema(0xc0000776c0, 0x0?)
	/go/src/app/lint/check-regexp.go:121 +0x605 fp=0xc0204007f0 sp=0xc020400630 pc=0x8d5be5
github.com/tufin/oasdiff/lint.checkSchemaRef(...)
	/go/src/app/lint/check-regexp.go:133
[...[
	/go/src/app/lint/check-regexp.go:133
github.com/tufin/oasdiff/lint.checkSchema(0xc00045b860, 0x0?)
	/go/src/app/lint/check-regexp.go:124 +0x7eb fp=0xc02040b1b0 sp=0xc02040aff0 pc=0x8d5dcb

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00004efb0 sp=0xc00004ef90 pc=0x437a76
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.forcegchelper()
	/usr/local/go/src/runtime/proc.go:305 +0xb0 fp=0xc00004efe0 sp=0xc00004efb0 pc=0x4378b0
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004efe8 sp=0xc00004efe0 pc=0x4662c1
created by runtime.init.6
	/usr/local/go/src/runtime/proc.go:293 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00004f780 sp=0xc00004f760 pc=0x437a76
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.bgsweep(0x0?)
	/usr/local/go/src/runtime/mgcsweep.go:319 +0xde fp=0xc00004f7c8 sp=0xc00004f780 pc=0x42401e
runtime.gcenable.func1()
	/usr/local/go/src/runtime/mgc.go:178 +0x26 fp=0xc00004f7e0 sp=0xc00004f7c8 pc=0x419286
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004f7e8 sp=0xc00004f7e0 pc=0x4662c1
created by runtime.gcenable
	/usr/local/go/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc000038070?, 0xa97ed8?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00004ff70 sp=0xc00004ff50 pc=0x437a76
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:387
runtime.(*scavengerState).park(0xd64e20)
	/usr/local/go/src/runtime/mgcscavenge.go:400 +0x53 fp=0xc00004ffa0 sp=0xc00004ff70 pc=0x421ef3
runtime.bgscavenge(0x0?)
	/usr/local/go/src/runtime/mgcscavenge.go:633 +0x65 fp=0xc00004ffc8 sp=0xc00004ffa0 pc=0x4224e5
runtime.gcenable.func2()
	/usr/local/go/src/runtime/mgc.go:179 +0x26 fp=0xc00004ffe0 sp=0xc00004ffc8 pc=0x419226
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004ffe8 sp=0xc00004ffe0 pc=0x4662c1
created by runtime.gcenable
	/usr/local/go/src/runtime/mgc.go:179 +0xaa

goroutine 17 [finalizer wait]:
runtime.gopark(0x437df2?, 0x7f1f18bdecc8?, 0x0?, 0x0?, 0xc00004e770?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00004e628 sp=0xc00004e608 pc=0x437a76
runtime.runfinq()
	/usr/local/go/src/runtime/mfinal.go:193 +0x107 fp=0xc00004e7e0 sp=0xc00004e628 pc=0x4182c7
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004e7e8 sp=0xc00004e7e0 pc=0x4662c1
created by runtime.createfing
	/usr/local/go/src/runtime/mfinal.go:[16](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:17)3 +0x45

goroutine [18](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:19) [GC worker (idle)]:
runtime.gopark(0x2871a2ebf2?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00004a750 sp=0xc00004a730 pc=0x437a76
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1275 +0xf1 fp=0xc00004a7e0 sp=0xc00004a750 pc=0x41aff1
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004a7e8 sp=0xc00004a7e0 pc=0x4662c1
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:1[19](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:20)9 +0x[25](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:26)

goroutine 19 [GC worker (idle)]:
runtime.gopark(0x2871a31cc6?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:381 +0xd6 fp=0xc00004af50 sp=0xc00004af30 pc=0x437a76
runtime.gcBgMarkWorker()
	/usr/local/go/src/runtime/mgc.go:1[27](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:28)5 +0xf1 fp=0xc00004afe0 sp=0xc00004af50 pc=0x[41](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:42)aff1
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc00004afe8 sp=0xc00004afe0 pc=0x[46](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:47)[62](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:63)c1
created by runtime.gcBgMarkStartWorkers
	/usr/local/go/src/runtime/mgc.go:11[99](https://github.com/my-repo/actions/runs/4875076085/jobs/8696819506?pr=291#step:5:100) +0x25

Any idea what is the issue?

Save output as a file or variable

This GitHub action is really great, however, I would like to get the result and send it to any messaging channel (MS Teams). However, now it is not possible, since GitHub does not support getting stdout from the previous step. Do you have any idea how to achieve this?

Error: unknown command "text" for "oasdiff"

I'm unable to run action with config like this:

      - name: Running OpenAPI Spec diff action
        id: test_breaking_changes
        uses: Tufin/oasdiff-action@v2
        with:
          base: 'head/combinedSchema.json'
          revision: 'base/combinedSchema.json'
          format: text
          breaking-only: true
          fail-on-diff: true

it fails with error:

running breaking_only and fail_on_diff...
Error: unknown command "text" for "oasdiff"
Run 'oasdiff --help' for usage.

Warning message that should not be

Hi!

I'm integrating your github action in my workflow.

When I provide this in my workflow:

      - name: Running OpenAPI Spec diff action
        id: test_breaking_changes
        uses: Tufin/[email protected]
        with:
          base: 'openapi.old.yaml'
          revision: 'openapi.yaml'
          format: 'text'
          check-breaking: true
          fail-on-diff: true

I have this in the log of the action:

Warning: Unexpected input(s) 'check-breaking', valid inputs are ['entryPoint', 'args', 'base', 'revision', 'format', 'breaking-only', 'fail-on-diff']
Run Tufin/oasdiff-action@v[2](https://github.com/floevcharging/CPO.ChargingStation.Service/actions/runs/4874879584/jobs/8696363534?pr=86#step:6:2).1.0
  with:
    base: openapi.old.yaml
    revision: openapi.yaml
    format: text
    check-breaking: true
    fail-on-diff: true
    breaking-only: false

check-breaking is considered "unexpected" when it is supposed to be the new command based on the documentation and you can see the added "breaking-only".

Expected behavior:

No warning and not "breaking-only" parameter passed.

Other than that, it seems to work perfectly, thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.