Skip to content

fix: AJDA-3010 make data-apps migration command usable stack-wide#103

Open
sykora-ji wants to merge 4 commits into
mainfrom
sykorajiri-AJDA-3010
Open

fix: AJDA-3010 make data-apps migration command usable stack-wide#103
sykora-ji wants to merge 4 commits into
mainfrom
sykorajiri-AJDA-3010

Conversation

@sykora-ji

@sykora-ji sykora-ji commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes two bugs in manage:migrate-data-apps-orchestrator-tasks (from #101 / AJDA-2445) found while actually running the dry-run against a real stack for AJDA-3010:

  • createProjectStorageToken didn't grant componentAccess, so on projects that restrict component access by default the command's own temporary token got a 403 "You don't have access to the resource." when listing keboola.orchestrator/keboola.flow configs — the dry-run couldn't scan anything on those projects.
  • migrateAllProjects (<projects>=all) called listOrganizationProjects unguarded, so a 401 from an organization the Manage token can't access crashed the entire stack-wide run instead of skipping that org and continuing.

Also adds AGENTS.md/CLAUDE.md documenting the repo's architecture and conventions for AI coding agents (doc-only, unrelated to the fixes above).

Test plan

  • vendor/bin/phpunit tests/MigrateDataAppsOrchestratorTasksTest.php
  • Verified live: dry-run against a single project (20570, North Europe) with a manually-created test keboola.flow config referencing keboola.data-apps now correctly reports the task as migratable, where it previously failed with the 403 above.
  • Verified live: dry-run with <projects>=all on North Europe no longer crashes on encountering an inaccessible organization.
  • Full stack-wide dry-run to completion (in progress as part of AJDA-3010 scoping)

Jiří Novák added 2 commits July 17, 2026 11:23
… token

Without an explicit componentAccess grant, projects that restrict component
access by default reject listComponentConfigurations for keboola.orchestrator
and keboola.flow with a 403, breaking the dry-run and force migration on
those projects.
…tion

migrateAllProjects called listOrganizationProjects unguarded, so a 401 from
an organization the Manage token can't access (e.g. it isn't a member/admin
there) crashed the whole "all" run instead of skipping that organization.
@linear-code

linear-code Bot commented Jul 17, 2026

Copy link
Copy Markdown

AJDA-3010

@sykora-ji
sykora-ji requested a review from Copilot July 17, 2026 11:13
@sykora-ji
sykora-ji marked this pull request as ready for review July 17, 2026 11:14

Copilot AI left a comment

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.

Pull request overview

Improves the reliability of the manage:migrate-data-apps-orchestrator-tasks operations command when running against an entire stack by ensuring it can scan restricted projects and won’t abort the whole run when encountering an inaccessible organization.

Changes:

  • Add explicit componentAccess grants to the short-lived per-project Storage token so config listing/reads work on projects with restricted default component access.
  • Guard organization project listing with exception handling so stack-wide runs can continue past inaccessible organizations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Keboola/Console/Command/MigrateDataAppsOrchestratorTasks.php
…rror

Addresses Copilot review feedback on #103: catching any ManageClientException
around listOrganizationProjects would also swallow transient/server-side
failures (429/5xx), silently under-reporting the migration scope. Rethrow
anything that isn't an authorization error.
@sykora-ji
sykora-ji requested a review from MiroCillik July 17, 2026 11:40
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.

2 participants