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

fix: Avoids runtime error: invalid memory address or nil pointer dereference when type!=DatabaseTrigger #1218

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EspenAlbert
Copy link
Contributor

@EspenAlbert EspenAlbert commented Nov 5, 2024

Proposed changes

  • Avoids runtime error: invalid memory address or nil pointer dereference when type!=DatabaseTrigger
  • Support using MONGODB_REALM_BASE_URL in profile (necessary for testing with cloud-dev) similar implementation to TF

Link to any related issue(s): CLOUDP-282800

TODO:

  1. Support running contract tests in CI
  • To generate the inputs/ we need a new project and a cluster in Atlas
  • We require an App with a Service and a function configured. Previously, done manually by following test readme instructions
  • Then using export PROJECT_ID=5555555 APP_ID=44444444 DB_NAME=testDB COLLECTION_NAME=collection FUNC_NAME=funcn2 FUNC_ID=2222222 SERVICE_ID=111111 we can generate the inputs and run the contract tests
  • Support using MONGODB_REALM_BASE_URL in profile (necessary for testing with cloud-dev)
  1. Support release workflow (depending on how (1) is solved this might require some additional work)

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Manual QA performed:

  • cfn invoke for each of CRUDL/cfn test
  • Updated resource in example
  • Published to AWS private registry
  • Used the template in example to create and update a stack in AWS
  • Deleted stack to ensure resources are deleted
  • Created multiple resources in same stack
  • Validated in Atlas UI
  • Included screenshots

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • For CFN Resources: I have released by changes in the private registry and proved by change
    works in Atlas

Further comments

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.

1 participant