-
Notifications
You must be signed in to change notification settings - Fork 11
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
Defered in pools #36
Defered in pools #36
Conversation
hey @DrFaust92 what do you think of adding this toggle to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments, plus missing documentation.
if err != nil { | ||
return diag.Errorf("failed to create pool `%s` from Airflow: %s", name, err) | ||
} | ||
d.SetId(name) | ||
|
||
// Manually manage include_deferred in Terraform state | ||
d.Set("include_deferred", includeDeferred) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Should be set on read
@@ -89,6 +98,10 @@ func resourcePoolRead(ctx context.Context, d *schema.ResourceData, m interface{} | |||
d.Set("open_slots", pool.OpenSlots) | |||
d.Set("used_slots", pool.UsedSlots) | |||
|
|||
// Manually manage include_deferred in Terraform state | |||
includeDeferred := d.Get("include_deferred").(bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous, let's align with other set examples on that are above this do d.Get(...) inline in the set call
if err != nil { | ||
return diag.Errorf("failed to update pool `%s` from Airflow: %s", name, err) | ||
} | ||
|
||
// Manually manage include_deferred in Terraform state | ||
d.Set("include_deferred", includeDeferred) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above in create func
@@ -19,11 +19,12 @@ func TestAccAirflowPool_basic(t *testing.T) { | |||
CheckDestroy: testAccCheckAirflowPoolCheckDestroy, | |||
Steps: []resource.TestStep{ | |||
{ | |||
Config: testAccAirflowPoolConfigBasic(rName, 2), | |||
Config: testAccAirflowPoolConfigBasic(rName, 2, true), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not change the existing test and add a new one
Ok, I see the problem. This won't work (yet) as the provider is using an older version of the go sdk (2.5.0) and needs 2.7.0 to support this parameter. So we cannot merge this yet, and as far as I recall the go sdk hasn't been built yet for 2.7.0 and requires action upstream. address the comments for now and I'll take a look at updating the sdk version. I'm currently on vacation so this won't happen until at least 2 weeks from now. I'll try to get to this asap |
Any chance to have this? I would be happy to contribute if needed, just having the baseline would be helpful, is it possible to restore @tim-habitat? |
hey @kmehkeri sure, here i reinstated it and rebased off the curreent latest master of this repo. |
Uh... I went into this and only now realized what exactly DrFaust's earlier comment was about (dependency on PRs in Go Airflow client and Airflow itself). So indeed this needs to wait :/ |
Any updates @DrFaust92 ? I tried implementing this and ran into the same issue with the upstream airflow-go sdk... Since it's just generated from the openAPI spec seems we could just make another project for it if they won't maintain it... |
attempt at adding #35