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

Add a check to see if database , collection and Permissionsgroup already exist when API to setup Metabase is hit [DMP 2024] #786

Closed
Tracked by #1676
ombhardwajj opened this issue Sep 13, 2024 · 4 comments · Fixed by #787

Comments

@ombhardwajj
Copy link
Contributor

ombhardwajj commented Sep 13, 2024

What

Currently when the API is hit more than once , the code stops executing when it reaches metabase Group creation
Group metabaseGroup = groupPermissionsRepository.save(new Group(name));
but duplicate database and collection will be created.
We need to stop this duplication.

Acceptance Criteria:

  • Make sure that database , collection and permissionsgroup are created if and only if they dont exist

Related Issue : avniproject/avni-product#1562

@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Sep 13, 2024
@ombhardwajj ombhardwajj changed the title Add a check to avoid duplicate database creation when API to setup Metabase is hit [DMP 2024] Add a check to avoid duplicate database and collection creation when API to setup Metabase is hit [DMP 2024] Sep 13, 2024
ombhardwajj added a commit to ombhardwajj/avni-server that referenced this issue Sep 13, 2024
@ombhardwajj ombhardwajj changed the title Add a check to avoid duplicate database and collection creation when API to setup Metabase is hit [DMP 2024] Add a check to avoid duplicate database , collection and Permissionsgroup creation when API to setup Metabase is hit [DMP 2024] Sep 13, 2024
ombhardwajj added a commit to ombhardwajj/avni-server that referenced this issue Sep 14, 2024
ombhardwajj added a commit to ombhardwajj/avni-server that referenced this issue Sep 14, 2024
@ombhardwajj ombhardwajj changed the title Add a check to avoid duplicate database , collection and Permissionsgroup creation when API to setup Metabase is hit [DMP 2024] Add a check to see if database , collection and Permissionsgroup already exist when API to setup Metabase is hit [DMP 2024] Sep 15, 2024
@vinayvenu vinayvenu moved this from New Issues to Code Review Ready in Avni Product Oct 9, 2024
@petmongrels
Copy link
Contributor

petmongrels commented Oct 9, 2024

  1. minor comment - an error log file has been commited. other than removing it, you may also put a .gitignore for it.
  2. new ObjectMapper() - I cannot tell from this commit alone, but in the codebase there should be only one place where ObjectMapper should be instantiated. We have a singleton in avni-server for this already - please use that. The reason for this is that new ObjectMapper() internally generates classes which would be private to that ObjectMapper.

@petmongrels petmongrels moved this from In Code Review to Code Review with Comments in Avni Product Oct 9, 2024
ombhardwajj added a commit to ombhardwajj/avni-server that referenced this issue Oct 17, 2024
ombhardwajj added a commit to ombhardwajj/avni-server that referenced this issue Oct 17, 2024
@ombhardwajj
Copy link
Contributor Author

ombhardwajj commented Oct 17, 2024

I've replaced initialization of a new ObjectMapper with the ObjectMapperSingleton already present in avni-server 👍

@mahalakshme mahalakshme moved this from Code Review with Comments to Code Review Ready in Avni Product Oct 24, 2024
@himeshr himeshr moved this from Code Review Ready to QA Ready in Avni Product Oct 25, 2024
@github-project-automation github-project-automation bot moved this from QA Ready to Done in Avni Product Oct 25, 2024
@mahalakshme
Copy link
Contributor

@himeshr QA can be done for this right? why it is moved to Done without QA?

@mahalakshme mahalakshme reopened this Oct 25, 2024
@github-project-automation github-project-automation bot moved this from Done to Triaged in Avni Product Oct 25, 2024
@mahalakshme mahalakshme moved this from Triaged to QA Ready in Avni Product Oct 25, 2024
@himeshr
Copy link
Contributor

himeshr commented Oct 25, 2024

PR Merge auto-closed the Card.

@himeshr QA can be done for this right? why it is moved to Done without QA?

ombhardwajj added a commit to ombhardwajj/avni-server that referenced this issue Nov 4, 2024
@mahalakshme mahalakshme moved this from QA Ready to QA Failed in Avni Product Dec 2, 2024
@mahalakshme mahalakshme moved this from QA Failed to Hold in Avni Product Dec 2, 2024
@mahalakshme mahalakshme moved this from Hold to Done in Avni Product Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants