-
Notifications
You must be signed in to change notification settings - Fork 184
Integrates subscribe and fetchAppLogs with developer dashboard #5498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrates subscribe and fetchAppLogs with developer dashboard #5498
Conversation
65127cf
to
120f6ff
Compare
120f6ff
to
c645803
Compare
0f2fa07
to
d916529
Compare
Coverage report
Show files with reduced coverage 🔻
Test suite run success2116 tests passing in 931 suites. Report generated by 🧪jest coverage report action from b3ae5f7 |
We detected some changes at packages/*/src and there are no updates in the .changeset. |
@@ -1067,3 +1104,78 @@ function appModuleVersion(mod: ReleasedAppModuleFragment): Required<AppModuleVer | |||
}, | |||
} | |||
} | |||
|
|||
interface AppLogsSubscribeQueryVariables { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe once the core PR is merged, we can import these types. Leaving here for now.
2c025a3
to
e755a53
Compare
3ae5b5b
to
54a0f72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! A couple small questions
const fqdn = await appManagementFqdn() | ||
let url = `https://${fqdn}/app_management/unstable/organizations/${organizationId}/app_logs/poll` | ||
|
||
if (!cursor) { | ||
return url | ||
} | ||
|
||
url += `?cursor=${cursor}` | ||
|
||
if (filters?.status) { | ||
url += `&status=${filters.status}` | ||
} | ||
if (filters?.source) { | ||
url += `&source=${filters.source}` | ||
} | ||
|
||
return url | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is duplicated logic with generateFetchAppLogUrl
. What if we created a helper that handled the url params and generateFetchAppLogUrl
and generateFetchAppLogUrlDevDashboard
can call that function with whatever url they need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea good idea, I refactored this a bit in the previous PR by moving some of these helpers around. But I kept a general url builder helper in the utils addCursorAndFiltersToAppLogsUrl
, then within each client they handle the URL portion.
packages/app/src/cli/services/dev/processes/app-logs-polling.ts
Outdated
Show resolved
Hide resolved
49c65b6
to
fa530fe
Compare
54a0f72
to
fc01c3f
Compare
fa530fe
to
431253f
Compare
5c07499
to
b255d6a
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b255d6a
to
a40c0a1
Compare
a40c0a1
to
e1c562b
Compare
Sorry @jacobsteves , opened up a new stack here, pulled over the same changed. |
Requires: #5497
Requires: Partners - js.app-logs-prototype-2Request: Core - 03-07-expose_dev_dash_route_to_manage_app_logs
Part of: https://github.com/Shopify/temp-project-mover-Archetypically-20250320163947/issues/137
WHY are these changes introduced?
This PR adds app logs functionality to the
AppManagementClient
, allowing app logs to be fetched through the Developer Platform client interface.Key changes:
subscribeToAppLogs
andappLogs
methods inAppManagementClient
DeveloperPlatformClient
interface to includeorganizationId
andappId
parametersPartnersClient
will ignore themfetchAppLogsDevDashboard
inutils
WHAT is this pull request doing?
How to test your changes?
All tests have been updated to include the new required parameters. The implementation has been tested with both Partners API and Developer Dashboard API backends.
Currently need different shops / app setup.
With app that lives in partners (I used prod):
Spin Dev Dashboard Setup
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist