-
Notifications
You must be signed in to change notification settings - Fork 8
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
PAY-7552: Update to improve uniqueness of RC number generation #1759
Open
davejones74
wants to merge
4
commits into
master
Choose a base branch
from
PAY-7552-Improve-Unique-RC-Generation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
davejones74
changed the title
PAY-7552: Update to improve uniqueness of RC number.
PAY-7552: Update to improve uniqueness of RC number generation
Jan 21, 2025
Plan Result (aat)
Change Result (Click me) # azurerm_api_management_subscription.fee_pay_team_telephony_subscription will be updated in-place
~ resource "azurerm_api_management_subscription" "fee_pay_team_telephony_subscription" {
~ allow_tracing = false -> true
id = "/subscriptions/96c274ce-846d-4e48-89a7-d528432298a7/resourceGroups/cft-aat-network-rg/providers/Microsoft.ApiManagement/service/cft-api-mgmt-stg/subscriptions/5a89d26c-6d91-4997-8a4e-13e4e279ee0a"
# (10 unchanged attributes hidden)
}
# azurerm_api_management_subscription.pcipal_supplier_subscription will be updated in-place
~ resource "azurerm_api_management_subscription" "pcipal_supplier_subscription" {
~ allow_tracing = false -> true
id = "/subscriptions/96c274ce-846d-4e48-89a7-d528432298a7/resourceGroups/cft-aat-network-rg/providers/Microsoft.ApiManagement/service/cft-api-mgmt-stg/subscriptions/ea576e34-00bd-4eff-80d5-85f6c6392bb2"
# (10 unchanged attributes hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy. |
Plan Result (prod)
Change Result (Click me) # azurerm_api_management_subscription.fee_pay_team_telephony_subscription will be updated in-place
~ resource "azurerm_api_management_subscription" "fee_pay_team_telephony_subscription" {
~ allow_tracing = false -> true
id = "/subscriptions/8cbc6f36-7c56-4963-9d36-739db5d00b27/resourceGroups/cft-prod-network-rg/providers/Microsoft.ApiManagement/service/cft-api-mgmt-prod/subscriptions/7229a544-a882-4520-a81e-2cd4ed6f0031"
# (10 unchanged attributes hidden)
}
# azurerm_api_management_subscription.pcipal_supplier_subscription will be updated in-place
~ resource "azurerm_api_management_subscription" "pcipal_supplier_subscription" {
~ allow_tracing = false -> true
id = "/subscriptions/8cbc6f36-7c56-4963-9d36-739db5d00b27/resourceGroups/cft-prod-network-rg/providers/Microsoft.ApiManagement/service/cft-api-mgmt-prod/subscriptions/abd7d0f5-77bc-462c-a658-c8d1e1b40837"
# (10 unchanged attributes hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy. |
…7552-Improve-Unique-RC-Generation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira link
https://tools.hmcts.net/jira/browse/PAY-7552
Change description
Minor change to the RC generation.
Current format RC-XXXX-XXXX-XXXR-RRRL
Where
X - DateTime millisecond number / 100
R - 4 Digit SecureRandom Generated Number
L - Luhn forumla check digit
New apporach is to remove the devision in the milliseconds as that's losing precision - this means the random rumber drops from 4 digits to 2.
Current format RC-XXXX-XXXX-XXXX-XRRL
Where
X - DateTime millisecond number
R - 2 Digit SecureRandom Generated Number
L - Luhn forumla check digit
In tests from 1000 consecutive requests - not particularly realistic, ~7000 average collisions for the old code, ~6000 average collisions for the new code, but the new code should work better is real world scenarios.
Testing done
Checklist