Skip to content

Use always-increasing CDV when debug mode is on#7298

Closed
bdukes wants to merge 1 commit into
dnnsoftware:developfrom
bdukes:crm-debug
Closed

Use always-increasing CDV when debug mode is on#7298
bdukes wants to merge 1 commit into
dnnsoftware:developfrom
bdukes:crm-debug

Conversation

@bdukes
Copy link
Copy Markdown
Contributor

@bdukes bdukes commented May 26, 2026

Fixes #7296

@bdukes bdukes added this to the 10.3.3 milestone May 26, 2026
if (clientResourceSettings != null)
if (hostSettings.DebugMode)
{
this.crmVersion = int.Parse($"{DateTime.UtcNow:HHmmssfff}", NumberStyles.None, CultureInfo.InvariantCulture);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
this.crmVersion = int.Parse($"{DateTime.UtcNow:HHmmssfff}", NumberStyles.None, CultureInfo.InvariantCulture);
this.crmVersion = int.Parse($"{DateTime.UtcNow:MMddyyyyHHmmssfff}", NumberStyles.None, CultureInfo.InvariantCulture);

Maybe a bit of overkill, but this guarantees uniqueness across multiple days.

I do perfer the change here with the CRM version attribute/value

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was trying to keep it to nine digits so that it was inside the bounds of an Int32 value. We could take off ff from the end and add dd to the front…

@valadas
Copy link
Copy Markdown
Contributor

valadas commented May 27, 2026

I think #7299 might be fine by me, it will wrap in 2028 or something and start increasing from int.MinValue for the next 2038 years ;)

@bdukes
Copy link
Copy Markdown
Contributor Author

bdukes commented Jun 2, 2026

Closing in favor of #7299

@bdukes bdukes closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add a setting to enable or disable cdv.

3 participants