-
Notifications
You must be signed in to change notification settings - Fork 248
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
fix: order of widgets on page matters #2531
base: main
Are you sure you want to change the base?
Conversation
Hi @ilakhtenkov - thank you for contributing code towards this issue! This has been around for quite some time now; while we had briefly explored the path you've tried (converting lists into sets and subsequent changes), we haven't been able to take it up completely owing to subsequent blockers we'd seen and time constraints to get them fixed, as we were (and are currently) juggling a couple of features, maintenance, EOLs and more. However, this can mostly get it working, so I'd suggest you to continue contributing to this further, after which I can have myself and the team review this PR; I'm certain we can get it integrated, unless this has any unexpected repercussions or causes newer issues. To be sure about this (as one of the ways to test your code changes) I'd recommend you to try making regular changes to your Terraform configuration (not relating to this issue) after the first Looking forward to your full-fledged contribution. Thank you! |
23a73db
to
4f7b20e
Compare
Hey team, Just wondering if this PR is still in the works? This is directly affecting our use of the provider and there is currently no workaround for our use case. We generate pages and widget dynamically based on a custom variable model (so that not everything is defined in a single file) and there is currently no way to maintain the order of widgets returned from API calls from the provider. It also doesn't look like the API is returning widgets in row/column order either, as it'll randomly order rows in the JSON it returns. @ilakhtenkov if you're not looking to take up this PR anymore I'm happy to take a look and try to implement the changes myself. |
Hi @FlareLine. This issue is still affecting my team. Unfortunately I have not had time to finish this up. Basically was done and working as expected I just need to rebase. The large part is unit tests that I will try to come to during xmass holidays. Manual testing of provider after I would push the final version of the code would be a really great help. |
07a703e
to
44cb7b8
Compare
…ng linting findings.
44cb7b8
to
39174c0
Compare
Hi @FlareLine I was looking at the issue today and it is not reproducable for me in version 3.53.0. Could you please confirm that this is still issue for you on the latest version. |
Hey @ilakhtenkov, I'll have a look when I'm back at work - currently on holidays so I'll shoot through some results when I can 😁 |
Description
Fixing issue: Order of widgets in page of
newrelic_one_dashboard
matters.Before change: change of order of widgets in
page {}
block creating terraform diff and resources recreation.After change: Reorder of widgets in
page {}
block detected by terraform and not producing diff.Important!
This change is WIP, currently it is only implemented for
widget_markdown
. For other widgets default parameters and hash functions should be adopted. As this work requested large amount of work. I want to hear contributors feedback first if they found this change useful and it could be potentially integrated.Fixes #1720, #1452
Type of change
Please delete options that are not relevant.
Checklist:
Please delete options that are not relevant.
How to test this change?
TODO: Run tests for all widgets, Run tests for providers update
Test Terraform code:
Steps:
terraform plan
and ensure that there is no diffiteration_map
terraform plan
and ensure that only widgets related to the changed map element are producing diff.