Skip to content

Fix: Fix short linking is not enabled by default#1051

Merged
JiahuiWho merged 4 commits intodevelopfrom
fix-short-linking
Feb 11, 2026
Merged

Fix: Fix short linking is not enabled by default#1051
JiahuiWho merged 4 commits intodevelopfrom
fix-short-linking

Conversation

@JiahuiWho
Copy link
Contributor

@JiahuiWho JiahuiWho commented Feb 10, 2026

What

Enable IsLinkShortenerEnabled when setup tenant
This is fix to #916

Why

Why my previous change did not work

  1. Migration 2023-03-16.0: Creates the organizations table and inserts a row — the org row now exists
  2. Migration 2025-01-30.0: Adds is_link_shortener_enabled column with DEFAULT false — since the row already exists from step 1, PostgreSQL backfills it with false
  3. Migration 2025-09-20.0 (my previous PR): Changes the default to true — but the row already exists with false from step 2, so SET DEFAULT has no effect

The SET DEFAULT only applies to future INSERT statements that omit the column. But the org row was already inserted in step 1, and the column was backfilled in step 2. By the time my migration runs, there's nothing left to insert — the damage is already done.

Known limitations

Since that migration was already merged and deployed, deleting it could cause the migration tool to get confused about its state on those environments. I'd just leave it in place, it's a no-op anyway.

Checklist

  • Title follows SDP-1234: Add new feature or Chore: Refactor package xyz format. The Jira ticket code was included if available.
  • PR has a focused scope and doesn't mix features with refactoring
  • Tests are included (if applicable)
  • CHANGELOG.md is updated (if applicable)
  • If contracts changed, run the Contract WASM Artifacts workflow and open a PR to update the WASMs on dev
  • CONFIG/SECRETS changes are updated in helmcharts and deployments (if applicable)
  • Preview deployment works as expected
  • Ready for production

@JiahuiWho JiahuiWho temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) February 10, 2026 16:29 — with GitHub Actions Inactive
@JiahuiWho JiahuiWho temporarily deployed to Internal SEP Tests February 10, 2026 16:29 — with GitHub Actions Inactive
@JiahuiWho JiahuiWho temporarily deployed to Internal SEP Tests February 10, 2026 16:31 — with GitHub Actions Inactive
@JiahuiWho JiahuiWho temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) February 10, 2026 16:31 — with GitHub Actions Inactive
@stellar-jenkins
Copy link

@JiahuiWho JiahuiWho changed the title Fix: fix short linking is not enabled by default Fix: Fix short linking is not enabled by default Feb 10, 2026
@JiahuiWho JiahuiWho marked this pull request as ready for review February 10, 2026 16:33
Copilot AI review requested due to automatic review settings February 10, 2026 16:33
@stellar-jenkins
Copy link

Something went wrong with PR preview build please check

@JiahuiWho JiahuiWho temporarily deployed to Internal SEP Tests February 10, 2026 16:38 — with GitHub Actions Inactive
@JiahuiWho JiahuiWho temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) February 10, 2026 16:38 — with GitHub Actions Inactive
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes tenant provisioning so that short-linking is effectively enabled by default by explicitly setting the organization’s is_link_shortener_enabled flag to true after tenant migrations run (avoiding the “existing row backfill” behavior that made the DB default change ineffective).

Changes:

  • Update tenant provisioning to set IsLinkShortenerEnabled=true on the organization during setupTenantData.
  • Add an Unreleased changelog entry documenting the fix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
stellar-multitenant/internal/provisioning/manager.go Sets IsLinkShortenerEnabled to true when provisioning a tenant so the org row isn’t left backfilled as false.
CHANGELOG.md Documents the fix under Unreleased “Fixed”.

@stellar-jenkins
Copy link

@JiahuiWho JiahuiWho temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) February 11, 2026 15:28 — with GitHub Actions Inactive
@JiahuiWho JiahuiWho temporarily deployed to Internal SEP Tests February 11, 2026 15:28 — with GitHub Actions Inactive
@stellar-jenkins
Copy link

@JiahuiWho JiahuiWho merged commit 3048f68 into develop Feb 11, 2026
17 checks passed
@JiahuiWho JiahuiWho deleted the fix-short-linking branch February 11, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants