Skip to content

Automate default policies update process#18

Open
jopemachine wants to merge 15 commits intolablup:mainfrom
jopemachine:main
Open

Automate default policies update process#18
jopemachine wants to merge 15 commits intolablup:mainfrom
jopemachine:main

Conversation

@jopemachine
Copy link
Copy Markdown
Member

@jopemachine jopemachine commented Dec 9, 2022

@jopemachine jopemachine linked an issue Dec 9, 2022 that may be closed by this pull request
@jopemachine jopemachine force-pushed the main branch 4 times, most recently from ff69af1 to b4a733b Compare December 12, 2022 02:12
@jopemachine jopemachine changed the title [WIP] Automates default policy update Automates default policy update Dec 12, 2022
@jopemachine jopemachine marked this pull request as ready for review December 12, 2022 02:21
@jopemachine jopemachine changed the title Automates default policy update Automate default policies update process Dec 12, 2022
Comment thread scripts/update-policy.py Outdated
return super(OYAMLDumper, self).increase_indent(flow, False)


def lense(obj, *args):
Copy link
Copy Markdown
Member Author

@jopemachine jopemachine Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote this utility function to simplify codes,
but I think utility like dot-prop looks also good.

get_property({'foo': {'bar': 'unicorn'}}, 'foo.bar');
//=> 'unicorn'

get_property({'foo': {'bar': 'a'}}, 'foo.notDefined.deep');
//=> None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a well-packaged 3rd-party library with a clean API, I think it is also good to use one.

Copy link
Copy Markdown
Member Author

@jopemachine jopemachine Dec 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied and pasted the nmget code, but maybe making it as a separate lib named nmget might be better idea to maintain.

Comment thread scripts/update-policy.py Outdated
return super(OYAMLDumper, self).increase_indent(flow, False)


def lense(obj, *args):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread scripts/update-policy.py Outdated
return super(OYAMLDumper, self).increase_indent(flow, False)


def lense(obj, *args):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a well-packaged 3rd-party library with a clean API, I think it is also good to use one.

Comment thread scripts/create-pr.py Outdated
@jopemachine jopemachine reopened this Jan 7, 2023
@jopemachine jopemachine marked this pull request as draft January 7, 2023 05:07
@jopemachine jopemachine marked this pull request as ready for review January 7, 2023 06:44
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 26, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jopemachine
❌ Ubuntu


Ubuntu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update seccomp profiles

3 participants