-
Notifications
You must be signed in to change notification settings - Fork 157
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
base: ms.add-app-logs-to-devp
Are you sure you want to change the base?
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 success2111 tests passing in 930 suites. Report generated by 🧪jest coverage report action from e755a53 |
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?
@@ -23,12 +25,16 @@ interface Props { | |||
apiKey: string | |||
} | |||
storeName: string | |||
organizationId: string | |||
appId: string |
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.
Do we still need the appId
here? I see it was deleted from the subscribe code
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.
Nope! Not needed now, will remove :)
49c65b6
to
fa530fe
Compare
54a0f72
to
fc01c3f
Compare
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/shopify-functions/issues/605
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