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

INTMDB-28: Added Event Triggers Realm #476

Merged
merged 11 commits into from Jun 30, 2021
Merged

INTMDB-28: Added Event Triggers Realm #476

merged 11 commits into from Jun 30, 2021

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Jun 17, 2021

Description

  • Added resource, datasources and its tests for Event Triggers Realm
  • Modified config provider to get client realm or atlas
  • Modified all resources/datasources for atlas with one line which is the way to get atlas client, this is why appears many files changed

Link to any related issue(s):

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
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the Terraform contribution guidelines
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

Waiting for a PR of realm client to be merged then pull the changes so it can pass the normal tests

@coderGo93 coderGo93 requested a review from abner-dou June 17, 2021 01:05
@coderGo93 coderGo93 self-assigned this Jun 17, 2021
@themantissa themantissa requested review from a team and threebee and removed request for a team June 17, 2021 15:32
@themantissa
Copy link
Collaborator

@coderGo93 added apix to review. Reminder to share PRs in Slack as we discussed. Also tests failed.

@coderGo93
Copy link
Contributor Author

@themantissa thank you and yes because I'm a waiting a pr in realm client to be merged to master and then pull the changes in go modules and it will pass the test

@coderGo93 coderGo93 changed the title WIP: INTMDB-28: Added Event Triggers Realm INTMDB-28: Added Event Triggers Realm Jun 18, 2021
@themantissa
Copy link
Collaborator

@tsedgwick though you'd want to see (and perhaps comment on/review) the PR for the work in Terraform.

Copy link

@threebee threebee left a comment

Choose a reason for hiding this comment

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

Looking good, I have added a question for my own learning.

go.sum Outdated
Comment on lines 773 to 774
go.mongodb.org/realm v0.0.0-20210604190232-4d3dfc67ed71 h1:2jY3qOwzS8AQMRtuGxs8y/k1FRGWQHfvrrtEk0X+61Y=
go.mongodb.org/realm v0.0.0-20210604190232-4d3dfc67ed71/go.mod h1:Tru1+aHka6+4uXYigPKoNySbNWgtkfsanVddwmcqvOM=
go.mongodb.org/realm v0.0.0-20210618220639-e70c919266f2 h1:3ukcBKIOun3QRMZzdVRCU/7uVhjR7XQsdD/cCH5V8So=
go.mongodb.org/realm v0.0.0-20210618220639-e70c919266f2/go.mod h1:Tru1+aHka6+4uXYigPKoNySbNWgtkfsanVddwmcqvOM=

Choose a reason for hiding this comment

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

[q] Why does go.sum mentions 2 versions of go.mongodb.org/realm? When only go.mongodb.org/realm v0.0.0-20210618220639-e70c919266f2 is present in go.mod?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That looks like go mod tidy might need to be run to remove the duplicates, unless the reference is coming in from another lib.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good eye @threebee , just pushed with vendor updated, thank you

Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

Overall lgtm but some small docs edits and test stuff.

mongodbatlas/resource_mongodbatlas_event_trigger_test.go Outdated Show resolved Hide resolved
website/docs/d/event_trigger.html.markdown Outdated Show resolved Hide resolved
website/docs/r/event_trigger.html.markdown Outdated Show resolved Hide resolved
website/docs/r/event_trigger.html.markdown Outdated Show resolved Hide resolved
website/docs/r/event_trigger.html.markdown Outdated Show resolved Hide resolved
website/docs/r/event_trigger.html.markdown Outdated Show resolved Hide resolved
website/docs/r/event_trigger.html.markdown Outdated Show resolved Hide resolved
Copy link
Collaborator

@themantissa themantissa left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for the edits.

Copy link

@threebee threebee left a comment

Choose a reason for hiding this comment

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

LGTM if test passes. I personally found this PR kind of too big to review.

@themantissa
Copy link
Collaborator

@threebee do you think it would have helped to do the changes for the URI in one PR and the actual Trigger add in another? I agree the combined made for a large PR! fyi @coderGo93

@coderGo93
Copy link
Contributor Author

@threebee The tests for trigger are coded to be skipped because it requires to be available always for app realm since there's no a resource to create a realm app, also to load a sample dataset in cluster since it requires to link the database name and collection name, what do you think? @themantissa .

Yeah the PR is kinda big because of implementation of the second client instead of only atlas but I did that way because it seems safer to avoid any breaking since once it's merged, the other "old" PRs must be rebased to avoid an error that client type is wrong so in that way, if most of the tests of atlas passed it means it works the new implementation, obviously there's a chance that it will fail some testacc like before but it's expected since it hasn't fixed yet

@threebee
Copy link

@threebee The tests for trigger are coded to be skipped because it requires to be available always for app realm since there's no a resource to create a realm app, also to load a sample dataset in cluster since it requires to link the database name and collection name, what do you think? @themantissa .

Yeah the PR is kinda big because of implementation of the second client instead of only atlas but I did that way because it seems safer to avoid any breaking since once it's merged, the other "old" PRs must be rebased to avoid an error that client type is wrong so in that way, if most of the tests of atlas passed it means it works the new implementation, obviously there's a chance that it will fail some testacc like before but it's expected since it hasn't fixed yet

@coderGo93 Thank you for explanation. Feel free to merge, my comment is non blocking.

Copy link
Contributor

@thetonymaster thetonymaster left a comment

Choose a reason for hiding this comment

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

LGTM just check for the changes you need to do before merging

@coderGo93 coderGo93 added the run-testacc To run acceptance tests label Jun 29, 2021
@coderGo93 coderGo93 added run-testacc To run acceptance tests and removed run-testacc To run acceptance tests labels Jun 30, 2021
@coderGo93 coderGo93 merged commit 8ffed1c into master Jun 30, 2021
@coderGo93 coderGo93 deleted the INTMDB-28 branch June 30, 2021 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-testacc To run acceptance tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants