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

Cleanup Adapter structure to not be used to pass parameters #5918

Merged
merged 5 commits into from
Jul 6, 2022

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Jul 4, 2022

What type of PR is this:

/kind cleanup

What does this PR do / why we need it:

See more details on commits messages

Which issue(s) this PR fixes:

Fixes partly #5867

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@feloy feloy requested review from rm3l and dharmit July 4, 2022 15:01
@openshift-ci
Copy link

openshift-ci bot commented Jul 4, 2022

@feloy: The label(s) kind/cleanup cannot be applied, because the repository doesn't have them.

In response to this:

What type of PR is this:

/kind cleanup

What does this PR do / why we need it:

See more details on commits messages

Which issue(s) this PR fixes:

Fixes partly #5867

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

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.

@netlify
Copy link

netlify bot commented Jul 4, 2022

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit e73b4ce
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/62c54719cfa6a70008167d45
😎 Deploy Preview https://deploy-preview-5918--odo-docusaurus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@openshift-ci openshift-ci bot requested a review from cdrage July 4, 2022 15:01
@feloy feloy requested review from valaparthvi and removed request for cdrage July 4, 2022 15:01
@feloy feloy force-pushed the feature-5867/cleanup-push branch from 3f16462 to 3e51559 Compare July 4, 2022 15:03
@odo-robot
Copy link

odo-robot bot commented Jul 4, 2022

Unit Tests on commit a40e2ad finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 4, 2022

OpenShift Tests on commit a40e2ad finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 4, 2022

Windows Tests (OCP) on commit a40e2ad finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 4, 2022

Kubernetes Tests on commit a40e2ad finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Jul 4, 2022

Validate Tests on commit a40e2ad finished successfully.
View logs: TXT HTML

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jul 5, 2022
@rm3l
Copy link
Member

rm3l commented Jul 6, 2022

/approve

@openshift-ci
Copy link

openshift-ci bot commented Jul 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rm3l

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:

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jul 6, 2022
@feloy
Copy link
Contributor Author

feloy commented Jul 6, 2022

/hold

Will need to be rebased after #5914 is merged (and not the other way)

@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. Required by Prow. label Jul 6, 2022
@feloy feloy force-pushed the feature-5867/cleanup-push branch from f6c7d54 to e73b4ce Compare July 6, 2022 08:25
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jul 6, 2022
@feloy feloy closed this Jul 6, 2022
@feloy feloy reopened this Jul 6, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@feloy feloy removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. Required by Prow. label Jul 6, 2022
Comment on lines +81 to +84
// RandomPorts is true to forward containers ports on local random ports
RandomPorts bool
// ErrOut is a Writer to output forwarded port information
ErrOut io.Writer
Copy link
Member

Choose a reason for hiding this comment

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

@feloy I remember us discussing this struct and various other structs used for successful execution of odo dev, and you mentioned that it's better to pass arguments than have fat structs. I'm trying to understand why you prefer adding more fields to a struct than using arguments.

NOTE: I'm not questioning your judgement. I'm only trying to understand your thought process in doing so.

Copy link
Member

Choose a reason for hiding this comment

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

lgtm otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I preferred not to change this part for the moment.

To be more precise, I think that we should use structures for optional parameters only, and have parameters for mandatory parameters, so the compiler double-checks that we don't forget to pass mandatory values (function parameters) for us, what is not done with fields of structures (I have been trapped by this several times, not later than yesterday, see #5918 (comment))

Copy link
Member

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 added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jul 6, 2022
@dharmit
Copy link
Member

dharmit commented Jul 6, 2022

/override ci/prow/unit
/override ci/prow/v4.10-integration-e2e

@openshift-ci
Copy link

openshift-ci bot commented Jul 6, 2022

@dharmit: Overrode contexts on behalf of dharmit: ci/prow/unit, ci/prow/v4.10-integration-e2e

In response to this:

/override ci/prow/unit
/override ci/prow/v4.10-integration-e2e

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.

@feloy
Copy link
Contributor Author

feloy commented Jul 6, 2022

/override ci/prow/unit-and-validate-test

@openshift-ci
Copy link

openshift-ci bot commented Jul 6, 2022

@feloy: Overrode contexts on behalf of feloy: ci/prow/unit-and-validate-test

In response to this:

/override ci/prow/unit-and-validate-test

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 merged commit 1b303eb into redhat-developer:main Jul 6, 2022
cdrage pushed a commit to cdrage/odo that referenced this pull request Aug 31, 2022
…eveloper#5918)

* Do not use receiver to pass DevfileCommands parameters

* Do not use receiver to pass DebugPort parameter

* Do not use receiver to pass deployment parameter

* Do not use receiver to pass pod parameter

* Move randomPorts and errOut as PushParameters
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. Required by Prow. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants