Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Investigate failure of insync check Orc8r Check Generated Files In Sync #14860

Closed
LKreutzer opened this issue Jan 18, 2023 · 6 comments · Fixed by #14864
Closed

CI: Investigate failure of insync check Orc8r Check Generated Files In Sync #14860

LKreutzer opened this issue Jan 18, 2023 · 6 comments · Fixed by #14864
Assignees
Labels
component: ci All updates on CI (Jenkins/CircleCi/Github Action) component: orc8r Orchestrator-related issue

Comments

@LKreutzer
Copy link
Contributor

The workflow Orc8r Check Generated Files In Sync (insync-checkin.yml ) is frequently failing.

The error messages are:

make[1]: Leaving directory '/src/magma/orc8r/cloud'
# generate Swagger API bindings for NMS
/src/magma/nms/scripts/generateAPIFromSwagger.sh -f -i /src/magma/orc8r/cloud/go/services/obsidian/swagger/v1/swagger.yml -o /src/magma/nms/generated/
+ yarn --silent openapi-generator-cli version-manager set 6.0.0
warning package.json: No license field
Download 6.2.1 ...
Downloaded 6.2.1
Did set selected version to 6.2.1
Unable to query repository, because of: "Request failed with status code 504"

Response:
date Wed, 18 Jan 2023 13:18:44 GMT
content-type text/html
content-length 160
connection close
server nginx

/src/magma/orc8r/cloud/node_modules/@openapitools/openapi-generator-cli/main.js:1039
            error.response.data.on('data', data => this.logger.log(data.toString('utf8')));
                                ^

TypeError: error.response.data.on is not a function
    at VersionManagerService.printResponseError (/src/magma/orc8r/cloud/node_modules/@openapitools/openapi-generator-cli/main.js:1039:33)
    at /src/magma/orc8r/cloud/node_modules/@openapitools/openapi-generator-cli/main.js:918:18
    at /src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/operators/catchError.js:13:51
    at OperatorSubscriber._this._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:43:21)
    at Subscriber.error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Subscriber._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at Subscriber.error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Subscriber._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at Subscriber.error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Subscriber._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)

Node.js v18.13.0
make: *** [Makefile:191: nms_gen] Error 1
2
Creating build context in '/tmp/magma_orc8r_build'...
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/cloud/test/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/cloud/api/v1/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/gateway/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/lib/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/lib/go/protos/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/lte/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/feg/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/feg/cloud/go/protos/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/cwf/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/dp/cloud/go/go.mod
Running 'docker-compose build test'...
Running 'docker-compose run --rm -v /home/runner/work/magma/magma/.golangci.yml:/src/magma/.golangci.yml -v /home/runner/work/magma/magma/orc8r:/src/magma/orc8r -v /home/runner/work/magma/magma/lte:/src/magma/lte -v /home/runner/work/magma/magma/feg:/src/magma/feg -v /home/runner/work/magma/magma/cwf:/src/magma/cwf -v /home/runner/work/magma/magma/dp:/src/magma/dp test make fullgen'...
Error: Process completed with exit code 2.

@LKreutzer LKreutzer added component: orc8r Orchestrator-related issue component: ci All updates on CI (Jenkins/CircleCi/Github Action) labels Jan 18, 2023
@LKreutzer LKreutzer self-assigned this Jan 18, 2023
@LKreutzer
Copy link
Contributor Author

LKreutzer commented Jan 18, 2023

Failures of the workflow https://github.com/magma/magma/actions/workflows/insync-checkin.yml?query=is%3Afailure
The earliest failure with this logging is the run #15698, which ran one week ago and was a run on a PR.

@LKreutzer
Copy link
Contributor Author

A revert of the dependabot PRs does not work (see this run) and the first failures did indeed appear before the dependabot PRs were merged - see comment above.

@LKreutzer
Copy link
Contributor Author

LKreutzer commented Jan 18, 2023

Test run with --network-timeout 1000000 added to the yarn install. Still failing with 504 Gateway Timeout.

Test run with the timeout on both yarn commands. Still failing.

Updated run with better debug logging.

@LKreutzer
Copy link
Contributor Author

LKreutzer commented Jan 18, 2023

The first yarn command is the one that is failing.

Run with version 2.5.2 of openapi-generator-cli instead of the 6.0.0 of the package openapi-generator.

The logging changed to:

make[1]: Leaving directory '/src/magma/orc8r/cloud'
# generate Swagger API bindings for NMS
/src/magma/nms/scripts/generateAPIFromSwagger.sh -f -i /src/magma/orc8r/cloud/go/services/obsidian/swagger/v1/swagger.yml -o /src/magma/nms/generated/
This is before the first yarn command!
+ yarn --network-timeout 1000000 --silent openapi-generator-cli version-manager set 2.5.2
warning package.json: No license field
Unable to query repository, because of: "Request failed with status code 504"

Response:
server awselb/2.0
date Wed, 18 Jan 2023 15:40:44 GMT
content-type text/html
content-length 132
connection close

/src/magma/orc8r/cloud/node_modules/@openapitools/openapi-generator-cli/main.js:1039
            error.response.data.on('data', data => this.logger.log(data.toString('utf8')));
                                ^

TypeError: error.response.data.on is not a function
    at VersionManagerService.printResponseError (/src/magma/orc8r/cloud/node_modules/@openapitools/openapi-generator-cli/main.js:1039:33)
    at /src/magma/orc8r/cloud/node_modules/@openapitools/openapi-generator-cli/main.js:918:18
    at /src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/operators/catchError.js:13:51
    at OperatorSubscriber._this._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:43:21)
    at Subscriber.error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Subscriber._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at Subscriber.error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Subscriber._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)
    at Subscriber.error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:60:18)
    at Subscriber._error (/src/magma/orc8r/cloud/node_modules/rxjs/dist/cjs/internal/Subscriber.js:84:30)

Node.js v18.13.0
make: *** [Makefile:191: nms_gen] Error 1
2
Creating build context in '/tmp/magma_orc8r_build'...
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/cloud/test/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/cloud/api/v1/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/gateway/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/lib/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/orc8r/lib/go/protos/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/lte/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/feg/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/feg/cloud/go/protos/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/cwf/cloud/go/go.mod
/tmp/magma_orc8r_build/gomod/src/magma/dp/cloud/go/go.mod
Running 'docker-compose build test'...
Running 'docker-compose run --rm -v /home/runner/work/magma/magma/.golangci.yml:/src/magma/.golangci.yml -v /home/runner/work/magma/magma/orc8r:/src/magma/orc8r -v /home/runner/work/magma/magma/lte:/src/magma/lte -v /home/runner/work/magma/magma/feg:/src/magma/feg -v /home/runner/work/magma/magma/cwf:/src/magma/cwf -v /home/runner/work/magma/magma/dp:/src/magma/dp test make fullgen'...
Error: Process completed with exit code 2.

@LKreutzer
Copy link
Contributor Author

Seems to be a bug in the openapi-generator-cli: OpenAPITools/openapi-generator-cli#680

@LKreutzer
Copy link
Contributor Author

Added logging to explain the issue if the job fails:

  echo "Info: If this yarn command fails due to 'Request failed with status code 504'"
  echo "the availability of search.maven.org may be responsible, see https://status.maven.org/#month"
  echo "For more information see https://github.com/OpenAPITools/openapi-generator-cli/issues/680"
  echo "or the issue https://github.com/magma/magma/issues/14860"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ci All updates on CI (Jenkins/CircleCi/Github Action) component: orc8r Orchestrator-related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant