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 2038419: Bump Grafana to 8.3.4 and handle datasource migration #1543

Merged
merged 4 commits into from
Jan 25, 2022

Conversation

arajkumar
Copy link
Contributor

@arajkumar arajkumar commented Jan 24, 2022

Newer version of grafana(e.g v8.3.3) seem to be supporting basic auth
only through secureJsonData.basicAuthPassword. This PR ensures the
creation of new datasources secret with secureJsonData.basicAuthPassword field and removes old secret during upgrade.

Signed-off-by: Arunprasad Rajkumar arajkuma@redhat.com

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 24, 2022
@arajkumar
Copy link
Contributor Author

/retest

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
@arajkumar
Copy link
Contributor Author

/retitle Bug 2038419: Bump Grafana to 8.3.4 and handle datasource migration

@openshift-ci openshift-ci bot changed the title Handle Grafana datasources migration Bug 2038419: Bump Grafana to 8.3.4 and handle datasource migration Jan 24, 2022
@openshift-ci openshift-ci bot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label Jan 24, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 24, 2022

@arajkumar: This pull request references Bugzilla bug 2038419, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @lihongyan1

In response to this:

Bug 2038419: Bump Grafana to 8.3.4 and handle datasource migration

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jan 24, 2022
@arajkumar
Copy link
Contributor Author

/cc @simonpasquier

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

waiting for @prashbnair's review :)

@@ -276,6 +276,7 @@ var (
TrustedCABundleKey = "ca-bundle.crt"

AlertmanagerLegacyServiceMonitorName = "alertmanager"
GrafanaLegacyDataSourceSecretName = "grafana-datasources"
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) since it's only used in pkg/tasks/grafana.go, it could be moved there.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2022
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2022
@prashbnair
Copy link
Contributor

/lgtm

@simonpasquier
Copy link
Contributor

/skip

Copy link
Contributor

@philipgough philipgough left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 24, 2022
@arajkumar
Copy link
Contributor Author

/retest

@prashbnair
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Jan 25, 2022
@arajkumar
Copy link
Contributor Author

I've verified the upgrade path 4.9.x to 4.10.ci works with the fix.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 25, 2022

@arajkumar: This pull request references Bugzilla bug 2038419, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.10.0) matches configured target release for branch (4.10.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @lihongyan1

In response to this:

Bug 2038419: Bump Grafana to 8.3.4 and handle datasource migration

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@arajkumar
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2022
@arajkumar
Copy link
Contributor Author

/retest

@@ -120,6 +122,11 @@ func (t *GrafanaTask) create(ctx context.Context) error {
return errors.Wrap(err, "reconciling Grafana Datasources Secret failed")
}

err = t.client.DeleteSecretByNamespaceAndName(ctx, sds.GetNamespace(), grafanaLegacyDataSourceSecretName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we not reuse the DeleteSecret method by creating a Secret with name and namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it.

/hold for testing!

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
Newer version of grafana(e.g v8.3.3) seem to be supporting basic auth
only through `secureJsonData.basicAuthPassword`. This PR ensures the
creation of new datasources secret with `secureJsonData.basicAuthPassword` field and removes old secret during upgrade.

Signed-off-by: Arunprasad Rajkumar <arajkuma@redhat.com>
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2022
@prashbnair
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arajkumar, PhilipGough, prashbnair, simonpasquier

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [PhilipGough,arajkumar,prashbnair,simonpasquier]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@arajkumar
Copy link
Contributor Author

/hold cancel
/retest
/skip

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 25, 2022
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 25, 2022

@arajkumar: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit fa1cb8f into openshift:master Jan 25, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 25, 2022

@arajkumar: All pull requests linked via external trackers have merged:

Bugzilla bug 2038419 has been moved to the MODIFIED state.

In response to this:

Bug 2038419: Bump Grafana to 8.3.4 and handle datasource migration

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants