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

ASTRACTL-32772: bug fixes #362

Merged
merged 4 commits into from
Jun 5, 2024
Merged

Conversation

palicena
Copy link
Collaborator

@palicena palicena commented Jun 5, 2024

Two fixes for random bugs I found while testing some unrelated changes.

add_problem "$ns_warning"
else
prompt_user "NAMESPACE" "$ns_warning. Please enter the namespace:"
fi
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With prompts disabled, we were letting the user proceed without a NAMESPACE which would cause a fatal error down the road since we were trying to do operations involving an IMAGE_PULL_SECRET and relied on NAMESPACE also being set.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice catch!

elif [ -z "$output" ] || [ -n "$line" ]; then
add_problem "Failed to apply kustomize resources: $line"
fi
done < <(echo "$captured_err")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the apply command has both a set of warnings and errors, the warning would basically "hide" the actual errors since we were checking the whole string at once instead of line by line. We'd then continue with the rest of the script even though the apply failed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another good catch

Copy link

github-actions bot commented Jun 5, 2024

Code Coverage

Package Line Rate
github.com/NetApp-Polaris/astra-connector-operator/app/conf 75%
github.com/NetApp-Polaris/astra-connector-operator/app/deployer/connector 91%
github.com/NetApp-Polaris/astra-connector-operator/app/deployer 100%
github.com/NetApp-Polaris/astra-connector-operator/app/deployer/model 100%
github.com/NetApp-Polaris/astra-connector-operator/app/deployer/neptune 85%
github.com/NetApp-Polaris/astra-connector-operator/app/register 16%
github.com/NetApp-Polaris/astra-connector-operator/details/k8s 62%
github.com/NetApp-Polaris/astra-connector-operator/details/k8s/precheck 56%
github.com/NetApp-Polaris/astra-connector-operator/details/operator-sdk/api/v1 46%
github.com/NetApp-Polaris/astra-connector-operator/details/operator-sdk/controllers 0%
github.com/NetApp-Polaris/astra-connector-operator/util 100%
Summary 55% (955 / 1747)

Minimum allowed line rate is 50%

@palicena palicena marked this pull request as ready for review June 5, 2024 21:39
@palicena palicena requested a review from zachatnetapp June 5, 2024 21:40
@palicena palicena merged commit ca83e58 into ASTRACTL-33839 Jun 5, 2024
3 checks passed
@palicena palicena deleted the ASTRACTL-32772-bug-fixes branch June 5, 2024 21:44
zachatnetapp added a commit that referenced this pull request Jun 6, 2024
* first steps

* kubectl -k command works now

* remove white space

* feedback

* stuff

* Update unified-installer/astra-unified-installer.sh

Co-authored-by: Alice Paquette <[email protected]>

* Update unified-installer/astra-unified-installer.sh

Co-authored-by: Alice Paquette <[email protected]>

* dont remove thing we need

* generate_docker_registry_secret function

* get_trident_namespace

* labels

* ASTRACTL-32772: bug fixes (#362)

* ASTRACTL-32772: fix namespace/pull secret bug when prompts disabled

* ASTRACTL-32772: fix kubectl apply not detecting errors if output after a warning

* ASTRACTL-32772: cleanup

* error handling for trident-acp secret applying

* labels!

---------

Co-authored-by: Alice Paquette <[email protected]>
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.

2 participants