-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow and deny list #35
Conversation
operation_services = [] | ||
runner_parameters = operation.pop("runner_parameters", {}) | ||
if "allowlist" in runner_parameters.keys(): | ||
for service in SERVICES[operation["id"]]: |
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.
We need a safety check here that operation["id"] is present in SERVICES. #36
if service["id"] in runner_parameters["allowlist"]: | ||
operation_services.append(service) | ||
else: | ||
for service in SERVICES[operation["id"]]: |
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.
Same here
service_operation_responses = [] | ||
for service in SERVICES[operation["id"]]: | ||
for service in operation_services: |
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.
We should have a check prior to this line that we actually have any operation_services. If we don't we should send something helpful. See #36
@@ -7,9 +7,9 @@ httpcore==0.13.7 | |||
httpx==0.18.1 | |||
idna==3.3 | |||
pydantic==1.9.0 | |||
reasoner-pydantic==2.1.0 | |||
reasoner-pydantic==2.2.1 |
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.
A new version of reasoner-pydantic will be out very soon. We might want to wait to merge this until after upgrading.
@@ -1,4 +1,4 @@ | |||
fastapi==0.63.0 | |||
httpx==0.18.1 | |||
reasoner-pydantic==2.1.0 | |||
reasoner-pydantic==2.2.1 |
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.
Wait for new version. See above.
I think it would be best to address these issues in a separate branch, for tracking purposes. This pull request is an enhancement. I plan on creating a separate pull request to handle bug fixes. |
Fair enough. |
This implements the usage of the allow and deny list as discussed by the Operations and Workflows Working Group.
Currently, this utilizes the SmartAPI title for the service, as discussed during the last working group meeting. Before merging, it should be decided whether this is really the route to take, or whether or not it is more appropriate to use infores identifiers.