Add expiry_access_period_enabled boolean column to Tld table#2804
Merged
Conversation
ptkach
approved these changes
Aug 18, 2025
ptkach
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @weiminyu)
weiminyu
approved these changes
Aug 18, 2025
weiminyu
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @CydeWeys)
This is the first in a series of PRs to implement the expiry access period (XAP). The overall fee schedules will be set in YAML config files, so the only DB change necessary should be this single new boolean column on the Tld entity, which defaults to false so as to require XAP explicitly being turned on for a given TLD. BUG=http://b/437398822
CydeWeys
force-pushed
the
expiry-access-period
branch
from
August 18, 2025 21:37
4b9b1ee to
6106d1d
Compare
CydeWeys
enabled auto-merge
August 18, 2025 21:38
CydeWeys
added a commit
to CydeWeys/nomulus
that referenced
this pull request
Jun 23, 2026
This commit implements the database schema changes for the Expiry Access Period (XAP) launch configuration on TLDs. It represents the first step of a Two-PR deployment strategy, deploying the database schema changes in advance of the server logic. Specifically, it replaces the `expiry_access_period_enabled` boolean column (originally introduced in PR google#2804) with a new `expiry_access_period_transitions` hstore column. Why we are making this change: A basic boolean flag only allows an immediate, manual on/off toggle. To launch XAP on a TLD, registry operators would have to manually flip the flag at the exact launch time, which is operationally fragile and cannot be planned in advance. Refactoring this to an hstore-backed timed transition map (mapping Instant to ExpiryAccessPeriodMode) allows operators to schedule the XAP launch in advance via TLD YAML configurations. The registry will automatically transition the TLD to the ENABLED mode at the scheduled timestamp, aligning with how other scheduled TLD changes (like TLD states and EAP fee schedules) are managed. Since the original boolean column was never mapped in Java (PR google#2804 only added the database column), it is completely safe to drop it immediately in this migration. To ensure backward compatibility with running servers (which are still executing the old Java code during the deployment transition), the new column is added as `NOT NULL` with a temporary `DEFAULT` constraint. This prevents constraint violations on inserts from old servers. A TODO has been left in the SQL migration to drop this default in a subsequent schema release once the Java changes have been deployed. TAG=agy CONV=88271e71-e272-40e0-85f8-a075a423b7c2
CydeWeys
added a commit
to CydeWeys/nomulus
that referenced
this pull request
Jun 23, 2026
This commit implements the database schema changes for the Expiry Access Period (XAP) launch configuration on TLDs. It represents the first step of a Two-PR deployment strategy, deploying the database schema changes in advance of the server logic. Specifically, it replaces the `expiry_access_period_enabled` boolean column (originally introduced in PR google#2804) with a new `expiry_access_period_transitions` hstore column. Why we are making this change: A basic boolean flag only allows an immediate, manual on/off toggle. To launch XAP on a TLD, registry operators would have to manually flip the flag at the exact launch time, which is operationally fragile and cannot be planned in advance. Refactoring this to an hstore-backed timed transition map (mapping Instant to ExpiryAccessPeriodMode) allows operators to schedule the XAP launch in advance via TLD YAML configurations. The registry will automatically transition the TLD to the ENABLED mode at the scheduled timestamp, aligning with how other scheduled TLD changes (like TLD states and EAP fee schedules) are managed. Since the original boolean column was never mapped in Java (PR google#2804 only added the database column), it is completely safe to drop it immediately in this migration. To ensure backward compatibility with running servers (which are still executing the old Java code during the deployment transition), the new column is added as `NOT NULL` with a temporary `DEFAULT` constraint. This prevents constraint violations on inserts from old servers. A TODO has been left in the SQL migration to drop this default in a subsequent schema release once the Java changes have been deployed. TAG=agy CONV=88271e71-e272-40e0-85f8-a075a423b7c2
pull Bot
pushed a commit
to faizulho/nomulus
that referenced
this pull request
Jun 23, 2026
This commit implements the database schema changes for the Expiry Access Period (XAP) launch configuration on TLDs. It represents the first step of a Two-PR deployment strategy, deploying the database schema changes in advance of the server logic. Specifically, it replaces the `expiry_access_period_enabled` boolean column (originally introduced in PR google#2804) with a new `expiry_access_period_transitions` hstore column. Why we are making this change: A basic boolean flag only allows an immediate, manual on/off toggle. To launch XAP on a TLD, registry operators would have to manually flip the flag at the exact launch time, which is operationally fragile and cannot be planned in advance. Refactoring this to an hstore-backed timed transition map (mapping Instant to ExpiryAccessPeriodMode) allows operators to schedule the XAP launch in advance via TLD YAML configurations. The registry will automatically transition the TLD to the ENABLED mode at the scheduled timestamp, aligning with how other scheduled TLD changes (like TLD states and EAP fee schedules) are managed. Since the original boolean column was never mapped in Java (PR google#2804 only added the database column), it is completely safe to drop it immediately in this migration. To ensure backward compatibility with running servers (which are still executing the old Java code during the deployment transition), the new column is added as `NOT NULL` with a temporary `DEFAULT` constraint. This prevents constraint violations on inserts from old servers. A TODO has been left in the SQL migration to drop this default in a subsequent schema release once the Java changes have been deployed. TAG=agy CONV=88271e71-e272-40e0-85f8-a075a423b7c2
CydeWeys
added a commit
to CydeWeys/nomulus
that referenced
this pull request
Jul 6, 2026
This commit implements the Expiry Access Period (XAP) feature for domain deletions, allowing a TLD to be configured with a timed launch schedule to charge a fee for domain registration during a configurable period after deletion. This represents the second step of a Two-PR deployment strategy, deploying the server logic after the database schema changes are live. It refactors the TLD configuration to replace the `expiry_access_period_enabled` boolean column (originally introduced in PR google#2804) with a new `expiry_access_period_transitions` hstore column to support timed launch schedules. Key changes: - Refactored Tld.java to replace the expiryAccessPeriodEnabled boolean with expiryAccessPeriodTransitions, a TimedTransitionProperty of ExpiryAccessPeriodMode (DISABLED/ENABLED), allowing scheduled activation of XAP on a TLD. - Implemented ExpiryAccessPeriodModeTransitionUserType for mapping the XAP mode transitions to a PostgreSQL hstore column in Hibernate. - Implemented TimedTransitionPropertyExpiryAccessPeriodModeDeserializer in EntityYamlUtils.java to support Jackson serialization/deserialization of XAP mode transitions from TLD YAML configurations. - Updated DomainPricingLogic.java, DomainCreateFlow.java, and DomainCheckFlow.java to query the XAP mode transitions map at the transaction/pricing time. - Updated all 14 test TLD YAML files to use the transition map format, default-initializing them to DISABLED at UNIX epoch. - Updated the generated database schema mapping (db-schema.sql.generated) to include the new hstore column mapping. - Added comprehensive integration tests in DomainCheckFlowTest.java (testFeeExtension_xapLabel_std_v1) and corresponding XML test data to verify XAP fee checks. - Fixed and updated unit tests in DomainPricingLogicTest.java, AllocationTokenFlowUtilsTest.java, and ConfigureTldCommandTest.java to align with the new transition map configurations. TAG=agy CONV=88271e71-e272-40e0-85f8-a075a423b7c2
This file contains hidden or 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
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.
This is the first in a series of PRs to implement the expiry access period (XAP). The overall fee schedules will be set in YAML config files, so the only DB change necessary should be this single new boolean column on the Tld entity, which defaults to false so as to require XAP explicitly being turned on for a given TLD.
BUG=http://b/437398822
This change is