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

MDEV-28153: Debian autobake- use absolute dependencies #2064

Conversation

grooverdan
Copy link
Member

@grooverdan grooverdan commented Mar 25, 2022

  • The Jira issue number for this PR is: MDEV-28153

Description

With autobake-deb.sh no doing explicit dependencies, we need to run this
explicitly as a prep step in salsa-ci so the dependencies can be pulled
before the real compilation begins.

Resolves 10.5 part of salsa in #2039.

How can this PR be tested?

Currently running on https://salsa.debian.org/grooverdan/mariadb-server/-/pipelines/361865)

(10.8 test timed out)

Basing the PR against the correct MariaDB version

  • This is a bug fix and the PR is based against the earliest branch in which the bug can be reproduced

Backward compatibility

TODO: fill details here, if applicable, or remove the section

@grooverdan grooverdan requested a review from ottok as a code owner March 25, 2022 06:45
Copy link
Contributor

@ottok ottok left a comment

Choose a reason for hiding this comment

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

I don't understand the commit message / documentation. Why are these changes needed? What is broken - what do these changes fix?

What is early bit of autobake-deb.sh that needs lsb-release? What is this SALSA_PREP thing? Why is columnstore stanza refactored?

@ottok
Copy link
Contributor

ottok commented Mar 26, 2022

Changed

## Basing the PR against the correct MariaDB version
- [ ] *This is a new feature and the PR is based against the latest MariaDB development branch*
- [ X ] *This is a bug fix and the PR is based against the earliest branch in which the bug can be reproduced*

to

## Basing the PR against the correct MariaDB version
- [X] *This is a bug fix and the PR is based against the earliest branch in which the bug can be reproduced*

@grooverdan
Copy link
Member Author

I don't understand the commit message / documentation. Why are these changes needed?

Since MDEV-28153, debian dependencies are now a property of the script. Without adjusting control before apt-get build-dep, an incorrect, possibly impossible, set of dependencies are generated.

What is broken - what do these changes fix?

By running the prepare only of autobake-deb.sh, the control file has its build dependencies updated. Running apt-get build-dep on any system will now pull the correct acheivable dependencies.

What is early bit of autobake-deb.sh that needs lsb-release?

CODENAME="$(lsb_release -sc)"

What is this SALSA_PREP thing?

A flag to run the prepare stage only, so that control (and rules) files only are updated.

Why is columnstore stanza refactored?

It need to be id-potent so that a second run to trigger the build doesn't get two sets of included columnstore files, especially in debian/control

@ottok
Copy link
Contributor

ottok commented Mar 28, 2022

I don't understand the commit message / documentation. Why are these changes needed?

Since MDEV-28153, debian dependencies are now a property of the script. Without adjusting control before apt-get build-dep, an incorrect, possibly impossible, set of dependencies are generated.

What is broken - what do these changes fix?

By running the prepare only of autobake-deb.sh, the control file has its build dependencies updated. Running apt-get build-dep on any system will now pull the correct acheivable dependencies.

There is no need to run prepare only, either you run full autobake-deb.sh or you do a native build. A change based on the above assumption is mislead.

What is early bit of autobake-deb.sh that needs lsb-release?

CODENAME="$(lsb_release -sc)"

This command works all the time and is part of standard Debian base. Why add it now?

This PR would be a lot more convincing if it referred a failing CI run on mainline and then a successful one from this PR. That is not the case now.

What is this SALSA_PREP thing?

A flag to run the prepare stage only, so that control (and rules) files only are updated.

Does not make sense as explained above.

Why is columnstore stanza refactored?

It need to be id-potent so that a second run to trigger the build doesn't get two sets of included columnstore files, especially in debian/control

