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

BUG: nodesSelectedByDefault apply result is false even set to true for local job #153

Open
minimorph223 opened this issue Nov 11, 2024 · 0 comments · May be fixed by #154
Open

BUG: nodesSelectedByDefault apply result is false even set to true for local job #153

minimorph223 opened this issue Nov 11, 2024 · 0 comments · May be fixed by #154

Comments

@minimorph223
Copy link

minimorph223 commented Nov 11, 2024

Hi there,

version

4.0.9

Affected Resource(s)

Please list the resources as a list, for example:

  • rundeck_job

Terraform Configuration Files

For the jobs which should be executed locally, if we set nodes_selected_by_default to true, after applied, the resource result is still false and always show up as change in terraform plan.
If we set it to false, job will get NodesetEmptyException error.

nodes_selected_by_default = true

Expected Behavior

set nodes_selected_by_default be true, after apply, the resource should be true.
I think the issue is caused by JobToResource func,

if err := d.Set("nodes_selected_by_default", job.NodesSelectedByDefault); err != nil {

If job.NodesSelectedByDefault is not set, nodes_selected_by_default is false.

However, for a local job, job.NodesSelectedByDefault is not set and the default value is True.
https://github.com/rundeck/rundeck/blob/9a4d9c49f5c2ba6a2485ae79c500e21fbc31550e/grails-rundeck-data-shared/src/main/groovy/rundeck/data/job/RdNodeConfig.groovy#L29

There is a similar issue rundeck/rundeck#5336. nodesSelectedByDefault need to be true even for local job.

Actual Behavior

it's always false now.

Steps to Reproduce

  1. neither node_filter_query nor node_filter_exclude_query is defined, the job should run locally.
    2.set nodes_selected_by_default=true, after terraform apply, the resource nodes_selected_by_default is still false.
@minimorph223 minimorph223 changed the title nodesSelectedByDefault apply result is false even set to true for local job BUG: nodesSelectedByDefault apply result is false even set to true for local job Nov 12, 2024
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 a pull request may close this issue.

1 participant