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

refactor: Allow provisioner jobs to be disconnected from projects #194

Merged
merged 12 commits into from
Feb 8, 2022

Conversation

kylecarbs
Copy link
Member

This enables flows for validating project versions before committing to an update.

# Making modifications to Terraform...
$ coder projects plan .
# Job run output so they can see if it's successful.
# We'll also output expected resources, and whether they have agents assigned or not.

By doing this, we also allow for a nice creation flow. Variables can be parsed and validated before a project has been created.

$ coder projects create .
? Set up "/tmp/asd" in organization? [Y/n] 
? What's your project's name? (asd) testing
◲ Parsing project source for variables...
19:27:00  [coder] Unpacking archive...
19:27:00  [coder] Unpacked archive: 642ms
19:27:00  [terraform] Initializing...
19:27:00  [coder] Found variables!
◲ Missing required parameters!
? Enter a value for "aws_secret_key": <some secret>
? Enter a value for "aws_access_key": <some secret>

> Project imported!

  Parameters

    aws_access_key (inherited from organization)
    aws_secret_key (inherited from organization)
    region (user-specifiable, defaults to "us-central1-a")

  Resources

    ec2_disk
    ec2_instance (deleted when workspace stops)

@kylecarbs kylecarbs self-assigned this Feb 8, 2022
@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #194 (91112e5) into main (4c5e443) will decrease coverage by 0.28%.
The diff coverage is 69.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
- Coverage   68.14%   67.86%   -0.29%     
==========================================
  Files         108      110       +2     
  Lines        5795     5953     +158     
  Branches       68       68              
==========================================
+ Hits         3949     4040      +91     
- Misses       1474     1524      +50     
- Partials      372      389      +17     
Flag Coverage Δ
unittest-go-macos-latest 65.65% <69.92%> (-0.34%) ⬇️
unittest-go-ubuntu-latest 67.18% <69.92%> (+0.13%) ⬆️
unittest-go-windows-latest 65.65% <69.92%> (-0.25%) ⬇️
unittest-js 64.66% <ø> (ø)
Impacted Files Coverage Δ
coderd/provisionerjobs.go 66.32% <52.63%> (ø)
codersdk/provisioners.go 57.28% <53.57%> (-4.45%) ⬇️
coderd/projects.go 62.96% <54.76%> (-5.00%) ⬇️
coderd/files.go 67.56% <67.56%> (ø)
coderd/projectversion.go 63.20% <67.74%> (-3.47%) ⬇️
httpmw/projectversionparam.go 72.50% <70.00%> (-3.98%) ⬇️
coderd/provisionerdaemons.go 52.50% <73.46%> (+0.97%) ⬆️
coderd/projectparameter/projectparameter.go 70.13% <74.07%> (+1.71%) ⬆️
codersdk/files.go 76.92% <76.92%> (ø)
codersdk/client.go 56.16% <78.57%> (+4.64%) ⬆️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c5e443...91112e5. Read the comment docs.

Copy link
Contributor

@bryphe-coder bryphe-coder left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kylecarbs kylecarbs merged commit 7364933 into main Feb 8, 2022
@kylecarbs kylecarbs deleted the import branch February 8, 2022 18:00
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.

None yet

2 participants