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

add e2e envs to devcontainer #2032

Merged
merged 15 commits into from
May 22, 2023
Merged

Conversation

ykadowak
Copy link
Contributor

@ykadowak ykadowak commented May 19, 2023

Description:

This PR adds E2E environment to our VS Code devcontainer. With this devcontainer environment, we can just start k8s cluster with k3d, deploy vald, and run e2e without any additional operation.

Made the following changes:

  • Changed devcontainer.json to build local Dockerfile because it's more flexible to customize dev environment for users and it does not take that much time to build anyway.
  • Separate Dockerfile for devcontainer because it requires some hacky things only for VS Code.
  • Enabled docker in docker feature of devcontainer to run E2E
  • Removed devcontainer settngs and extensions from devcontainer.json because a VS Code user usually has their own custom settings for them so I think we don't need to force them to use specific settings.

Related Issue:

Versions:

  • Go Version: 1.20.3
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 2.0.11

Checklist:

Special notes for your reviewer:

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 19, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8c202cb
Status: ✅  Deploy successful!
Preview URL: https://67fdc302.vald.pages.dev
Branch Preview URL: https://feature-devcontainer-update.vald.pages.dev

View logs

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

dockers/dev/Dockerfile Outdated Show resolved Hide resolved
dockers/dev/Dockerfile Outdated Show resolved Hide resolved
dockers/dev/Dockerfile Outdated Show resolved Hide resolved
dockers/dev/Dockerfile Show resolved Hide resolved
dockers/dev/Dockerfile Show resolved Hide resolved
@github-actions github-actions bot removed the size/M label May 19, 2023
@github-actions github-actions bot added size/M and removed size/M labels May 19, 2023
@ykadowak ykadowak requested review from a team, kevindiu, hlts2, vankichi and kpango and removed request for a team and hlts2 May 19, 2023 08:04
dockers/dev/README.md Outdated Show resolved Hide resolved
@@ -4,13 +4,13 @@

`vald-dev-container` is designed for the development of Vald on Docker.

This image includes some libraries required for implementation and is based on `ubuntu:devel` image.
This image includes some libraries required to develop Vald and is based on `mcr.microsoft.com/vscode/devcontainers/go:1` image.
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to show the specific URL of mcr.microsoft.com/vscode/devcontainers/go:1

Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

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

Dockerfile and devcontainer.json seem to fine

Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
@kpango
Copy link
Collaborator

kpango commented May 19, 2023

Others looks good to me.

Makefile.d/tools.mk Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/M and removed size/M labels May 22, 2023
@ykadowak ykadowak requested a review from kpango May 22, 2023 02:02
@kevindiu
Copy link
Contributor

It works on my apple silicon mac including auto completion of cgo dependencies (e.g. internal/core/ngt tests) and e2e tests.
Will approve this PR after update branch

@github-actions github-actions bot added size/M and removed size/M labels May 22, 2023
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

@ykadowak
Copy link
Contributor Author

@kevindiu

It works on my apple silicon mac including auto completion of cgo dependencies (e.g. internal/core/ngt tests) and e2e tests. Will approve this PR after update branch

By apple silicon mac, you mean opening VS Code devcontainer directly from mac os, not something like lima? Which I didn't expect to work because of its archtecture.

@kevindiu
Copy link
Contributor

@ykadowak yes, directly on macos with docker desktop.

Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM 💯

@vankichi vankichi merged commit 23c422c into main May 22, 2023
@vankichi vankichi deleted the feature/devcontainer/update-and-add-e2e-env branch May 22, 2023 04:04
@ykadowak ykadowak mentioned this pull request May 30, 2023
2 tasks
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.

5 participants