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

add DeploymentConfigRollback object to openshift model #5772

Merged
merged 1 commit into from Mar 6, 2024

Conversation

mluckam
Copy link
Contributor

@mluckam mluckam commented Mar 1, 2024

Description

added DeploymentConfigRollback object to openshift model
https://docs.openshift.com/container-platform/4.10/rest_api/workloads_apis/deploymentconfigrollback-apps-openshift-io-v1.html

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@mluckam mluckam marked this pull request as ready for review March 1, 2024 16:49
@rohanKanojia
Copy link
Member

@mluckam : Could you please add a test for this? See existing tests.

@mluckam
Copy link
Contributor Author

mluckam commented Mar 1, 2024

@rohanKanojia unit test has been added.

DeploymentConfigRollback actual = new DeploymentConfigRollbackBuilder()
.withName("app-to-rollback")
.withSpec(
new DeploymentConfigRollbackSpecBuilder().withFrom(
Copy link
Member

Choose a reason for hiding this comment

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

Is .withNewSpec() available here?

  .withNewSpec()
     .withFrom( )
  .endSpec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is. This helps reduce the nesting. Thanks for the idea.

.withName("app-to-rollback")
.withSpec(
new DeploymentConfigRollbackSpecBuilder().withFrom(
new ObjectReference(
Copy link
Member

Choose a reason for hiding this comment

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

Why not use ObjectReferenceBuilder here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oversight, will update.

@rohanKanojia
Copy link
Member

@mluckam : What is the use case for this change? How do you plan to use this object from openshift-model? Do you also plan to make subsequent changes in OpenShiftClient DSL ?

Copy link

sonarcloud bot commented Mar 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@mluckam
Copy link
Contributor Author

mluckam commented Mar 4, 2024

The DeploymentConfigRollback is utilized to rollback a DeploymentConfig via the API path "/apis/apps.openshift.io/v1/namespaces/{namespace}/deploymentconfigs/{name}/rollback", see documentation. The model DeploymentConfigRollback was not currently in this project, but available in the dependent model project.

Currently I am migrating to utilizing the kubernetes and openshift models from this project. Once the models from this project are utilized, a next step would be to transition from interacting with the API via an HTTP client, to utilizing the OpenShiftClient. This may be several months away though. Until this migration occurs, I do not have plans to update the OpenShiftClient DSL.

@rohanKanojia
Copy link
Member

@mluckam : Could you please create an issue for /rollback support in OpenShiftClient DSL?

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa added this to the 6.11.0 milestone Mar 6, 2024
@manusa manusa merged commit 1e3b9d2 into fabric8io:main Mar 6, 2024
17 of 19 checks passed
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.

None yet

4 participants