Skip to content

fixes alias in migration for team calendar aligned fixes - #3535

Merged
akshaydeo merged 1 commit into
devfrom
05-16-fixes_alias_in_migration_for_team_calendar_aligned_fixes
May 15, 2026
Merged

fixes alias in migration for team calendar aligned fixes#3535
akshaydeo merged 1 commit into
devfrom
05-16-fixes_alias_in_migration_for_team_calendar_aligned_fixes

Conversation

@akshaydeo

@akshaydeo akshaydeo commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes invalid SQL table alias usage in the migrationAddTeamCalendarAlignedColumn migration and adds build artifacts from e2e test demo servers to .gitignore.

Changes

  • Removed table aliases (t) from UPDATE statements in the calendar-aligned backfill migration, replacing them with direct table name references. Some databases (e.g., PostgreSQL) do not support aliases in UPDATE statements in this form, which would cause the migration to fail.
  • Added compiled binaries for auth-demo-server and oauth-demo-server under examples/mcps/ to .gitignore to prevent e2e test build artifacts from being accidentally committed.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

Run the migration against a fresh or existing database and verify it completes without error:

go test ./framework/configstore/...

Confirm that building the e2e demo servers does not produce tracked files in git:

cd examples/mcps/auth-demo-server && go build .
cd examples/mcps/oauth-demo-server && go build .
git status  # binaries should not appear as untracked files

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

No security implications. The SQL fix removes table aliases that could cause migration failures; no auth, secrets, or PII are involved.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e33fbc95-118b-4095-a758-5686e0d78b62

📥 Commits

Reviewing files that changed from the base of the PR and between 4df33f5 and ad5c0c6.

📒 Files selected for processing (2)
  • .gitignore
  • framework/configstore/migrations.go

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated build configuration to exclude E2E test artifact directories.
    • Refined database migration infrastructure for improved SQL consistency.

Walkthrough

This pull request makes two minor maintenance updates: adding E2E test artifact ignore rules to .gitignore for demo server directories, and refactoring database migration SQL to remove table alias usage while preserving the calendar alignment backfill logic for governance teams.

Changes

Configuration and Migration Updates

Layer / File(s) Summary
E2E test artifact ignore rules
.gitignore
Added section to ignore E2E test artifact directories under examples/mcps/, specifically auth-demo-server/auth-demo-server and oauth-demo-server/oauth-demo-server.
Database migration SQL refactoring
framework/configstore/migrations.go
Rewrote migrationAddTeamCalendarAlignedColumn to remove table alias t from UPDATE statements; replaced t.id with governance_teams.id and t.rate_limit_id with rate_limit_id in the backfill queries for governance budgets and rate limits.

🎯 1 (Trivial) | ⏱️ ~3 minutes

A rabbit hops through configs clean,
Migrations refactored, aliases unseen,
Artifacts ignored, the test path grows wide,
No aliases hiding—all logic's in stride! 🐰✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 05-16-fixes_alias_in_migration_for_team_calendar_aligned_fixes

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


Comment @coderabbitai help to get the list of available commands and usage tips.

@akshaydeo
akshaydeo marked this pull request as ready for review May 15, 2026 19:45

akshaydeo commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

akshaydeo commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • May 15, 7:45 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 15, 7:46 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo merged commit 1ddcfeb into dev May 15, 2026
13 of 14 checks passed
@akshaydeo
akshaydeo deleted the 05-16-fixes_alias_in_migration_for_team_calendar_aligned_fixes branch May 15, 2026 19:46
@greptile-apps

greptile-apps Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge — the SQL fix is correct and narrowly scoped to two backfill statements in a single migration.

Both changed files are straightforward: the migration fix removes a bare table alias that broke the backfill on SQLite, and the .gitignore addition is harmless. The SQL rewrite is equivalent in semantics and works across all supported databases.

No files require special attention.

Important Files Changed

Filename Overview
framework/configstore/migrations.go Fixes SQL table alias syntax in the migrationAddTeamCalendarAlignedColumn backfill queries; removes t alias and uses the full table name inline for SQLite/cross-DB compatibility
.gitignore Adds ignore entries for compiled e2e demo-server binaries; file is missing a trailing newline

Reviews (1): Last reviewed commit: "fixes alias in migration for team calend..." | Re-trigger Greptile

Comment thread .gitignore

# e2e test artifacts
examples/mcps/auth-demo-server/auth-demo-server
examples/mcps/oauth-demo-server/oauth-demo-server No newline at end of file

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.

P2 The file is missing a trailing newline after the last line, which is flagged by many linters and editors and can cause noisy diffs in the future.

Suggested change
examples/mcps/oauth-demo-server/oauth-demo-server
examples/mcps/oauth-demo-server/oauth-demo-server

akshaydeo added a commit that referenced this pull request May 15, 2026
## Summary

Fixes invalid SQL table alias usage in the `migrationAddTeamCalendarAlignedColumn` migration and adds build artifacts from e2e test demo servers to `.gitignore`.

## Changes

- Removed table aliases (`t`) from `UPDATE` statements in the calendar-aligned backfill migration, replacing them with direct table name references. Some databases (e.g., PostgreSQL) do not support aliases in `UPDATE` statements in this form, which would cause the migration to fail.
- Added compiled binaries for `auth-demo-server` and `oauth-demo-server` under `examples/mcps/` to `.gitignore` to prevent e2e test build artifacts from being accidentally committed.

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [x] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

Run the migration against a fresh or existing database and verify it completes without error:

```sh
go test ./framework/configstore/...
```

Confirm that building the e2e demo servers does not produce tracked files in git:

```sh
cd examples/mcps/auth-demo-server && go build .
cd examples/mcps/oauth-demo-server && go build .
git status  # binaries should not appear as untracked files
```

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

No security implications. The SQL fix removes table aliases that could cause migration failures; no auth, secrets, or PII are involved.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
akshaydeo added a commit that referenced this pull request May 20, 2026
## Summary

Fixes invalid SQL table alias usage in the `migrationAddTeamCalendarAlignedColumn` migration and adds build artifacts from e2e test demo servers to `.gitignore`.

## Changes

- Removed table aliases (`t`) from `UPDATE` statements in the calendar-aligned backfill migration, replacing them with direct table name references. Some databases (e.g., PostgreSQL) do not support aliases in `UPDATE` statements in this form, which would cause the migration to fail.
- Added compiled binaries for `auth-demo-server` and `oauth-demo-server` under `examples/mcps/` to `.gitignore` to prevent e2e test build artifacts from being accidentally committed.

## Type of change

- [x] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Documentation
- [ ] Chore/CI

## Affected areas

- [x] Core (Go)
- [ ] Transports (HTTP)
- [ ] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

Run the migration against a fresh or existing database and verify it completes without error:

```sh
go test ./framework/configstore/...
```

Confirm that building the e2e demo servers does not produce tracked files in git:

```sh
cd examples/mcps/auth-demo-server && go build .
cd examples/mcps/oauth-demo-server && go build .
git status  # binaries should not appear as untracked files
```

## Screenshots/Recordings

N/A

## Breaking changes

- [ ] Yes
- [x] No

## Related issues

N/A

## Security considerations

No security implications. The SQL fix removes table aliases that could cause migration failures; no auth, secrets, or PII are involved.

## Checklist

- [ ] I read `docs/contributing/README.md` and followed the guidelines
- [ ] I added/updated tests where appropriate
- [ ] I updated documentation where needed
- [ ] I verified builds succeed (Go and UI)
- [ ] I verified the CI pipeline passes locally if applicable
@akshaydeo akshaydeo mentioned this pull request May 20, 2026
@coderabbitai coderabbitai Bot mentioned this pull request May 20, 2026
9 tasks
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.

1 participant