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

Move Dev Environment to MacOS #4879

Merged

Conversation

sgalsaleh
Copy link
Member

@sgalsaleh sgalsaleh commented Sep 11, 2024

What this PR does / why we need it:

Changes the dev environment to run locally on MacOS instead of Github Codespaces.

Benefits:

  • Much faster feedback loop
  • Better caching
  • Ability to integrate with and develop against the Embedded Cluster project

Which issue(s) this PR fixes:

SC-111503

Does this PR require a test?

NONE

Does this PR require a release note?

NONE

Does this PR require documentation?

NONE

Demo

https://www.loom.com/share/79da18e8cd5147efa2dc1811664b437a?sid=7600731b-3deb-40cc-ab7c-932380dd5184

@sgalsaleh sgalsaleh force-pushed the salah/sc-111503/improvements-to-kots-and-ec-dev-environment branch from eb9e7f1 to 7dafbb3 Compare September 12, 2024 14:51
@sgalsaleh sgalsaleh force-pushed the salah/sc-111503/improvements-to-kots-and-ec-dev-environment branch from 7dafbb3 to 712681e Compare September 12, 2024 15:02
Makefile Show resolved Hide resolved
@$(if ${DD_API_KEY}, $(call sendMetrics))
@rm start-time
OS ?= linux
ARCH ?= $(shell go env GOARCH)
Copy link
Member

Choose a reason for hiding this comment

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

the go build commands do not respect these vars. is that intended?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes because the kots cli will typically run on your mac, not inside the container. the one inside the container gets built differently.

README.md Show resolved Hide resolved
COPY cmd ./cmd
COPY pkg ./pkg
COPY web/webcontent.go ./web/webcontent.go
RUN go install github.com/go-delve/delve/cmd/[email protected]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RUN go install github.com/go-delve/delve/cmd/dlv@v1.22.1
RUN go install github.com/go-delve/delve/cmd/dlv@v1.23.0

Copy link
Member Author

Choose a reason for hiding this comment

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

i think there was a compatibility issue that one of the CRE engineers had to deal with when using the latest version, so i didn't wanna upgrade it.

- name: dlv
containerPort: 30001
resources:
limits:
Copy link
Member

Choose a reason for hiding this comment

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

any reason to limit this in dev?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, to mimic prod as there were times where that bit us. i guess we remove the limits on "up" so that might be sufficient?

@@ -0,0 +1,31 @@
#!/bin/bash

set -e
Copy link
Member

Choose a reason for hiding this comment

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

Its always best to start with -euo pipefail to prevent bugs down the line

Copy link
Member Author

Choose a reason for hiding this comment

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

i had it like that, but it was failing for me for some reason. i can try it again

@sgalsaleh sgalsaleh merged commit 2b804a7 into main Sep 12, 2024
117 checks passed
@sgalsaleh sgalsaleh deleted the salah/sc-111503/improvements-to-kots-and-ec-dev-environment branch September 12, 2024 20:11
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.

2 participants