This commit implements a reliable connection error handling solution for the
Company Register API integration. The job previously failed when connection
errors occurred without proper recovery mechanisms.
The implementation:
Adds a lightweight Retryable module with configurable retry logic
Implements smart caching of API responses (1 day expiration)
Handles common network errors like KeepAliveDisconnected and timeouts
Provides a fallback mechanism when all retry attempts fail
Ensures test reliability with cache-skipping in test environment
Testing:
Added specific tests for both recovery and fallback scenarios
Verified cache behavior in production and test environments
Resolves connection errors observed in production logs without adding
unnecessary complexity to the codebase.
- Add flag in force_delete_data to track manual client_hold removal
- Update ProcessClientHold to respect manual status removal
- Add test to verify client_hold doesn't return after admin removes it
When an admin manually removes the client_hold status from a domain,
it should not be automatically re-added by the ProcessClientHold job.
This change tracks manual removals and prevents the status from being
re-added while maintaining the force delete process.
- Change error code from 2004 to 2306 for admin contact validation
- Add explicit validation check for required admin contacts
- Update tests to expect new error code
The error code 2306 better reflects the EPP standard for policy-based
validation failures. This change makes the error handling more consistent
with EPP specifications when validating admin contact requirements.
- Move company status handling logic into a separate method `handle_company_statuses`
- Improve code readability by splitting proceed_company_status method
- Keep status update logic after handling company statuses
- Add notes parameter to force delete interactions to provide more context
- Include company registry status in force delete notifications
- Add status mapping constants for better readability
- Move status note assignment before save in force delete process
Technical details:
- Add notes field to Domains::ForceDelete::Base interaction
- Update force delete notifications to include status notes
- Add REGISTRY_STATUSES mapping in CompanyRegisterStatusJob
- Update tests to verify new notification format
- Re-enable company validation logic for Estonian organization contacts
- Update company_register gem to use master branch
- Restore and update company validation tests
- Add additional check for Estonian country code in validation
This change ensures that only registered or liquidated Estonian companies
can be used when creating organizational contacts.
- Add new setting for allowed admin contact ident types
- Add validation for admin contact ident types on domain create/update
- Add UI controls for managing allowed ident types
- Add tests for new validation rules
- Update domain model to respect new settings
The changes allow configuring which identification types (private person,
organization, birthday) are allowed for administrative contacts. This is
enforced when creating new domains or adding new admin contacts.
feat: make technical contacts optional for all domains
- Remove automatic tech contact assignment from admin contacts
- Set minimum tech contacts to 0 for all registrant types
- Update tests to reflect optional tech contacts
- Keep max tech contacts limit from settings
This change implements the requirement to make technical contacts optional
for all domain types while maintaining the maximum limit from settings.
Previously tech contacts were required for organizations and automatically
copied from admin contacts.
- Add validation requiring admin contacts for legal entity registrants
- Add validation requiring admin contacts for underage private registrants:
- Under 18 years old for birthday-based identification
- Under 18 years old for Estonian ID numbers
- Make admin contacts optional for:
- Adult private registrants (18+ years)
- Adult Estonian ID holders
- Non-Estonian private registrants
- Add tests covering all new validation scenarios
- Add helper methods to calculate age and parse Estonian ID birth dates
- Add OrgRegistrantPhoneCheckerJob execution for contact creation and update
- Rename validate_* methods to maybe_validate_* for consistency
- Add tests for phone number validation in REPP API
- Fix method naming and add proper job arguments
This ensures phone numbers are validated against company register data
for Estonian organization contacts after creation or update.
- Replace RegistrantUser.find_by with Contact model query
- Add proper scoping for organization contacts from Estonia
- Include join with registrant domains
This ensures consistent contact lookup between bulk and single checker methods
This change makes admin contacts optional for private registrants while keeping them mandatory for organizations. The changes include:
- Updated Domain model validations to make admin and tech contacts optional (min=0) for private registrants
- Added validation rules methods to handle different requirements based on registrant type
- Modified EPP domain creation to support domains without admin contacts for private registrants
- Updated attach_default_contacts to skip adding contacts for private registrants
- Added comprehensive test coverage for:
- Domain model validations with private/org registrants
- EPP domain creation without admin contacts for private registrants
- REPP API contact management for private registrants
This implements the requirement to make admin contacts optional for private registrations of .ee domains while maintaining the existing validation rules for organizations.
WHAT:
- Removed debug output line from PostSetProcess
- Fixed force_delete_start date comparison in admin notifier job
WHY:
- Debug output was adding noise to logs and wasn't necessary
HOW:
- Removed puts statement for domain status debugging
- Changed query to use exact timestamp comparison for force_delete_start
- Add notification system for invalid company identifications
- Update force delete notifications to handle invalid company cases
- Add translations for invalid ident messages (ET/EN)
- Add test coverage for invalid ident scenarios
- Remove debug logging from force delete process
- Clean up unused CSV templates
This change improves handling of invalid company identifications in the
Estonian business registry by providing proper notifications to registrars
and ensuring appropriate status updates.
- Add test for checking companies with status K (DELETED) that should be scheduled for force delete
- Add test for checking companies that are not found in register and should be deleted
- Add company_details method to CompanyRegisterClientStub for mocking API responses
The tests verify that:
1. Companies with DELETED status are properly marked for force delete
2. Companies not found in register are marked as deleted and scheduled for force delete
3. Proper mocking of company_details API responses
- Refactor CompanyRegisterStatusJob for better readability and error handling
- Update whitelisted_companies to use JSON parsing with fallback
- Fix company register status check in tests with proper mock data
- Remove debug logging statements
- Add null check for domain status notes
- Update test dependencies (Capybara and Selenium) for better stability