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 issue #204: Added validation to avoid duplication of mac addresses in the hardware database #205

Merged
merged 2 commits into from
Jul 9, 2020

Conversation

parauliya
Copy link
Contributor

Description

If someone tries to push the hardware data which contains a mac address which is already present in the database, the API will fail with the error explaining that "this mac address is already present in the database.

Why is this needed

Fixes: #204

How Has This Been Tested?

I have tried to push the hardware data with different id but same mac address which is already present in the database and it did't allow me to push the hardware data by saying that that particular mac address is present in the database

How are existing users impacted? What migration steps/scripts do we need?

The exising user will not be able to push the hardware data which contains the mac address which is already present in the database.
No Migration steps/scripts needed.

@parauliya parauliya added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 3, 2020
@parauliya parauliya self-assigned this Jul 3, 2020
@parauliya parauliya added this to In Progress in Issues List via automation Jul 3, 2020
@parauliya parauliya force-pushed the fix_204 branch 3 times, most recently from c08333e to fa8b8c8 Compare July 6, 2020 11:54
@parauliya parauliya force-pushed the fix_204 branch 2 times, most recently from bf72baf to ab9d4d1 Compare July 8, 2020 07:41
grpc-server/hardware.go Outdated Show resolved Hide resolved
grpc-server/hardware.go Outdated Show resolved Hide resolved
grpc-server/hardware.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gauravgahlot gauravgahlot left a comment

Choose a reason for hiding this comment

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

LGTM

@gauravgahlot gauravgahlot added the ready-to-merge Signal to Mergify to merge the PR. label Jul 9, 2020
@gauravgahlot gauravgahlot merged commit 356a494 into tinkerbell:master Jul 9, 2020
Issues List automation moved this from In Progress to Just shipped Jul 9, 2020
@gauravgahlot gauravgahlot deleted the fix_204 branch July 9, 2020 12:08
@mmlb mmlb removed the ready-to-merge Signal to Mergify to merge the PR. label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
No open projects
Issues List
  
Just shipped
Development

Successfully merging this pull request may close these issues.

Add Validation of hardware data before pushing it to avoid duplication of mac addresses in the database
3 participants