Skip to content

Commit

Permalink
Merge branch 'main' into jedrazb-fix-chicken-egg-problem-on-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrazb authored Nov 19, 2024
2 parents da50055 + 85078f8 commit 29ab438
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.ftest.wolfi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.elastic.co/wolfi/python:3.11-dev@sha256:b70abdb46f6a1ed5057fb50018924eea03345044b5224c260a3d0334a748eb96
FROM docker.elastic.co/wolfi/python:3.11-dev@sha256:62936d0d2db57c9bd195b31c1fcafff1413040ea94d37c88435487ebe041fb54
USER root
COPY . /connectors
WORKDIR /connectors
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.wolfi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.elastic.co/wolfi/python:3.11-dev@sha256:b70abdb46f6a1ed5057fb50018924eea03345044b5224c260a3d0334a748eb96
FROM docker.elastic.co/wolfi/python:3.11-dev@sha256:62936d0d2db57c9bd195b31c1fcafff1413040ea94d37c88435487ebe041fb54
USER root
COPY . /app
WORKDIR /app
Expand Down
4 changes: 3 additions & 1 deletion connectors/sources/outlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
html_to_text,
iso_utc,
retryable,
url_encode,
)

RETRIES = 3
Expand Down Expand Up @@ -410,7 +411,8 @@ async def _fetch_token(self):
)
async def get_users(self):
access_token = await self._fetch_token()
url = f"https://graph.microsoft.com/v1.0/users?$top={TOP}"
filter_ = url_encode("accountEnabled eq true")
url = f"https://graph.microsoft.com/v1.0/users?$top={TOP}&$filter={filter_}"
while True:
try:
async with self._get_session.get(
Expand Down
5 changes: 4 additions & 1 deletion tests/sources/test_outlook.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,10 @@ def side_effect_function(url, headers):
Args:
url, ssl: Params required for get call
"""
if url == "https://graph.microsoft.com/v1.0/users?$top=999":
if (
url
== "https://graph.microsoft.com/v1.0/users?$top=999&$filter=accountEnabled%20eq%20true"
):
return get_json_mock(
mock_response={
"@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$top=999&$skipToken=fake-skip-token",
Expand Down

0 comments on commit 29ab438

Please sign in to comment.