Skip to content

Fixes many testacc #296

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

Merged
merged 4 commits into from
Aug 27, 2020
Merged

Fixes many testacc #296

merged 4 commits into from
Aug 27, 2020

Conversation

coderGo93
Copy link
Contributor

@coderGo93 coderGo93 commented Aug 19, 2020

Description

Fixes many testacc, still not sure if everything will work until github actions works.

Fixed:

  • retryable error for IP Whitelist resource.
  • OplogTS bug(was string but now i'ts int)

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 requirments
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

@coderGo93 coderGo93 self-assigned this Aug 19, 2020
@themantissa
Copy link
Collaborator

@coderGo93 this needs #293 first correct? I'd prefer to wait to review till the tests are all working.

@coderGo93
Copy link
Contributor Author

@themantissa Not really because this testacc needs the GH actions, so I rebase in #293 from this branch and then run again with changes of this branch.

@themantissa
Copy link
Collaborator

@coderGo93 is this ready for a review now?

@coderGo93
Copy link
Contributor Author

@themantissa Yes, in #293 I rebased from here when I made changes here

Copy link
Contributor

@PacoDw PacoDw left a comment

Choose a reason for hiding this comment

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

LGTM!

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 but two questions I'd like to understand since it's actually changes to the resources, not just the testes.

@@ -76,7 +76,7 @@ func dataSourceMongoDBAtlasCloudProviderSnapshotRestoreJob() *schema.Resource {
Computed: true,
},
"oplog_ts": {
Type: schema.TypeString,
Type: schema.TypeInt,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was this a bug found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a typo it seems, it should have been Int since it gave me an error of type so I changed it

Copy link
Collaborator

Choose a reason for hiding this comment

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

In the underlying docs it's a string https://docs.atlas.mongodb.com/reference/api/cloud-backup/restore/create-one-restore-job/ so we may want to ensure it's not a bigger bug or a miss of something else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mm weird, to me appears is a integer for oplogTs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ignore previous comment - string in docs in both places. Could Terraform be storing the string as an int? Seems weird.

}
return resource.NonRetryableError(fmt.Errorf(errorWhitelistDelete, err))
}
return resource.RetryableError(fmt.Errorf(errorWhitelistDelete, "Whitelist still exists"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Another bug? Just want to get an idea of the related fixes to the actual resources.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it happens sometimes the error about an ip whitelist still exists, when an ip exists it should retry not another delete because for some reason it can fail and it should have another get to verify that, that's why I deleted Delete and retry instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, still think that's a timing issue. Just note that in the PR description, for example - "Fixed: retryable error for IP Whitelist resource"

Edgar López added 4 commits August 27, 2020 16:55
…hange to false in private ip mode to avoid error about deprecated and avoid lint errors
… instance scale and changed it back the region for container azure
…ort to rs primare attributes instead of decode state id
@coderGo93 coderGo93 merged commit 462f10f into master Aug 27, 2020
@coderGo93 coderGo93 deleted the fix-testacc branch August 27, 2020 21:57
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.

3 participants