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

Copyonwrite/248/add devcontainer setup #286

Merged
merged 14 commits into from
Oct 22, 2024

Conversation

copyonwrite
Copy link
Collaborator

Description

This PR adds support for the devcontainer standard.

devcontainers work OOTB for VSCode with the remote container extension and all versions of IDEA IDEs.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

  • Closes # (248)

Added tests?

  • 👍 yes
  • [x ] 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Added to documentation?

  • 📜 README.md
  • 🤝 Documentation pages updated
  • [x ] 🙅 no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • [ x] My code follows the style guidelines of this project
  • [ x] I have performed a self-review of my code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [ x] I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings
  • [ x] I have added tests that prove my fix is effective or that my feature works
  • [ x] New and existing unit tests pass locally with my changes

@MR2011
Copy link
Collaborator

MR2011 commented Oct 14, 2024

I think we should add a small note to our Readme that the devcontainer can be used for development

MR2011
MR2011 previously approved these changes Oct 14, 2024
@drochow
Copy link
Collaborator

drochow commented Oct 15, 2024

Doesn't work on my system:

image

🤔

@copyonwrite
Copy link
Collaborator Author

@drochow

The error message complains about a conflicting port. Did you shutdown all other docker containers running? You are running on macOS? @MR2011 Had trouble with a conflicting setting in his VS Code preferences.

Do you try to use the Makefile to run stuff?

The whole idea is, that you just run/need VS Code locally with only the remote container plugin, everything else is provided by the devcontainer, key ready.

We can also look into this together, although I have no idea about macOS etc.

@drochow
Copy link
Collaborator

drochow commented Oct 15, 2024

@copyonwrite

Well, it's not complaining about other services running that would occupy the port. Nonetheless, I have shut down the other Services and getting this error.

Do you try to use the Makefile to run stuff?

No I don't

Copy link
Collaborator

@drochow drochow left a comment

Choose a reason for hiding this comment

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

Not working on IntelliJ OSX ( but that might be an issue with IntelliJ OSX combination itself)

On VSCode I can start the container but:

  • E2E Tests are not working
  • DB Layer Tests are not working
  • Missing Ginkgo CLI to be added to the PATH

command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:mariadb
Copy link
Collaborator

Choose a reason for hiding this comment

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

I had to remove this line on IntelliJ to make the dev-container start


```
make start-all-heureka
```

### Devcontainers
Copy link
Collaborator

Choose a reason for hiding this comment

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

Requirements would be helpful:

Which Docker environements is the expected to work on?

e.g.: Does it also work with Podman?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also:

If we decide not to investigate the Intellij/OSX combination, we may add to the documentation on which systems this setup is recommended/working.

@drochow
Copy link
Collaborator

drochow commented Oct 15, 2024

@copyonwrite please use commit signing to sign your commits

@drochow
Copy link
Collaborator

drochow commented Oct 15, 2024

@copyonwrite Please use conventional commit format for commit messages and (more important) pull request titles

@MR2011 MR2011 merged commit 02bccec into main Oct 22, 2024
5 of 6 checks passed
@MR2011 MR2011 deleted the copyonwrite/248/add-devcontainer-setup branch October 22, 2024 11:43
dustindemmerle pushed a commit that referenced this pull request Oct 23, 2024
* Initial support for devcontainers

* Mound additional volume for heureka devcontainer

* Add licence headers

* Update README.md with devcontainer setup

* Add environment test variables for devcontainer

* Use devcontainer settings for tests in VSCode

* Use string instead of boolean for SEED_MODE variable in docker-compose.yml

* fix(test): added connection test for API Server

* fix(test): use wait group for waiting for listening instead of periodic check

* fix(test): removing AUTH_TYPE and AUTH_TOKEN_SECRET from compose yaml and set default AuthType to none

* fix(test): added FirstListenThenServe to utility pkg and added in nonblocking server start and seperate token test

---------

Co-authored-by: David Rochow <[email protected]>
Co-authored-by: Michael Reimsbach <[email protected]>
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.

3 participants