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 support for nomad 0.9.3 update stanza "auto_promote" property #68

Closed
wants to merge 3 commits into from
Closed

Add support for nomad 0.9.3 update stanza "auto_promote" property #68

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 14, 2019

No description provided.

@cgbaker
Copy link
Contributor

cgbaker commented Jun 27, 2019

Thanks for this, will look at it when I get back to work next week.

@JanBerktold
Copy link

@cgbaker What is the status here? :)

Copy link
Contributor

@cgbaker cgbaker left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @transferkraM. I don't believe this is going to work without updating the dependency on the Nomad API client. Please add tests to document that this capability (job datasource only) works as expected.

@@ -885,6 +886,7 @@ resource "nomad_job" "test" {
healthy_deadline = "6m"
progress_deadline = "11m"
auto_revert = true
auto_promote = true
Copy link
Contributor

Choose a reason for hiding this comment

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

this test was looking at new config for the 0.9.0 API... auto_promote should be part of a separate test for 0.9.3. such a test should verify that this option is successfully being submitted to Nomad.

@@ -1603,6 +1603,7 @@ func parseUpdate(result **api.UpdateStrategy, list *ast.ObjectList) error {
"healthy_deadline",
"progress_deadline",
"auto_revert",
"auto_promote",
Copy link
Contributor

Choose a reason for hiding this comment

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

the api.UpdateStrategy object that this attempting to parse into doesn't have an AutoPromote field, because the dependency version for the Nomad API needs to be updated.

"auto_promote": {
Type: schema.TypeBool,
Computed: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a test to datasource_nomad_job_test.go to test this is working; i don't believe that it is.

@AndrewScibek
Copy link

I made a pr against his fork that makes this functionality work for my use case(updating the dependencies). https://github.com/transferkraM/terraform-provider-nomad/pull/1

@cgbaker can you expand how i can make the test for different versions or point me to the docs that let me know how I can do it? This is a useful feature that i would like merged

@ghost ghost added the dependencies label Jul 30, 2019
@cgbaker
Copy link
Contributor

cgbaker commented Aug 1, 2019

Thanks @AndrewScibek. I'll take a look at this.

@mikeblum
Copy link

Any update on this PR? Looking forward to using this.

@cgbaker cgbaker added this to the 1.4.2 milestone Sep 5, 2019
@lgfa29 lgfa29 closed this in #80 Oct 7, 2019
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.

None yet

4 participants