-
Notifications
You must be signed in to change notification settings - Fork 5
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
initial new stream with integration logs #14
base: main
Are you sure you want to change the base?
Conversation
@Volna13 responding to https://meltano.slack.com/archives/CMN8HELB0/p1668691051252529?thread_ts=1668527444.888179&cid=CMN8HELB0 from slack here. In terms of pagination currently all stream classes inherit from SlackStream that defines next_page_token_jsonpath which is used in the SDK's get_next_page_token method. The paging info for those streams look like:
And youre new one for team.integrationLogs is different like:
You can override the Another thing to consider is that this stream requires higher level credentials (admin access) than the rest of the stream. We probably need to consider how to exclude this stream by default since auth/discovery for current users will fail. Does that makes sense? You can post in the slack channel #singer-tap-development if you need more help. @edgarrmondragon did I get that right? What do you think about the possibility of excluding this new stream by default since it requires admin privileges that most people wont have, how would we do that? We could also use stream selection in the hub definition that excludes it if needed 🤔 . We may want to get #13 in before this to bump the sdk version. |
@pnadolny13 Yup, a new implementation of
The Singer catalog spec has a class UnselectedStream(Stream):
@property
def metadata(self):
meta = super().metadata
# Deselect
if self._tap_input_catalog is None:
meta.root.selected = False
return meta That should work but I'm not a fan of 😅. I've logged meltano/sdk#1203 |
Thanks for the explanation about pagination. I will try to implement and add to this PR.
Regarding the fact that this should not be the default stream, I agree with you, I would be grateful if you could tell me how I can make this stream optional? (perhaps in order for it to work, we could somehow make it mandatory to be specified explicitly in the select) |
@pnadolny13 can you check my last commit? |
@Volna13 this looks good to me! I created meltano/hub#1055 to exclude this admin stream by default in MeltanoHub which I think would work vs Edgar's solution in #14 (comment). @edgarrmondragon would you mind reviewing this PR also. What do you think about the hub select criteria idea for excluding this stream by default? |
@Volna13 after getting some feedback from others it sounds like the best path forward for disabling this stream by default is to add a new config option as AJ describes in meltano/hub#1055 (comment). I think what that means is that we need to add an Line 73 in 2c932e3
include_admin_streams config option is set to true before adding the integration_log stream to the list.
|
Co-authored-by: Edgar R. M. <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
@Volna13 how is it going? Let us know when youre ready for a re-review. |
@pnadolny13 noticed that I did not take into account the fact that I did not add a way to replicate data for a new stream. Now I've switched to learning the orchestrator, but within a few days, I think I'll be done. I understand correctly that all the updates that we talked about above are already merged into this repository and I just need to update my repository and add a way to replicate data |
@Volna13 are you still looking to get this PR ready to merge? |
Kudos, SonarCloud Quality Gate passed! |
Goal: Add new stream with integration logs
Link to get IntegrationLogs: "https://slack.com/api/team.integrationLogs"
Response example:
{ "ok": true, "logs": [ { "user_id": "U0SSSSSV8A", "user_name": "username", "date": "1665778704", "change_type": "added", "app_type": "Stitch Test", "app_id": "AAAA4AAAA" }, { "user_id": "U03SSSSSA", "user_name": "username", "date": "1665777146", "change_type": "added", "app_type": "Slack Tooling Tokens Vendor", "app_id": "AAA4AAAAA", "scope": "identify,app_configurations:read,app_configurations:write" } ... ], "paging": { "count": 100, "total": 13, "page": 1, "pages": 1 } }