refactor!: drop ID mapping file in v2.0.0 - #166
Merged
Merged
Conversation
Since #109, all event IDs are derivable from reservation IDs, making the google_calendar_mappings.json file obsolete. Reservations from before this change that still require mapping are now extremely rare in production, and those created after #109 need no mapping at all. This removes: - id_mapper.rs module and IdMapper struct - GOOGLE_CALENDAR_MAPPINGS_FILE environment variable - calendar_mappings_file from AppConfig - CALENDAR_MAPPINGS_FILE default configuration - All mapping lookups from repository operations The simplification reduces complexity: find_by_id and delete now directly use event IDs derived from reservation IDs, with fallback to scan all calendars only when needed. For reservations still carrying old mappings, the caveat from #111 applies: they will update to use their event ID upon next modification, as event descriptions are regenerated at that time. Addresses #111 for v2.0.0 release. BREAKING CHANGE: Removed GOOGLE_CALENDAR_MAPPINGS_FILE environment variable and google_calendar_mappings.json file. All reservations active at deployment time must have been created with v1.9.0 or later. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The note claimed the derivation boundary was v1.9.0, a version that never existed — event ids derive from reservation ids since v1.5.1 — and framed leftover pre-boundary reservations as breaking when they are renumbered and settle on update, as #111 records. Also drop the env var from the install script's summary, remove the dead resource-context helper instead of keeping it behind allow(dead_code), and give the fenced block the blank line markdownlint requires. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
KinjiKawaguchi
pushed a commit
that referenced
this pull request
Sep 21, 2026
🤖 I have created a release *beep* *boop* --- ## [2.0.0](v1.8.0...v2.0.0) (2026-09-21) ### ⚠ BREAKING CHANGES * google_calendar_mappings.json is no longer read and the GOOGLE_CALENDAR_MAPPINGS_FILE environment variable is gone (both are ignored if left in place; reservation ids copied from pre-v1.5.1 event descriptions stop resolving). In the library API, GoogleCalendarUsageRepository::new no longer takes the mappings path. * existing resources.toml files stop loading until calendar_id entries are moved into the [storage] section (see the migration guide). In the library API, load_config returns a (ResourceConfig, StorageConfig) pair, ServerConfig and RoomConfig lose their calendar_id field, and GoogleCalendarUsageRepository::new takes the StorageConfig. * TemplateConfig gains a conflict_item field, so struct-literal construction outside this crate needs updating. * DetectIdleReservationsUseCase loses its IdentityLinkRepository type parameter and constructor argument; judge_reservation_activity drops its owner_identities parameter; GpuUsageReport gains a required unattributed field; NotificationError gains a RecipientUnknown variant; public error enums are non_exhaustive, so external matches need a wildcard arm. ### Features * improve how multiple reservation conflicts are presented ([#164](#164)) ([bbfb86b](bbfb86b)) * judge idle reservations by the reserved device, not process identity ([#161](#161)) ([6141e74](6141e74)) ### Code Refactoring * drop the id-mapping file for calendar events ([#166](#166)) ([88570ee](88570ee)) * separate the storage mapping from resource definitions ([#165](#165)) ([cbc3fdc](cbc3fdc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
google_calendar_mappings.jsonfile andIdMapperstructGOOGLE_CALENDAR_MAPPINGS_FILEenvironment variable from AppConfig and configurationWhy
Since #109, all event IDs are deterministically derivable from reservation IDs (UUID hex representation). The mapping file was only needed for old reservations created before this change, which are now extremely rare. This removes unnecessary complexity while maintaining backward compatibility for the few remaining cases.
Test plan
cargo clippy --all-targets -- -D warningscargo testMigration notes
This is a BREAKING CHANGE for v2.0.0:
GOOGLE_CALENDAR_MAPPINGS_FILEfrom/etc/default/lab-resource-managergoogle_calendar_mappings.jsonfile can be safely deleted🤖 Generated with Claude Code