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

user: rewrite parts of the Build Constraints chapter #323

Closed
wants to merge 1 commit into from

Conversation

smithfarm
Copy link
Member

Fixes: #291

@smithfarm smithfarm self-assigned this Feb 8, 2024
@smithfarm smithfarm added the DO_NOT_MERGE Do not push the merge button even if it's possible label Feb 8, 2024
@smithfarm smithfarm force-pushed the wip-issue-291 branch 2 times, most recently from b68647d to 96a0760 Compare February 8, 2024 15:58
<para> Constraints can be set for a particular package by including a
_constraints file in the package. </para>
<para> Constraints can also be included directly in the build recipe (spec,
dsc, etc.), provided the build recipe parser supports it. </para>
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice if you would name the ones we know support it right now...

Copy link
Member

Choose a reason for hiding this comment

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

it is written there already: "Example for rpm spec file or Dockerfile:"

Copy link
Member Author

Choose a reason for hiding this comment

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

I can write expicitly that only spec and Dockerfile are supported, but then the moment support is expanded to another recipe that statement will be wrong...

@hennevogel
Copy link
Member

In general I would also mention how to get an idea what a build is using through the _statistics file that every build produces. This question comes up every time we discuss constraints.

https://build.opensuse.org/package/statistics/home:hennevogel/gifup/openSUSE_Tumbleweed/x86_64

and the API

https://api.opensuse.org/apidocs/#/Build/get_build__project_name___repository_name___architecture_name___package_name___statistics

<para>It's not clear how the reader would find out if a given build recipe
parser supports BuildConstraints and it would even be nice here to link to a
discussion of what, specifically, is meant by "build recipe". </para>
</warning>
Copy link
Member Author

@smithfarm smithfarm Feb 9, 2024

Choose a reason for hiding this comment

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

^^^ @hennevogel
Instead of naming here the recipe parsers that support (and then dooming ourselves to the list being incomplete when the developers expand the support to more and more parsers), perhaps it would be better to empower the reader to find out the actual state.

Copy link
Member

Choose a reason for hiding this comment

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

no, please don't write such a thing in the documentation. The documentation is here to explain that.

Copy link
Member Author

@smithfarm smithfarm Feb 9, 2024

Choose a reason for hiding this comment

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

Please note, this is just a draft and these warnings will disappear before the "draft" flag is removed. Just to be clear.

(I used <warning> because I assume docbook doesn't have a <fixme> ;-)

@smithfarm
Copy link
Member Author

smithfarm commented Feb 9, 2024

In general I would also mention how to get an idea what a build is using through the _statistics file that every build produces.

Yes, the idea to fix #291 is what got me started on this, but I found that (if you'll forgive me comparing the fix to an airplane) the fix had no nice place to land. So I started building an airport...

@adrianschroeter
Copy link
Member

adrianschroeter commented Feb 9, 2024 via email

@hennevogel
Copy link
Member

yes, that is our reality that we always need to run after the documentation on implementation :)

Documentation is part of the implementation...

@smithfarm
Copy link
Member Author

yes, that is our reality that we always need to run after the documentation on implementation :)

@adrianschroeter I understand the sentiment and that this is the current reality, but it doesn't have to be that way. I can imagine an API call /buildconstraints/supported/buildrecipeparsers which would return the real answer to the question "which recipe parsers support buildconstraints?" And then the documentation could tell folks how to get the real answer, instead of presenting a false answer.

@adrianschroeter
Copy link
Member

adrianschroeter commented Feb 9, 2024 via email

@smithfarm
Copy link
Member Author

OK, this discussion has helped me and I now know how to deal with this "supported build recipes" problem. Wait for it ;-)

@smithfarm
Copy link
Member Author

will open a clean PR

@smithfarm smithfarm closed this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO_NOT_MERGE Do not push the merge button even if it's possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mention statistics in the constraints chapter
3 participants