This whole section is obsolete now when you changed/broke the previous columnstore packaging structure via ec62f46. Either it is part of the native packaging (withfiles in debian/* and stanza in debian/control), or it is not. Any attempt for middle ground just causes a mess and is brings no benefit as far as I can see.

@grooverdan
Copy link
Member Author

I don't understand the commit message / documentation. Why are these changes needed?

Since MDEV-28153, debian dependencies are now a property of the script. Without adjusting control before apt-get build-dep, an incorrect, possibly impossible, set of dependencies are generated.

What is broken - what do these changes fix?

By running the prepare only of autobake-deb.sh, the control file has its build dependencies updated. Running apt-get build-dep on any system will now pull the correct acheivable dependencies.

There is no need to run prepare only, either you run full autobake-deb.sh or you do a native build. A change based on the above assumption is mislead.

What is early bit of autobake-deb.sh that needs lsb-release?

CODENAME="$(lsb_release -sc)"

This command works all the time and is part of standard Debian base. Why add it now?

This PR would be a lot more convincing if it referred a failing CI run on mainline and then a successful one from this PR. That is not the case now.

https://salsa.debian.org/grooverdan/mariadb-server/-/jobs/2603984

This whole section is obsolete now when you changed/broke the previous columnstore packaging structure via ec62f46.

I noticed and corrected this 2885fb0

I'm sorry we have differing opinions on the MDEV-28153 changes.

@ottok
Copy link
Contributor

ottok commented Mar 30, 2022

Thanks for 2885fb0. Please in the future ask for review for all commits before you push them. The PR where you pushed that commit you added those commits after review and proceeded to merge without waiting for second review of the updated version.

I see in https://salsa.debian.org/grooverdan/mariadb-server/-/jobs/2603984 debian/autobake-deb.sh: line 79: lsb_release: command not found but this commit is on this PR and I am against this PR, so if this is not merged, the failing build is not introduced in the first place.

To iterate, Salsa-CI builds on branches 10.5/6/7/8/9 are not broken and do not need this fix.

I'm sorry we have differing opinions on the MDEV-28153 changes.

I still think that the claim about "apt cache being broken" is based on misunderstanding or flawed assumptions. The apt cache is never broken if the builder is healthy and capable of installing new packages. However, since you now refactored that, you should take ownership of the autobake-deb.sh contents. You can do that without having to pollute the salsa-ci.yml file with (at least so far seemingly) unnecessary SALSA_PREP=1 debian/autobake-deb.sh lines.

@@ -91,6 +94,11 @@ case "${CODENAME}" in
exit 1
esac

if [ -n "${SALSA_PREP:-}" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

There could be some comment why this is here as I don't understood reasoning? If we are not in Salsa exit?

Copy link
Member Author

Choose a reason for hiding this comment

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

:- to give it a default value in case its not set. Will prevent failures in bash strict +x mode and gets recognised by shellcheck.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add inline comment on what this section is, what uses it and why. Anybody can look up the syntax on a man page but it is hard to guess why you have this seemingly unnecessary logic here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so there should be an inline comment saying that the section is tailored for use with https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/ci_build_images/debian.Dockerfile to make Docker images with preinstalled build-dependencies for each Debian/Ubuntu release, and thus you want to generate the debian/control files but not run autobake.

@grooverdan grooverdan force-pushed the bb-10.5-danielblack-MDEV-28153-deb-explict-deps-salsa-postfix branch from 238a7a6 to 35cb5b4 Compare April 6, 2022 08:26
@grooverdan grooverdan changed the title MDEV-28153: Debian autobake- use absolute dependencies (Salsa postfix) MDEV-28153: Debian autobake- use absolute dependencies Apr 6, 2022
@grooverdan
Copy link
Member Author

@grooverdan grooverdan force-pushed the bb-10.5-danielblack-MDEV-28153-deb-explict-deps-salsa-postfix branch from 35cb5b4 to 7fbc52c Compare April 7, 2022 04:58
Without doing the full build.

Autobake now includes a dependency on lsb-release.

As the BB CI images
(https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/ci_build_images/debian.Dockerfile)
have explicit dependencies, there's no point maintaining them in
two places. We don't want do the full autobake-deb.sh there, just enough
to have the control file containing the correct dependencies.

Helps: MariaDB/mariadb.org-tools#130
Rather than Debian logs containing a barely decipherable mix
of build command and the output of some other command, we
use the make option --output-sync=target. This make the compile
line and the output stay together in the output stream.

This option exists even in the make version in debian;stretch
so should work everywhere.

Test on debian:stretch, ubuntu:18.04, the two lowest version that
use the debian/rules.
@grooverdan grooverdan force-pushed the bb-10.5-danielblack-MDEV-28153-deb-explict-deps-salsa-postfix branch from 7fbc52c to 81418f4 Compare April 7, 2022 05:19
@grooverdan grooverdan merged commit dea4e17 into MariaDB:10.5 Apr 7, 2022
@grooverdan grooverdan deleted the bb-10.5-danielblack-MDEV-28153-deb-explict-deps-salsa-postfix branch April 7, 2022 06:05
@ottok
Copy link
Contributor

ottok commented Apr 9, 2022

https://salsa.debian.org/grooverdan/mariadb-server/-/commit/35cb5b446cbbffa6729e5d55d81c224ed56d06d9/pipelines?ref=bb-10.5-danielblack-MDEV-28153-deb-explict-deps-salsa-postfix is the build in progress

Yes, but I am asking where is the build that failed? The addition you did to salsa-ci.yml is unnecessary, it does not do anything. Referencing a build that passes does not prove anything about that that addition fixed (and it didn't fix anything, salsa-ci on 10.5 is already passing).

@illuusio
Copy link
Contributor

The addition you did to salsa-ci.yml is unnecessary, it does not do anything.

Why does it not do anything? Is lsb already Salsa-CI dependency? I think point is that it's not breaking anything it's not that it should make it pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants