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

adding required files for f35-py310 S2I image to built #235

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

Gregory-Pereira
Copy link
Member

@Gregory-Pereira Gregory-Pereira commented Mar 8, 2022

Related Issues and Dependencies

Related to #231

Includes linting changes for all s2i_assemble.patch files, which is outside this PR's scope, but otherwise pre-commit check won't pass.
Additionally added documentation to README.rst so people don't try to manually build the patch like I did...

This introduces a breaking change

  • Yes
  • No

This Pull Request implements

Implements the files required to build a Thoth image of fedora35 with python3.10 using S2I.

Description

Solely creates the base image, a solver image still needs to be built from this.

@sesheta sesheta requested review from KPostOffice and pacospace March 8, 2022 22:41
@sesheta sesheta added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 8, 2022
README.rst Outdated Show resolved Hide resolved
@goern
Copy link
Member

goern commented Mar 9, 2022

/lgtm
/assign @Gregory-Pereira

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2022
@sesheta sesheta removed the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2022
@sesheta
Copy link
Member

sesheta commented Mar 9, 2022

New changes are detected. LGTM label has been removed.

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

nice work.
was the s2i_assemble.patch copied from other folders?

and another minor question

ubi8-py36/s2i_assemble.patch Show resolved Hide resolved
@Gregory-Pereira
Copy link
Member Author

Gregory-Pereira commented Mar 9, 2022

nice work. was the s2i_assemble.patch copied from other folders?
and another minor question
> is changes to ubi file intentional ?

  1. Yes I copied the file for the s2i_assemble.patch living in the f34-py39 folder, and went to change anything specific to fedora version 34 or python version 3.9, but there were none. I did this because I wasn't exactly sure how these were meant to be implemented / generated, if there is a better way I am all ears.

  2. I did not want to change the UBI assemble patches however, there was some formatting issue in them that made the pre-commit fail. I am guessing it was something in this commit that caused it, and I am not sure if changes were forced into master, the pre-commit was down, or the configuration file for precommit changed since then.

@harshad16
Copy link
Member

harshad16 commented Mar 9, 2022

  1. Yes I copied the file for the s2i_assemble.patch living in the f34-py39 folder, and went to change anything specific to fedora version 34 or python version 3.9, but there were none. I did this because I wasn't exactly sure how these were meant to be implemented / generated, if there is a better way I am all ears.

The reason why I asked this is because, the s2i_assemble.patch is created based on the difference of the assemble present in the base image and addition we are trying to do from our assemble script.
As the assemble bit can differ from base image to base image, it is good to verify this once.

*. Easiest way to verify: Try to build the image from the dockerfile. (if successful the patch is in good shape)

  • How is the patch created:
    Get the assemble from the base image: usually located at usr/libexec/s2i/assemble
    Remove the bits we don't want , (this can be referenced from other patches)

state the copied assemble script in a/assemble
state the removed bit assemble script in b/assemble
diff -u a/assemble b/assemble > assemble.patch

the resultant patch is what we require.

  1. I did not want to change the UBI assemble patches however, there was some formatting issue in them that made the pre-commit fail. I am guessing it was something in this commit that caused it, and I am not sure if changes were forced into master, the pre-commit was down, or the configuration file for precommit changed since then.

Thanks for the changes :)

@harshad16
Copy link
Member

/hold

hold till the image build is confirmed.

@sesheta sesheta added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 9, 2022
@harshad16
Copy link
Member

harshad16 commented Mar 9, 2022

The s2i_assemble.patch script fails with f35 base image to be patched:

/usr/libexec/s2i ~
File assemble is read-only; trying to patch anyway
patching file assemble
Hunk #2 FAILED at 23.
1 out of 2 hunks FAILED -- saving rejects to file assemble.rej

please try to create the s2i_assemble.patch as instructed above
if facing any issue, let me know

@Gregory-Pereira
Copy link
Member Author

Got it, thanks Harshad, taking a look now.

@Gregory-Pereira Gregory-Pereira force-pushed the f35-py310-s2i-image branch 2 times, most recently from e13f922 to 49def64 Compare March 10, 2022 19:04
@Gregory-Pereira
Copy link
Member Author

Can confirm that the f35-py310 overlay now builds correctly:

$ podman build .
STEP 1/8: FROM registry.fedoraproject.org/f35/python3:0-41.container
...
STEP 8/8: USER 1001
--> Using cache 83dc730284d93fd5378c557bf4a3f1fc58647b0f8279eaab5aeb147de067fc78
--> 83dc730284d
83dc730284d93fd5378c557bf4a3f1fc58647b0f8279eaab5aeb147de067fc78

@Gregory-Pereira
Copy link
Member Author

/hold
Working on formatting the README.rst file.

@Gregory-Pereira Gregory-Pereira force-pushed the f35-py310-s2i-image branch 2 times, most recently from 1f8fede to f622cfa Compare March 10, 2022 19:20
@Gregory-Pereira Gregory-Pereira force-pushed the f35-py310-s2i-image branch 2 times, most recently from d1d3410 to f203c63 Compare March 10, 2022 19:22
@Gregory-Pereira
Copy link
Member Author

Gregory-Pereira commented Mar 10, 2022

/unhold
Ready for review.
To preview formatted doc changes, see my fork

@sesheta sesheta removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 10, 2022
Copy link
Contributor

@fridex fridex left a comment

Choose a reason for hiding this comment

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

Changes look really nice to me. I've also verified the resulting container image works. I think this can go in. Thanks! 💯 👍🏻

@sesheta
Copy link
Member

sesheta commented Mar 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fridex

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

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 11, 2022
@sesheta sesheta merged commit cd5b91f into thoth-station:master Mar 11, 2022
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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants