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

RHOAIENG-11274: chore(Makefile): widen the container build context to the whole repo, so we can start reusing code between images in the future #792

Merged

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Dec 3, 2024

https://issues.redhat.com/browse/RHOAIENG-11274

Description

import glob
import pathlib

def main():
    for dockerfile in glob.glob("**/Dockerfile", recursive=True):
        print(dockerfile)
        path = pathlib.Path(dockerfile)
        lines = path.read_text().splitlines()
        idx = lines.index("ARG SOURCE_CODE=.")
        lines[idx] = f"ARG SOURCE_CODE={str(path.parent)}"
        print("\t", lines[idx])
        path.write_text("\n".join(lines) + "\n")

if __name__ == '__main__':
    main()

TODOs

How Has This Been Tested?

GHA on my fork

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Copy link
Contributor

openshift-ci bot commented Dec 3, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@jiridanek jiridanek force-pushed the jd_restructure_variable branch 5 times, most recently from b6b79e0 to 428bc83 Compare December 3, 2024 11:57
… the whole repo, so we can start reusing code between images in the future

```python
import glob
import pathlib

def main():
    for dockerfile in glob.glob("**/Dockerfile", recursive=True):
        print(dockerfile)
        path = pathlib.Path(dockerfile)
        lines = path.read_text().splitlines()
        idx = lines.index("ARG SOURCE_CODE=.")
        lines[idx] = f"ARG SOURCE_CODE={str(path.parent)}"
        print("\t", lines[idx])
        path.write_text("\n".join(lines) + "\n")

if __name__ == '__main__':
    main()
```
@jiridanek jiridanek force-pushed the jd_restructure_variable branch from 428bc83 to 36abe11 Compare December 3, 2024 12:49
@jiridanek jiridanek marked this pull request as ready for review December 3, 2024 13:34
@openshift-ci openshift-ci bot requested review from dibryant and paulovmr December 3, 2024 13:34
.dockerignore Show resolved Hide resolved
@jiridanek jiridanek added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Dec 4, 2024
jiridanek added a commit to jiridanek/release that referenced this pull request Dec 4, 2024
…xt to the whole repo, so we can start reusing code between images in the future

Relates to

* opendatahub-io/notebooks#792
@jiridanek jiridanek requested review from jstourac, atheo89 and caponetto and removed request for paulovmr December 4, 2024 18:39
@jiridanek
Copy link
Member Author

/testwith openshift/release/master/notebook-codeserver-ubi9-python-3-11-pr-image-mirror openshift/release#59520 #792

Copy link
Contributor

openshift-ci bot commented Dec 5, 2024

@jiridanek, testwith: could not generate prow job. ERROR:

BUG: test 'notebook-codeserver-ubi9-python-3-11-pr-image-mirror' not found in injected config

@jiridanek
Copy link
Member Author

/testwith jiridanek/release/jd_change_context/notebook-codeserver-ubi9-python-3-11-pr-image-mirror openshift/release#59520 #792

Copy link
Contributor

openshift-ci bot commented Dec 5, 2024

@jiridanek, testwith: could not generate prow job. ERROR:

could not determine ci op config from metadata: got unexpected http 404 status code from configresolver: failed to get config: could not find any config for org jiridanek

@jiridanek
Copy link
Member Author

/testwith openshift/release/master/notebook-codeserver-ubi9-python-3-11-pr-image-mirror openshift/release#59520 #792

Copy link
Contributor

openshift-ci bot commented Dec 5, 2024

@jiridanek, testwith: could not generate prow job. ERROR:

BUG: test 'notebook-codeserver-ubi9-python-3-11-pr-image-mirror' not found in injected config

@jiridanek
Copy link
Member Author

pushed it back to what has been lgtmd

image

@jiridanek
Copy link
Member Author

/approve

Copy link
Contributor

openshift-ci bot commented Dec 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

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 label Dec 7, 2024
@jiridanek
Copy link
Member Author

/retest-required

2 similar comments
@jiridanek
Copy link
Member Author

/retest-required

@jiridanek
Copy link
Member Author

/retest-required

@jiridanek
Copy link
Member Author

/override build (cuda-jupyter-tensorflow-ubi9-python-3.11)

This comment has been minimized.

@jiridanek
Copy link
Member Author

/override "build (cuda-jupyter-tensorflow-ubi9-python-3.11) / build"
/override "build (rocm-jupyter-pytorch-ubi9-python-3.9) / build"
/override "build (rocm-jupyter-tensorflow-ubi9-python-3.11) / build"

Failures tracked in https://issues.redhat.com/browse/RHOAIENG-16587

Copy link
Contributor

openshift-ci bot commented Dec 7, 2024

@jiridanek: Overrode contexts on behalf of jiridanek: build (cuda-jupyter-tensorflow-ubi9-python-3.11) / build, build (rocm-jupyter-pytorch-ubi9-python-3.9) / build, build (rocm-jupyter-tensorflow-ubi9-python-3.11) / build

In response to this:

/override "build (cuda-jupyter-tensorflow-ubi9-python-3.11) / build"
/override "build (rocm-jupyter-pytorch-ubi9-python-3.9) / build"
/override "build (rocm-jupyter-tensorflow-ubi9-python-3.11) / build"

Failures tracked in https://issues.redhat.com/browse/RHOAIENG-16587

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-sigs/prow repository.

@jiridanek
Copy link
Member Author

/retest-required

@jiridanek
Copy link
Member Author

/test codeserver-notebook-e2e-tests

2 similar comments
@jiridanek
Copy link
Member Author

/test codeserver-notebook-e2e-tests

@jiridanek
Copy link
Member Author

/test codeserver-notebook-e2e-tests

@jiridanek
Copy link
Member Author

/override multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-notebook-cuda-jupyter-min-ubi9-python-3-11-pr-image-mirror

Copy link
Contributor

openshift-ci bot commented Dec 8, 2024

@jiridanek: Overrode contexts on behalf of jiridanek: multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-notebook-cuda-jupyter-min-ubi9-python-3-11-pr-image-mirror

In response to this:

/override multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-notebook-cuda-jupyter-min-ubi9-python-3-11-pr-image-mirror

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-sigs/prow repository.

@jiridanek
Copy link
Member Author

/override multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-runtime-minimal-ubi9-python-3-9-pr-image-mirror
/override multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-runtime-minimal-ubi9-python-3-11-pr-image-mirror

these multi-pr checks don't work for testing build configs updates in openshift/release

Copy link
Contributor

openshift-ci bot commented Dec 8, 2024

@jiridanek: Overrode contexts on behalf of jiridanek: multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-runtime-minimal-ubi9-python-3-11-pr-image-mirror, multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-runtime-minimal-ubi9-python-3-9-pr-image-mirror

In response to this:

/override multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-runtime-minimal-ubi9-python-3-9-pr-image-mirror
/override multi-pr-opendatahub-io-notebooks-792-openshift-release-59520-runtime-minimal-ubi9-python-3-11-pr-image-mirror

these multi-pr checks don't work for testing build configs updates in openshift/release

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-sigs/prow repository.

@jiridanek
Copy link
Member Author

/override "build / (cuda-jupyter-tensorflow-ubi9-python-3.11)"

This comment was marked as outdated.

@jiridanek
Copy link
Member Author

/retest-required

@jiridanek
Copy link
Member Author

Can't ever get all images to build, so OCP-CI tests don't run

: Build image rocm-ubi9-python-3.11 from the repository expand_more42m5s : Build image rocm-ubi9-python-3.11 from the repository expand_more 42m5s
: Build image rocm-ubi9-python-3.11 from the repository expand_more 42m5s
: Build image runtime-cuda-tensorflow-ubi9-python-3.11 from the repository expand_more : Build image runtime-cuda-tensorflow-ubi9-python-3.11 from the repository expand_more
: Build image runtime-cuda-tensorflow-ubi9-python-3.11 from the repository expand_more

/override ci/prow/rocm-runtimes-ubi9-e2e-tests ci/prow/rocm-notebooks-e2e-tests ci/prow/notebooks-ubi9-e2e-tests
/override ci/prow/rstudio-notebook-e2e-tests ci/prow/rocm-runtimes-ubi9-e2e-tests ci/prow/codeserver-notebook-e2e-tests

Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/codeserver-notebook-e2e-tests, ci/prow/notebooks-ubi9-e2e-tests, ci/prow/rocm-notebooks-e2e-tests, ci/prow/rocm-runtimes-ubi9-e2e-tests, ci/prow/rstudio-notebook-e2e-tests

In response to this:

Can't ever get all images to build, so OCP-CI tests don't run

: Build image rocm-ubi9-python-3.11 from the repository expand_more42m5s : Build image rocm-ubi9-python-3.11 from the repository expand_more 42m5s
: Build image rocm-ubi9-python-3.11 from the repository expand_more 42m5s
: Build image runtime-cuda-tensorflow-ubi9-python-3.11 from the repository expand_more : Build image runtime-cuda-tensorflow-ubi9-python-3.11 from the repository expand_more
: Build image runtime-cuda-tensorflow-ubi9-python-3.11 from the repository expand_more

/override ci/prow/rocm-runtimes-ubi9-e2e-tests ci/prow/rocm-notebooks-e2e-tests ci/prow/notebooks-ubi9-e2e-tests
/override ci/prow/rstudio-notebook-e2e-tests ci/prow/rocm-runtimes-ubi9-e2e-tests ci/prow/codeserver-notebook-e2e-tests

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-sigs/prow repository.

@jiridanek
Copy link
Member Author

/override ci/prow/intel-notebooks-e2e-tests ci/prow/runtimes-ubi9-e2e-tests

Copy link
Contributor

openshift-ci bot commented Dec 9, 2024

@jiridanek: Overrode contexts on behalf of jiridanek: ci/prow/intel-notebooks-e2e-tests, ci/prow/runtimes-ubi9-e2e-tests

In response to this:

/override ci/prow/intel-notebooks-e2e-tests ci/prow/runtimes-ubi9-e2e-tests

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-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 03c3b6f into opendatahub-io:main Dec 9, 2024
157 of 163 checks passed
@jiridanek jiridanek deleted the jd_restructure_variable branch December 9, 2024 11:38
yingzhanredhat pushed a commit to yingzhanredhat/release that referenced this pull request Dec 18, 2024
…xt to the whole repo, so we can start reusing code between images in the future (openshift#59520)

* run `make ci-operator-config` to make prow happy
* fix dockerfile_path to be relative
* fix context_dir to be .

Relates to

* opendatahub-io/notebooks#792
yingzhanredhat pushed a commit to yingzhanredhat/release that referenced this pull request Dec 24, 2024
…xt to the whole repo, so we can start reusing code between images in the future (openshift#59520)

* run `make ci-operator-config` to make prow happy
* fix dockerfile_path to be relative
* fix context_dir to be .

Relates to

* opendatahub-io/notebooks#792
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants