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

Collecting MongoDB Serverless clusters #648

Merged
merged 6 commits into from
Mar 24, 2023

Conversation

AnnuCode
Copy link
Contributor

Problem

Missing collection of MongoDB Atlas Serverless clusters.

Solution

Created a new serverless package to collect all the MongoDB Atlas Serverless clusters.

Changes Made

  • serverless package added in the mongdbatlas providers.
  • NormalizeRegionNames function moved to utils package in the regions.go file and imported from there to be used in serverless and clusters packages.
  • Test file utils_test.go created which tests the NormalizeRegionNames function.

Checklist

  • Code follows the contributing guidelines
  • Changes have been thoroughly tested
  • Documentation has been updated, if necessary
  • Any dependencies have been added to the project, if necessary

Reviewers

@eneskaya

@eneskaya eneskaya changed the base branch from master to develop March 22, 2023 08:05
@eneskaya eneskaya changed the base branch from develop to master March 22, 2023 08:05
providers/mongodbatlas/sererlessinstances/serverless.go Outdated Show resolved Hide resolved
utils/regions.go Outdated Show resolved Hide resolved
@eneskaya eneskaya added this to the v3.0.8 milestone Mar 22, 2023
@mlabouardy mlabouardy requested a review from eneskaya March 22, 2023 20:49
@eneskaya eneskaya changed the base branch from master to develop March 23, 2023 07:37
@eneskaya
Copy link
Contributor

Hey @AnnuCode , the PR itself looks fine. We need to do some rebasing on our master, after which you need to rebase too. Then we can merge. I'll ping you once we fixed on our side 👍

@eneskaya
Copy link
Contributor

@AnnuCode please rebase your fork/PR to most recent master and we should be good to go 👍

@AnnuCode
Copy link
Contributor Author

@eneskaya just to confirm, will this be the right command to do so? git pull --rebase origin master

@eneskaya
Copy link
Contributor

@eneskaya just to confirm, will this be the right command to do so? git pull --rebase origin master

Hmm I'm not 100% sure how it works with forked repos. So here's what I would do.
In your repo switch to master branch and do a git pull --rebase, then switch back to your feature branch feature/618 and do a git rebase master

@AnnuCode
Copy link
Contributor Author

@eneskaya after doing git pull --rebase on the master branch, it says "Already up to date.". After that I did git rebase master on the feature/618 branch and it says "Current branch feature/618 is up to date. "

git_komiser

@eneskaya
Copy link
Contributor

@eneskaya after doing git pull --rebase on the master branch, it says "Already up to date.". After that I did git rebase master on the feature/618 branch and it says "Current branch feature/618 is up to date. "

git_komiser

You may need to sync with the main repository first: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@AnnuCode
Copy link
Contributor Author

AnnuCode commented Mar 23, 2023

@eneskaya Is it possible that my past PR made by a previous fork(now deleted) is causing issues? Attaching few photos to show the conflict:
First photo: Conflicts showing in the present PR
Second photo: My present forked repo of Komiser showing I am 2 commits ahead(these are the same commits which are the conflicts)
Third photo: The two commits which are being shown as made from the previous PR which is now closed and the last fork deleted.

First:
git_conflct

Second:
git_conflict1

Third:
git_conflict3

@eneskaya
Copy link
Contributor

eneskaya commented Mar 23, 2023

@eneskaya Is it possible that my past PR made by a previous fork(now deleted) is causing issues? Attaching few photos to show the conflict: First photo: Conflicts showing in the present PR Second photo: My present forked repo of Komiser showing I am 2 commits ahead(these are the same commits which are the conflicts) Third photo: The two commits which are being shown as made from the previous PR which is now closed and the last fork deleted.

First:
Second:
Third:

Yeah the problem is that we needed to get rid of these two commits that you're seeing on the last screenshot. What happens when you press "Sync Fork" on the second screenshot?

@AnnuCode
Copy link
Contributor Author

@eneskaya It says this branch is not behind the upstream tailward:master

sync_error

@eneskaya
Copy link
Contributor

@eneskaya It says this branch is not behind the upstream tailward:master

sync_error

Ok then do the following on master: git reset --hard HEAD^ (⚠️ This will remove the top-most commit, which is the commit that we removed)
And then follow the steps from my previous comment

@AnnuCode
Copy link
Contributor Author

@eneskaya After the commands, things went like this:

git_komiser1

@eneskaya
Copy link
Contributor

@eneskaya After the commands, things went like this:

git_komiser1

Ah yes sorry for the misunderstanding. After doing the reset, please push instead of pull.

@AnnuCode
Copy link
Contributor Author

@eneskaya After git reset --hard HEAD^ from master I did git push --force. Then from the feature/618 branch I did git rebase master. This removed the 2 commits ahead message from the fork repo page and shows the branch is up to date with tailwarden/komiser:master. But the conflicts regarding the two files is still there in the PR page. Any ideas if I did something wrong?

@eneskaya
Copy link
Contributor

@eneskaya After git reset --hard HEAD^ from master I did git push --force. Then from the feature/618 branch I did git rebase master. This removed the 2 commits ahead message from the fork repo page and shows the branch is up to date with tailwarden/komiser:master. But the conflicts regarding the two files is still there in the PR page. Any ideas if I did something wrong?

You need to git push -f on your feature branch now, and we should be good to go :)

@eneskaya
Copy link
Contributor

@AnnuCode Ugh, the rebasing on your feature branch didn't remove the faulty commit... Please, on your feature/618 branch do a git revert d911119649afe0b255c8fac1c16c032b66b97221 to remove this commit: AnnuCode@d911119. After that do another git push -f.

@AnnuCode
Copy link
Contributor Author

@eneskaya Done :) Thank you so much for all the help! I almost took a full lesson in Git from you here 😄

@AnnuCode
Copy link
Contributor Author

@eneskaya Should I update the branch as well?

update_branch

@eneskaya
Copy link
Contributor

eneskaya commented Mar 24, 2023

@eneskaya Should I update the branch as well?

Let's not mess up anything here last minute 😂 I'll merge once the checks are green ✅

EDIT: nvm, had to update of course before merging :)

@eneskaya eneskaya merged commit 6d08e6a into tailwarden:develop Mar 24, 2023
@AnnuCode AnnuCode deleted the feature/618 branch April 1, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants