-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add label to extension analyze API #1132
Conversation
This adds the new `label` option as the last optional parameter of the `analyze` function, allowing `phylum-ci` to use the extension API for its analysis.
I plan to remove the extension itself before merging this, since it's probably better to have it in the |
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.
Local testing has not been performed yet...but it will be if/when the suggested changes are made.
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 changes were tested locally and found to work with phylum-ci
after a few changes were made in that repo. The real trick is making a ci
extension available in the phylum-ci
Docker image.
The current method for making phylum
available in the image relies on the custom/hidden --global-install
option. Something similar may have to be done for this extension since the expectation is that using phylum extension install
will result in an extension installed in the root
user's directory and then not be available to non-root users.
Perhaps the extension could be copied manually to a globally accessible directory (like the binary is) and then accessed with a phylum extension run
command instead of a phylum ci
command.
Can't you just install it as root? |
Maybe...if the permissions can also be changed to allow access by non-root users. There are some environments...like Azure Pipelines...where a container is created from the image with a non-root user. From previous issue covering this:
|
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 example ci
extension has been tested and shown to work in the phylum-ci
repo. It can be removed from this PR now if that is still the plan. The rest of the code changes in this PR are desired in a release candidate for use in a new phylum-ci
release.
I've moved the extension to phylum-dev/phylum-ci#267 for now. |
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.
LGTM.
This adds the new `label` option as the last optional parameter of the `analyze` function, allowing `phylum-ci` to use the extension API for its analysis.
This adds the new
label
option as the last optional parameter of theanalyze
function, allowingphylum-ci
to use the extension API for its analysis.Closes #1131.