-
Notifications
You must be signed in to change notification settings - Fork 40
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(RELEASE-1441): remove rsc from being managed #669
Conversation
scoheb
commented
Feb 10, 2025
- the rsc needs to managed outside of the release service so that clusters can have a specific version for testing.
- A version can be deployed and managed by ArgoCD via infra-deployments for a specific cluster
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #669 +/- ##
==========================================
- Coverage 79.23% 78.81% -0.42%
==========================================
Files 28 28
Lines 2283 2795 +512
==========================================
+ Hits 1809 2203 +394
- Misses 389 489 +100
- Partials 85 103 +18 ☔ View full report in Codecov by Sentry. |
2c94de5
to
72ea46d
Compare
/retest |
/retest |
3 similar comments
/retest |
/retest |
/retest |
controllers/release/adapter.go
Outdated
@@ -90,15 +90,24 @@ func (a *adapter) EnsureConfigIsLoaded() (controller.OperationResult, error) { | |||
} | |||
|
|||
var err error | |||
a.logger.Info("Getting Release Service Config") |
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.
We don't have a general strategy towards logging yet, but this particular line would be very noisy as it would be shown every time a resource is reconciled. If we have 1000 releases per day, this line will be showed a minimum of 3000 times...
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.
removed logging
controllers/release/adapter.go
Outdated
} | ||
|
||
a.logger.Info("Release Service Config Loaded") |
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.
Following my previous comment, this line would be shown many times. Maybe better to remove it.
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.
removed logging
controllers/release/adapter.go
Outdated
a.releaseServiceConfig = a.getEmptyReleaseServiceConfig(namespace) | ||
patch := client.MergeFrom(a.releaseServiceConfig.DeepCopy()) |
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.
There's no need to persist it. If we really want to persist it maybe that should be done in a different place (whenever the manager is created and not per reconciliation).
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.
We need to persist it. The release pipelines want to do a oc get RSC/release-service-config
in collect-data
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.
The PR says it is moving the RSC to being managed in infra-deployments instead of here. So, we are still creating a CR per env. Why do we now need to create it in the adapter?
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.
removed persistance
still getting |
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.
This PR says it is removing the RSC from being managed. Then I look at the diff and we are adding rbac and updating the adapter
Essentially I was going down the road of wanting to use volumeTypes on stage. But the RSC is part of the release service bundle, so it can only be changed if you release a new version of the service. |
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.
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.
removed
config/rbac/kustomization.yaml
Outdated
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.
What is changing that now we need this and we didn't before?
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.
removed
controllers/release/adapter.go
Outdated
a.releaseServiceConfig = a.getEmptyReleaseServiceConfig(namespace) | ||
patch := client.MergeFrom(a.releaseServiceConfig.DeepCopy()) |
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.
The PR says it is moving the RSC to being managed in infra-deployments instead of here. So, we are still creating a CR per env. Why do we now need to create it in the adapter?
E2E isn't using infra-deployments? How are we using |
I see! I need to get redhat-appstudio/infra-deployments#5508 merged first. |
That helps... But yeah, don't persist the RSC in that operation please. |
- the rsc needs to managed outside of the release service so that clusters can have a specific version for testing. - A version can be deployed and managed by ArgoCD via infra-deployments for a specific cluster Signed-off-by: Scott Hebert <[email protected]>
- with konflux-ci/release-service#669 and redhat-appstudio/infra-deployments#5508 we need to ensure that a default ReleaseServiceConfig is present when the release controller is running. Signed-off-by: Scott Hebert <[email protected]>
also created konflux-ci/konflux-ci#1285 |
closed in favour of #672 |
@scoheb: The following test has Failed, say /retest to rerun failed tests.
Inspecting Test ArtifactsTo inspect your test artifacts, follow these steps:
mkdir -p oras-artifacts
cd oras-artifacts
oras pull quay.io/konflux-test-storage/konflux-team/release-service:konflux-e2e-tests-qrgsg Test results analysis🚨 Error occurred while running the E2E tests, list of failed Spec(s): ➡️ [ Click to view logsError when waiting for a release pipelinerun for release happy-path-sbjp-tenant/snapshot-sample-vzdh-xd222 to finish Expected success, but got an error: <*errors.errorString | 0xc000e40720>: Pipelinerun 'managed-x55kc' didn't succeed Logs from failed container 'managed-x55kc-collect-data/step-collect-data': { "apiVersion": "appstudio.redhat.com/v1alpha1", "kind": "Release", "metadata": { "creationTimestamp": "2025-02-11T14:47:14Z", "finalizers": [ "appstudio.redhat.com/release-finalizer" ], "generateName": "snapshot-sample-vzdh-", "generation": 1, "labels": { "appstudio.openshift.io/component": "dc-metro-map", "pac.test.appstudio.openshift.io/event-type": "push", "release.appstudio.openshift.io/automated": "true" }, "name": "snapshot-sample-vzdh-xd222", "namespace": "happy-path-sbjp-tenant", "ownerReferences": [ { "apiVersion": "appstudio.redhat.com/v1alpha1", "blockOwnerDeletion": true, "controller": true, "kind": "Application", "name": "appstudio", "uid": "4f48479e-e8e1-4cd1-9ad1-7e3a82072dc0" } ], "resourceVersion": "53213", "uid": "8e0c52e2-13ed-4202-ae66-62aebde1ec35" }, "spec": { "gracePeriodDays": 7, "releasePlan": "source-releaseplan", "snapshot": "snapshot-sample-vzdh" }, "status": { "attribution": { "author": "cluster-admin", "standingAuthorization": true }, "automated": true, "conditions": [ { "lastTransitionTime": "2025-02-11T14:47:15Z", "message": "", "reason": "Progressing", "status": "False", "type": "Released" }, { "lastTransitionTime": "2025-02-11T14:47:15Z", "message": "", "reason": "Succeeded", "status": "True", "type": "Validated" }, { "lastTransitionTime": "2025-02-11T14:47:15Z", "message": "", "reason": "Skipped", "status": "True", "type": "TenantCollectorsPipelineProcessed" }, { "lastTransitionTime": "2025-02-11T14:47:15Z", "message": "", "reason": "Skipped", "status": "True", "type": "ManagedCollectorsPipelineProcessed" }, { "lastTransitionTime": "2025-02-11T14:47:15Z", "message": "", "reason": "Skipped", "status": "True", "type": "TenantPipelineProcessed" }, { "lastTransitionTime": "2025-02-11T14:47:15Z", "message": "", "reason": "Progressing", "status": "False", "type": "ManagedPipelineProcessed" } ], "expirationTime": "2025-02-18T14:47:14Z", "managedProcessing": { "pipelineRun": "happy-path-managed-pwts/managed-x55kc", "roleBinding": "happy-path-sbjp-tenant/snapshot-sample-vzdh-xd222-rolebinding-for-release-pipelingtrf7", "startTime": "2025-02-11T14:47:15Z" }, "startTime": "2025-02-11T14:47:15Z", "target": "happy-path-managed-pwts", "validation": { "time": "2025-02-11T14:47:15Z" } } } { "apiVersion": "appstudio.redhat.com/v1alpha1", "kind": "ReleasePlan", "metadata": { "creationTimestamp": "2025-02-11T14:47:14Z", "generateName": "source-releaseplan", "generation": 1, "labels": { "release.appstudio.openshift.io/author": "cluster-admin", "release.appstudio.openshift.io/auto-release": "true", "release.appstudio.openshift.io/standing-attribution": "true" }, "name": "source-releaseplan", "namespace": "happy-path-sbjp-tenant", "ownerReferences": [ { "apiVersion": "appstudio.redhat.com/v1alpha1", "blockOwnerDeletion": true, "controller": true, "kind": "Application", "name": "appstudio", "uid": "4f48479e-e8e1-4cd1-9ad1-7e3a82072dc0" } ], "resourceVersion": "53060", "uid": "351cb644-5f64-4258-9b8f-c03f11c3e4aa" }, "spec": { "application": "appstudio", "releaseGracePeriodDays": 7, "target": "happy-path-managed-pwts" }, "status": { "conditions": [ { "lastTransitionTime": "2025-02-11T14:47:14Z", "message": "", "reason": "Matched", "status": "True", "type": "Matched" } ], "releasePlanAdmission": { "active": true, "name": "happy-path-managed-pwts/demo" } } } { "apiVersion": "appstudio.redhat.com/v1alpha1", "kind": "ReleasePlanAdmission", "metadata": { "creationTimestamp": "2025-02-11T14:47:14Z", "generation": 1, "labels": { "release.appstudio.openshift.io/auto-release": "true" }, "name": "demo", "namespace": "happy-path-managed-pwts", "resourceVersion": "53053", "uid": "aa18816e-ea5a-4136-8e55-7a1a725bef28" }, "spec": { "applications": [ "appstudio" ], "data": { "mapping": { "components": [ { "component": "", "repository": "quay.io/redhat-appstudio-qe/dcmetromap" } ] } }, "origin": "happy-path-sbjp-tenant", "pipeline": { "pipelineRef": { "params": [ { "name": "url", "value": "https://github.com/konflux-ci/release-service-catalog" }, { "name": "revision", "value": "development" }, { "name": "pathInRepo", "value": "pipelines/managed/e2e/e2e.yaml" } ], "resolver": "git" }, "serviceAccountName": "release-service-account", "timeouts": {} }, "policy": "hpath-policy-bfcr" }, "status": { "conditions": [ { "lastTransitionTime": "2025-02-11T14:47:14Z", "message": "", "reason": "Matched", "status": "True", "type": "Matched" } ], "releasePlans": [ { "active": true, "name": "happy-path-sbjp-tenant/source-releaseplan" } ] } } Error from server (NotFound): releaseserviceconfigs.appstudio.redhat.com "release-service-config" not found { s: "Pipelinerun 'managed-x55kc' didn't succeed\nLogs from failed container 'managed-x55kc-collect-data/step-collect-data': \n{\n \"apiVersion\": \"appstudio.redhat.com/v1alpha1\",\n \"kind\": \"Release\",\n \"metadata\": {\n \"creationTimestamp\": \"2025-02-11T14:47:14Z\",\n \"finalizers\": [\n \"appstudio.redhat.com/release-finalizer\"\n ],\n \"generateName\": \"snapshot-sample-vzdh-\",\n \"generation\": 1,\n \"labels\": {\n \"appstudio.openshift.io/component\": \"dc-metro-map\",\n \"pac.test.appstudio.openshift.io/event-type\": \"push\",\n \"release.appstudio.openshift.io/automated\": \"true\"\n },\n \"name\": \"snapshot-sample-vzdh-xd222\",\n \"namespace\": \"happy-path-sbjp-tenant\",\n \"ownerReferences\": [\n {\n \"apiVersion\": \"appstudio.redhat.com/v1alpha1\",\n \"blockOwnerDeletion\": true,\n \"controller\": true,\n \"kind\": \"Application\",\n \"name\": \"appstudio\",\n \"uid\": \"4f48479e-e8e1-4cd1-9ad1-7e3a82072dc0\"\n }\n ],\n \"resourceVersion\": \"53213\",\n \"uid\": \"8e0c52e2-13ed-4202-ae66-62aebde1ec35\"\n },\n \"spec\": {\n \"gracePeriodDays\": 7,\n \"releasePlan\": \"source-releaseplan\",\n \"snapshot\": \"snapshot-sample-vzdh\"\n },\n \"status\": {\n \"attribution\": {\n \"author\": \"cluster-admin\",\n \"standingAuthorization\": true\n },\n \"automated\": true,\n \"conditions\": [\n {\n \"lastTransitionTime\": \"2025-02-11T14:47:15Z\",\n \"message\": \"\",\n \"reason\": \"Progressing\",\n \"status\": \"False\",\n \"type\": \"Released\"\n },\n {\n \"lastTransitionTime\": \"2025-02-11T14:47:15Z\",\n \"message\": \"\",\n \"reason\": \"Succeeded\",\n \"status\": \"True\",\n \"type\": \"Validated\"\n },\n {\n \"lastTransitionTime\": \"2025-02-11T14:47:15Z\",\n \"message\": \"\",\n \"reason\": \"Skipped\",\n \"status\": \"True\",\n \"type\": \"TenantCollectorsPipelineProcessed\"\n },\n {\n \"lastTransitionTime\": \"2025-02-11T14:47:15Z\",\n \"message\": \"\",\n \"reason\": \"Skipped\",\n \"status\": \"True\",\n \"type\": \"ManagedCollectorsPipelineProcessed\"\n },\n {\n \"lastTransitionTime\": \"2025-02-11T14:47:15Z\",\n \"message\": \"\",\n \"reason\": \"Skipped\",\n \"status\": \"True\",\n \"type\": \"TenantPipelineProcessed\"\n },\n {\n \"lastTransitionTime\": \"2025-02-11T14:47:15Z\",\n \"message\": \"\",\n \"reason\": \"Progressing\",\n \"status\": \"False\",\n \"type\": \"ManagedPipelineProcessed\"\n }\n ],\n \"expirationTime\": \"2025-02-18T14:47:14Z\",\n \"managedProcessing\": {\n \"pipelineRun\": \"happy-path-managed-pwts/managed-x55kc\",\n \"roleBinding\": \"happy-path-sbjp-tenant/snapshot-sample-vzdh-xd222-rolebinding-for-release-pipelingtrf7\",\n \"startTime\": \"2025-02-11T14:47:15Z\"\n },\n \"startTime\": \"2025-02-11T14:47:15Z\",\n \"target\": \"happy-path-managed-pwts\",\n \"validation\": {\n \"time\": \"2025-02-11T14:47:15Z\"\n }\n }\n}\n{\n \"apiVersion\": \"appstudio.redhat.com/v1alpha1\",\n \"kind\": \"ReleasePlan\",\n \"metadata\": {\n \"creationTimestamp\": \"... Gomega truncated this representation as it exceeds 'format.MaxLength'. Consider having the object provide a custom 'GomegaStringer' representation or adjust the parameters in Gomega's 'format' package. Learn more here: https://onsi.github.io/gomega/#adjusting-output |
- with konflux-ci/release-service#669 and redhat-appstudio/infra-deployments#5508 we need to ensure that a default ReleaseServiceConfig is present when the release controller is running. Signed-off-by: Scott Hebert <[email protected]>
- with konflux-ci/release-service#669 and redhat-appstudio/infra-deployments#5508 we need to ensure that a default ReleaseServiceConfig is present when the release controller is running. Signed-off-by: Scott Hebert <[email protected]>