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 extension to provide custom builder image environment variables #10331

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

rottencandy
Copy link
Contributor

@rottencandy rottencandy commented Oct 26, 2021

Story:
https://issues.redhat.com/browse/ODC-6379

Description:
Create an extension that allows specifying extra build environment options for builder images in git import form.
Use the extension to provide option to customize npm run command(NPM_RUN) for nodejs builder images.

Screen shots / Gifs for design review:
0

Unit test coverage report:
(Unchanged)

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci openshift-ci bot added component/dev-console Related to dev-console component/sdk Related to console-plugin-sdk kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated labels Oct 26, 2021
@rottencandy
Copy link
Contributor Author

/cc @jerolimov

@openshift-ci openshift-ci bot requested a review from jerolimov October 26, 2021 19:13
@jerolimov
Copy link
Member

/retest
/assign

@jerolimov
Copy link
Member

jerolimov commented Nov 2, 2021

Since the epic acceptance criteria have not changed and the epic ODC-6266 has a doc-ack and px-ack, I approve this on behalf of doc and PX team.

/label docs-approved
/label px-approved

@openshift-ci openshift-ci bot added docs-approved Signifies that Docs has signed off on this PR px-approved Signifies that Product Support has signed off on this PR labels Nov 2, 2021
@jerolimov
Copy link
Member

Thanks for adopting the suggestions. Retested this now on a cluster and touching the field doesn't break the Deployment anymore. 👍

UI looks fine for me, but we should now wait for a lgtm from UX/PM. /cc @serenamarie125 @beaumorley

/label qe-approved
/approve

@openshift-ci openshift-ci bot added qe-approved Signifies that QE has signed off on this PR approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 2, 2021
@rottencandy rottencandy force-pushed the feat/import-env branch 2 times, most recently from 8b233d6 to 0dd89a4 Compare November 8, 2021 11:55
@openshift-ci openshift-ci bot added component/topology Related to topology kind/cypress Related to Cypress e2e integration testing labels Nov 8, 2021
@rottencandy rottencandy force-pushed the feat/import-env branch 2 times, most recently from aecf3b1 to 9afe312 Compare November 9, 2021 10:32
@openshift-ci openshift-ci bot added the component/helm Related to helm-plugin label Nov 9, 2021
@beaumorley
Copy link

beaumorley commented Nov 9, 2021

@jerolimov Wondering if we need all the help text under the form field? Could we remove the second sentence to reduce noise? Like this:

image

@rottencandy
Copy link
Contributor Author

Updated:
0

@jerolimov
Copy link
Member

Tested this again on a cluster and works fine. Christian comment is implemented, so adding finally lgtm.

/lgtm

@jerolimov
Copy link
Member

/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2021
"type": "dev-console.import/environment",
"properties": {
"imageStreamName": "nodejs",
"imageStreamTags": ["14-ubi8", "14-ubi8-minimal", "12-ubi8", "latest"],
Copy link
Member

@jerolimov jerolimov Nov 16, 2021

Choose a reason for hiding this comment

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

@rottencandy @christianvogt Any thoughts here if we should also add node 16- or ubi9 here already or should we update this shortly before we release 4.10?

See sclorg/s2i-nodejs-container#295

I created this follow up story to check this later: https://issues.redhat.com/browse/ODC-6414

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't think it would affect anything so added 16-ubi8 to the list.

@openshift-bot
Copy link
Contributor

/retest-required

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

4 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@jerolimov
Copy link
Member

Stop rerunning tests until we take a new look why this fails.
/hold

@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 Nov 16, 2021
@@ -203,3 +203,13 @@ Feature: Create Application from git form
| git_url |
| https://github.com/sclorg/httpd-ex.git |
| https://github.com/sclorg/nginx-ex.git |

@regression @manual
Copy link
Member

Choose a reason for hiding this comment

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

Btw, it would be still cool if this is not a manual (manually clicked through the UI) test and the statements below could run via cypress.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, removed manual. Since it is only a single API call, I don't think it would affect the rate limit issue that much.

Scenario: Provide custom build environments for nodejs git import
Given user is at Import from Git form
When user enters Git Repo URL as "https://github.com/sclorg/nodejs-ex"
And user enters "NPM_RUN" build environment field as "build2"
Copy link
Member

Choose a reason for hiding this comment

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

That is not what the user does. The user enters a "Run command", not a build environment variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

And user enters Name as "nodejs-env"
And user clicks Create button on Add page
Then user will be redirected to Topology page
And user is able to see environment variable "NPM_RUN" in details page for Build Config "nodejs-env"
Copy link
Member

Choose a reason for hiding this comment

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

I'm sure the user needs to click on "Build #1" first, switch then to the environment variable tab and then can verify that the NPM_RUN variable is set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to click on build instead of BuildConfig and changed statement text to reflect it. Or were you suggesting we do this in multiple separate steps instead of one?

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2021
@jerolimov
Copy link
Member

Thanks @rottencandy, looks much better. My local cypress has some (unrelated) issues. Let check if the tests pass on CI, but the code is fine 👍

/lgtm
/unhold

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 23, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 23, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerolimov, rottencandy

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-bot
Copy link
Contributor

/retest-required

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

3 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-merge-robot openshift-merge-robot merged commit 7c008f2 into openshift:master Nov 24, 2021
@rottencandy rottencandy deleted the feat/import-env branch December 1, 2021 12:18
@spadgett spadgett added this to the v4.10 milestone Dec 8, 2021
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. component/dev-console Related to dev-console component/helm Related to helm-plugin component/sdk Related to console-plugin-sdk component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR kind/cypress Related to Cypress e2e integration testing kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants