-
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
adding bugfix and test for persistent volume template #76
Conversation
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 suggestions.
} | ||
vct_spec = case_insensitive_dict_get(volume_claim_template, "spec") | ||
if vct_spec: | ||
vct_access_modes = case_insensitive_dict_get(vct_spec, "accessModes") |
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.
Add a null check for vct_access_modes before checking its contents to avoid potential errors.
vct_access_modes = case_insensitive_dict_get(vct_spec, "accessModes") | |
if vct_access_modes and config.VIRTUAL_NODE_YAML_READ_ONLY_MANY in vct_access_modes: |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@@ -1104,45 +1106,63 @@ def load_policy_from_virtual_node_yaml_str( | |||
envs += config.VIRTUAL_NODE_ENV_RULES_WORKLOAD_IDENTITY | |||
|
|||
# command | |||
command = case_insensitive_dict_get(container, "command") or [] | |||
command = case_insensitive_dict_get(container, config.VIRTUAL_NODE_YAML_LIFECYCLE_COMMAND) or [] |
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 command field should refer to the container's command, not the lifecycle command. Use the correct config field for the container's command.
command = case_insensitive_dict_get(container, config.VIRTUAL_NODE_YAML_LIFECYCLE_COMMAND) or [] | |
command = case_insensitive_dict_get(container, config.VIRTUAL_NODE_YAML_COMMAND) or [] |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
75b45b3
to
47fb191
Compare
* build: add cicd pipeline (#7) * build: move update version logic to workflow (#8) * build: Run CI on multiple python version (#38) * build: Run CI in Python 3.8-3.11 * build: remove pull request event for CI to avoid duplicate runs * feat: enable openapi spec from url in api register (#74) * feat: enable openapi spec from url in api register * refactor: set spec definition as link format when link provided * fix: fix style * test: add error handling case for testing invalid spec url * fix: fix test case * fix: use 404 response url * test: update case * test: update test case * refactor: update error logic * test: update test case to setup live test pipeline (#76) * test: update test case to setup live test pipeline (#75) * test: update test case * update * . * . * . * . * . * . * . * . * . * . * . * test: update test case * refactor: enable both identity * fix: bad if else * fix: fix bad parameter * refactor: add example (#77) * refactor: add example * fix: update params * fix: bad api id * refactor: add @filename.json examples (#78) * refactor: add example * fix: update params * fix: bad api id * refactor: add @filename.json examples * refactor: update * refactor: add error handling (#79) * refactor: add error handling * refactor: catch internal error * fix: revert the change * feat: support APIM/APIC sync (#80) * feat: add APIM/APIC sync commands * feat: rename apim to azure-api-management * style: fix code style * fix: sync property names with new API spec * Revert "fix: sync property names with new API spec" This reverts commit 04da67e. --------- Co-authored-by: frankqianms <frankqian@microsoft.com> * feat: resolve feedback and fix examples (#82) * feat: resolve feedback and fix examples * style: fix code style * feat: amazon api gateway sync (#81) * feat: add APIM/APIC sync commands * feat: rename apim to azure-api-management * style: fix code style * fix: sync property names with new API spec * feat: add aws api gateway sync command * Revert "fix: sync property names with new API spec" This reverts commit 04da67e. * refactor: add amazonApiGatewaySource * refactor: refactoring apim sync and amazon sync * refactor: refactor cmd structure to make apim and aws sync seperated * fix: remove log print * chore: generate new cmds * refactor: update version and remove import * feat: add `apic integration create amazon-api-gateway` * fix: style * fix: change query param api-version * revert changes in _delete.py * fix: some neede fixs * fix: add the help sentence * refactor: make params clear * refactor: handle msi-resource-id * refacor: revert flatten of apim resource * fix: use 06-01-preiew currently * fix: style * refactor: arg groups * fix: bad short param name * chore: re-generate * fix: old resource_id name * chore: arg group * chore: naming * fix: fix according to comments * chore: update * fix: style --------- Co-authored-by: Chaoyi Yuan <chyuan@microsoft.com> * feat: add import amazon-api-gateway cmd (#83) * feat: add import amazon-api-gateway cmd * feat: change arg group and update parameter name --------- Co-authored-by: Chaoyi Yuan <chyuan@microsoft.com> * fix: use older version API (#84) * feat: rename command and param names (Azure#85) * feat: rename command and param names * doc: update comments * doc: update sample * test: add test case for sync cmd `apic integration create apim` and `apic integration create aws` (Azure#86) * test: add test case for apim sync * refactor: refactor for apim preparer * refactor: refactoring case and utils, optimize checkers * chore: remove print and add explaination * refactor: rename file * fix: try to fix error determing the version * revert: Remove specific azure-cli and azure-core installations * test: add aws sync testcase (Azure#87) * test: add test case for aws sync command * fix: remove key value * fix: remove pip install * chore: renaming constants * refactor: update the utils and test case * refactor: updated * fix: workaround for urllib3 package (Azure#88) * Revert "fix: workaround for urllib3 package (Azure#88)" (Azure#90) This reverts commit 1d508f4. * build: 1.2.0 beta 1 release * build: remove CI and CD files * doc: improve history * fix: set extention version to be preview * refactor: integration examples and bad example for `apic update` (Azure#91) * refactor: integration examples * fix: apic update example * chore: update log * test: add import-aws case and modify region --------- Co-authored-by: Chaoyi Yuan <blackchoey@gmail.com> Co-authored-by: Chaoyi Yuan <chyuan@microsoft.com>
Andrea found a bug where implicit volumes with volumeClaimTemplates were not being recognized. This adds them as an option and marks them as readonly if "ReadOnlyMany" is used when declaring.