Skip to content
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

feat: Initial implementation of copa extension #1

Merged
merged 14 commits into from
Jun 26, 2024

Conversation

jgrer
Copy link
Collaborator

@jgrer jgrer commented Jun 18, 2024

  • Added a switch to tell the extension if the user is using containerd image store or not
  • Inserted a tooltip next to the switch that links to the docker documentation explaining containerd image store
  • Added MUI icons package to use the information icon for the tooltip
  • fetchData() is now called when the user selects containerd image store instead of when the app component first renders
  • Added client-side validation to make sure an image name is supplied with a tag
  • Created a new component, commandline.tsx, that displays a formatted version of the stdout and stderr from the copa-extension container
  • Added an IconButton using the ChevronRightIcon and ExpandMoreIcon from the MUI icons package to show/hide the command line component whenever needed
  • Removed View Copa Output button and Dialog because of the new dropdown command line feature
  • Fixed style error with the label for the scanner input being covered by the border of the select component
  • Fixed style error with the Copa Version and Trivy Version select boxes being misaligned
  • Fixed the svg file for the Copa logo having a white background

@ashnamehrotra
Copy link
Contributor

@jgrer the PR needs a semantic title, for example "feat: Initial implementation of copa extension". Also PRs with commits under project-copacetic need sign-off. You can amend your commits with the git commit --amend -s command to include signoff via -s.

@jgrer jgrer changed the title Initial implementation of copa extension feat: Initial implementation of copa extension Jun 19, 2024
@jgrer jgrer force-pushed the new-features branch 2 times, most recently from e5988b7 to 9e26fa2 Compare June 19, 2024 17:35
ui/src/app.tsx Outdated Show resolved Hide resolved
ui/src/app.tsx Outdated Show resolved Hide resolved
ui/src/app.tsx Outdated Show resolved Hide resolved
ui/src/copainput.tsx Show resolved Hide resolved
ui/src/copainput.tsx Show resolved Hide resolved
ui/src/copainput.tsx Outdated Show resolved Hide resolved
if (numColons > 1) {
foundError = true;
setSelectedImageHelperText("Image input can only have one colon.");
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add another check case for if there is no colon? Either it should get latest as default or require the user input it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

currently it patches the latest as default, there could be a way to make this more obvious?

Copy link
Contributor

Choose a reason for hiding this comment

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

small bug - if we do not add a tag, for example the image input is just "test" the error message says Failed to patch test: instead of Failed to patch test:latest

@ashnamehrotra
Copy link
Contributor

when running this locally with nginx:1.21.6, I see "Failed to patch nginx:1.21.6: Undefined error." and the following on the console: docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "nginx:1.21.6": executable file not found in $PATH: unknown. Maybe I am missing something from the setup?

For errors that don't match one of the cases, we should also add a default message to prevent undefined.

@jgrer jgrer requested a review from ashnamehrotra June 21, 2024 19:02
@ashnamehrotra ashnamehrotra requested a review from sozercan June 25, 2024 19:08
@ashnamehrotra ashnamehrotra merged commit d97bb89 into project-copacetic:main Jun 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants