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

DEVOPS-903: devex-apollo gcp migration #170

Merged
merged 25 commits into from
Aug 17, 2023
Merged

DEVOPS-903: devex-apollo gcp migration #170

merged 25 commits into from
Aug 17, 2023

Conversation

pavlops
Copy link
Contributor

@pavlops pavlops commented Aug 14, 2023

  • removed staging functionality from old pipeline.
  • added devex-apollo to gcp pipeline.
  • kustomize files adapted to new schemes.

@pavlops pavlops changed the title feat: DEVOPS-903 devex-apollo gcp migration DEVOPS-903: devex-apollo gcp migration Aug 14, 2023
@pavlops pavlops requested a review from frankmeds August 14, 2023 08:08
@pavlops
Copy link
Contributor Author

pavlops commented Aug 16, 2023

To note: @JamesHinshelwood

The lint is marking me to change this line:

products/devex-apollo/index.js:151:41
151:41 high Expected '===' and instead saw '=='. eslint/eqeqeq

However if I change it, I get this runtime issue:

Environment is dev
Dev env
yarn run v1.22.4
$ NODE_ENV=dev node -r dotenv/config index.js
(node:36) ExperimentalWarning: The ESM module loader is experimental.
NODE_ENV: dev
🚀  Server ready at port 5000
MongoDB database connection established successfully


/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:19
            throw error;
            ^

TypeError: Cannot read property 'customId' of undefined
    at file:///app/index.js:151:60
    at /app/node_modules/mongoose/lib/model.js:4842:16
    at /app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:16:11
    at /app/node_modules/mongoose/lib/model.js:4865:21
    at /app/node_modules/mongoose/lib/query.js:4411:18
    at Immediate.<anonymous> (/app/node_modules/mongoose/lib/query.js:2145:7)
    at Immediate.<anonymous> (/app/node_modules/mquery/lib/utils.js:116:16)
    at processImmediate (internal/timers.js:456:21)
Emitted 'error' event on Function instance at:
    at /app/node_modules/mongoose/lib/model.js:4844:13
    at /app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:16:11
    [... lines matching original stack trace ...]
    at processImmediate (internal/timers.js:456:21)
error Command failed with exit code 1.

If I keep the original line (https://github.com/Zilliqa/Devex-apollo/blob/master/index.js#L138) the application works fine. And this is how it was working from before:
const latestBlockInDB = res == null ? 0 : res.customId;

We can keep it like this but the Lint will fail.

Any suggestion?
Shall we ignore the Lint until some dev could take a look?

@pavlops pavlops marked this pull request as ready for review August 16, 2023 13:31
@pavlops pavlops requested a review from frankmeds August 16, 2023 13:32
Copy link
Contributor

@JamesHinshelwood JamesHinshelwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@pavlops pavlops merged commit f56f6aa into main Aug 17, 2023
9 of 11 checks passed
@pavlops pavlops deleted the devops-903 branch December 19, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants