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

[RHTAPBUGS-322] Properly update SEB status #362

Merged

Conversation

johnmcollier
Copy link
Member

What does this PR do?:

Changes how we update the SEB status during reconciles to ensure the route name is always persisted. If we can do so without breaking other components, it would be best to change the BindingComponent array in the status to a map later on.

Which issue(s)/story(ies) does this PR fixes:

https://issues.redhat.com/browse/RHTAPBUGS-322

PR acceptance criteria:

  • Unit/Functional tests

  • Documentation

  • Client Impact

How to test changes / Special notes to the reviewer:

Signed-off-by: John Collier <[email protected]>
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Patch coverage: 85.05% and project coverage change: -0.53 ⚠️

Comparison is base (1afd7ae) 84.61% compared to head (cbb1047) 84.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
- Coverage   84.61%   84.09%   -0.53%     
==========================================
  Files          27       27              
  Lines        3530     4149     +619     
==========================================
+ Hits         2987     3489     +502     
- Misses        402      494      +92     
- Partials      141      166      +25     
Impacted Files Coverage Δ
controllers/component_controller.go 71.72% <57.36%> (-5.88%) ⬇️
controllers/componentdetectionquery_controller.go 69.85% <73.13%> (-0.69%) ⬇️
pkg/devfile/detect.go 72.97% <73.52%> (+0.32%) ⬆️
pkg/github/token_mock.go 75.67% <75.67%> (-24.33%) ⬇️
pkg/github/token.go 87.74% <84.95%> (-7.65%) ⬇️
...pplicationsnapshotenvironmentbinding_controller.go 84.61% <87.78%> (-0.31%) ⬇️
pkg/util/util.go 95.63% <89.36%> (-0.78%) ⬇️
pkg/github/mock.go 94.25% <90.99%> (-5.75%) ⬇️
pkg/devfile/devfile.go 84.35% <93.39%> (+1.14%) ⬆️
controllers/application_controller.go 85.53% <100.00%> (+4.00%) ⬆️
... and 12 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -385,7 +385,17 @@ func (r *SnapshotEnvironmentBindingReconciler) Reconcile(ctx context.Context, re
componentStatus.GitOpsRepository.GeneratedResources = componentGeneratedResources[componentName]
}

appSnapshotEnvBinding.Status.Components = append(appSnapshotEnvBinding.Status.Components, componentStatus)
componentUpdated := false
Copy link
Member

Choose a reason for hiding this comment

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

are we putting this back in? I thought we always updated status on reconcile with your prev PR 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Different variable. We're using this to determine if a new component was added to the status or one was updated. I'll rename it to avoid confusion

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

@@ -158,7 +158,7 @@ func (r *SnapshotEnvironmentBindingReconciler) Reconcile(ctx context.Context, re
var tempDir string
clone := true

appSnapshotEnvBinding.Status.Components = []appstudiov1alpha1.BindingComponentStatus{}
//appSnapshotEnvBinding.Status.Components = []appstudiov1alpha1.BindingComponentStatus{}
Copy link
Member

Choose a reason for hiding this comment

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

comment

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

Signed-off-by: John Collier <[email protected]>
@johnmcollier
Copy link
Member Author

@maysunfaisal Review comments addressed

@openshift-ci
Copy link

openshift-ci bot commented Jul 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flacatus, johnmcollier, maysunfaisal

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 [johnmcollier,maysunfaisal]

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

@johnmcollier johnmcollier merged commit 9d879ea into redhat-appstudio:main Jul 11, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants