-
Notifications
You must be signed in to change notification settings - Fork 0
patches call to indexclient #8
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
Open
bwalsh
wants to merge
8
commits into
development
Choose a base branch
from
feature/rbac
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1fc10fe
patches call to indexclient
bwalsh 29221a9
fix: checkout BRANCH
bwalsh c8ae908
docker build branch
bwalsh e06cdcc
fix: build $BRANCH
bwalsh dd0dd27
fix: RAW_BRANCH_NAME
bwalsh 22f8633
add git pull
bwalsh 3a2e0b0
clone only branch
bwalsh e894aac
remove debug statements
bwalsh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,14 @@ | ||
| FROM python:3.12 | ||
|
|
||
| ARG BRANCH=development | ||
| WORKDIR /app | ||
|
|
||
| ADD "https://api.github.com/repos/ACED-IDP/image_viewer/commits?per_page=1" latest_commit | ||
|
|
||
| RUN git clone https://github.com/ACED-IDP/image_viewer | ||
| # Clone the specific branch | ||
| RUN git clone --branch $BRANCH https://github.com/ACED-IDP/image_viewer.git | ||
|
|
||
| WORKDIR /app/image_viewer | ||
| RUN git checkout development | ||
|
|
||
| RUN pip install --no-cache-dir . | ||
| RUN git log --oneline | ||
| CMD ["uvicorn", "image_viewer.app:app", "--reload"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import indexclient.client | ||
|
|
||
|
|
||
| def monkey_patch_indexclient__get(): | ||
| """Monkey patch IndexClient._get to ensure 'auth' is set and log calls.""" | ||
| original__get = indexclient.client.IndexClient._get | ||
|
|
||
| def patched__get(self, *args, **kwargs): | ||
| """Patch to ensure 'auth' is set and log the call.""" | ||
| if 'auth' not in kwargs: | ||
| kwargs['auth'] = self.auth | ||
| return original__get(self, *args, **kwargs) | ||
|
|
||
| indexclient.client.IndexClient._get = patched__get | ||
|
|
||
|
|
||
| # main | ||
bwalsh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| monkey_patch_indexclient__get() | ||
bwalsh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The patch assumes that
self.authexists and is valid. Consider adding a check to ensureself.authis not None before assigning it, or handle the case where it might not be available.