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

VSCode DevContainers bootstrapping cleanup #6688

Merged
merged 8 commits into from
Dec 30, 2024

Conversation

msheiny
Copy link
Contributor

@msheiny msheiny commented Dec 19, 2024

Closes: None

What's Changed

  • Removes some documentation that was no longer relevant related to VSCode DevContainers. Specifically, there is no need to create a docker-compose.override.yml to pass in the ARCH on Mac Silicon machines. This was fixed on the Dockerfile itself using a global TARGETARCH variable at some point.
  • Few couple helper invoke lines to generate an .env docker compose file for building. Not critical need but negates the need to keep this static default file up-to-date.
  • Updates the type in the vscode workspace file from python -> debugpy (at some point they'll deprecate the python type completely according to their documentation. I just noticed VSCode was flagging it while I was inspecting the file.
  • Adds the development/docker-compose.vscode-rdb.yml file to the DevContainer build file.

TODO

  • Explanation of Change(s)
  • Added change log fragment(s) (for more information see the documentation) - Couldn't grok whether this was needed without a previous issue attached?
  • Attached Screenshots, Payload Example N/A
  • Unit, Integration Tests Not needed, purely dev environment changes
  • Documentation Updates (when adding/changing features)
  • Example App Updates (when adding/changing features) N/A
  • Outline Remaining Work, Constraints from Design N/A

Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

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

Thank you! I don't use the VSCode dev container myself but these changes look reasonable to me so I'll take your word for it :-)

@glennmatthews
Copy link
Contributor

glennmatthews commented Dec 20, 2024

Added change log fragment(s) (for more information see the documentation) - Couldn't grok whether this was needed without a previous issue attached?

The CI tooling does enforce such a file regardless, but for a PR with no prior issue, you can use the PR number instead (so in this case, probably changes/6688.housekeeping would be appropriate). Thanks!

Michael Sheinberg added 4 commits December 20, 2024 09:26
From [docs](https://code.visualstudio.com/docs/python/debugging):

> You have "type" set to the deprecated value "python" in your
launch.json file: replace "python" with "debugpy" instead to work with
the Python Debugger extension.
This allows the debugger tasks to work out of the gate.
Instructions not necssary. Looks like this was
fixed in nautobot#4906
@msheiny msheiny force-pushed the vscode_dev_containers_cleanup branch from ba8cb59 to 67e9446 Compare December 20, 2024 17:26
@msheiny msheiny force-pushed the vscode_dev_containers_cleanup branch from 67e9446 to 1d3bc91 Compare December 20, 2024 17:35
@msheiny
Copy link
Contributor Author

msheiny commented Dec 20, 2024

Added change log fragment(s) (for more information see the documentation) - Couldn't grok whether this was needed without a previous issue attached?

The CI tooling does enforce such a file regardless, but for a PR with no prior issue, you can use the PR number instead (so in this case, probably changes/6688.housekeeping would be appropriate). Thanks!

okay, added to the latest revision 👍

Comment on lines +472 to 474
env_file_obj.write(f"PYTHON_VER={context.nautobot.python_ver}")

context.run(command, env={"PYTHON_VER": context.nautobot.python_ver})
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious - after #6659, do we need to also pass NAUTOBOT_VER to either of these calls, or is it not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh this call is just running code nautobot.code-workspace to reopen the current session using the workspace file so I dont really think we need PYTHON_VER passed into that at all. It's not like it keeps that environment around in my VSCode session (it doesn't seem to be visible in my terminal session at least)

@glennmatthews glennmatthews merged commit f4b8387 into nautobot:develop Dec 30, 2024
17 checks passed
@msheiny msheiny deleted the vscode_dev_containers_cleanup branch December 31, 2024 16:21
nrnvgh pushed a commit to nrnvgh/nautobot that referenced this pull request Jan 6, 2025
* Replace deprecated vscode task type

From [docs](https://code.visualstudio.com/docs/python/debugging):

> You have "type" set to the deprecated value "python" in your
launch.json file: replace "python" with "debugpy" instead to work with
the Python Debugger extension.

* Under VSCode Devcontainer mode, start nautobot in debug

This allows the debugger tasks to work out of the gate.

* ARCH over-ride not necessary for VSCode containers

Instructions not necessary. Looks like this was
fixed in nautobot#4906

* Create env-file for VSCode dev container user

* Include change fragment in PR

---------

Co-authored-by: Michael Sheinberg <[email protected]>
Co-authored-by: Glenn Matthews <[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.

2 participants