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

build: integrate prepare source from composer #1476

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lzap
Copy link
Collaborator

@lzap lzap commented Feb 4, 2025

I noticed this automated PR failed:

#1475

This is a chance to integrate changes from composer which uses a new Go feature "toolbox", hopefully it will prevent from automated failures.

@lzap lzap requested a review from croissanne February 4, 2025 12:16
Copy link

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@lzap
Copy link
Collaborator Author

lzap commented Feb 7, 2025

Hey @croissanne and @ezr-ondrej this needs an attention - other PRs are failing because of a version requirement, I believe it is great time to fix prepare sources for once.

There is a tread on #osbuild channel about this, this was merged into composer, then reverted by @achilleas-k and now the final version is heading in: osbuild/osbuild-composer#4600 also being integrated elsewhere: osbuild/weldr-client#155


GOBIN=$TOOLS_PATH $GO_BINARY generate -x -mod=mod ./...
# Generate source (skip vendor/):
GOBIN=$TOOLS_PATH go generate -x ./cmd/... ./internal/...
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The TOOLS_PATH will disappear once we upgrade to 1.24 which features the all new Go tool pinning feature. In short, external tools will be added to go.mod now ensuring we all are on the same version. Until then, this is I believe a good workaround for the time being.

@lzap lzap force-pushed the prepare-source branch 2 times, most recently from 7031154 to f76cb53 Compare February 7, 2025 10:40
Copy link
Collaborator

@ezr-ondrej ezr-ondrej left a comment

Choose a reason for hiding this comment

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

Works for me, one nit, apart of that it works... and if it works, merge it 😛

$GO_BINARY download
# Check latest Go version for the minor we're using
LATEST=$(curl -s https://endoflife.date/api/go/"${GO_MAJOR_VER}".json | jq -r .latest)
if test "$LATEST" != "go$GO_VERSION"; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't work, I see the WARNING even tho we are on latest, I believe the issue is:

Suggested change
if test "$LATEST" != "go$GO_VERSION"; then
if test "$LATEST" != "$GO_VERSION"; then

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, rebased.

@ezr-ondrej
Copy link
Collaborator

Sorry I wasn't fast enough and there is conflict now :/

@lzap
Copy link
Collaborator Author

lzap commented Feb 17, 2025

Sorry I wasn't fast enough and there is conflict now :/

This is fine, the other patch was more important it fixed a CICD problem. Rebased.

@ezr-ondrej
Copy link
Collaborator

The Checks CI fails with following error, I'm not sure what it's trying to tell me :)

jsonschema: "run" does not validate with "/properties/run/additionalProperties": additional properties 'skip-dirs' not allowed
jsonschema: "" does not validate with "/additionalProperties": additional properties 'exclude-dirs' not allowed
Failed executing command with error: the configuration contains invalid elements

@lzap
Copy link
Collaborator Author

lzap commented Feb 18, 2025

Fixed, this can be dropped from the linter config as vendor/ was dropped from this repository.

Also integrating #1484 update into this PR as well.

@ezr-ondrej
Copy link
Collaborator

Hmm container test is trying to build an container and fails
go: go.mod requires go >= 1.22.12 (running go 1.22.9; GOTOOLCHAIN=local) go-toolset seems to be on 1.22.9 :/

@lzap
Copy link
Collaborator Author

lzap commented Feb 18, 2025

Yeah the warning I implemented is sort of useless since Go Toolset in RHEL is few versions behind usually. But we now have the working in composer to so let's stick with it? Rebased.

@ezr-ondrej
Copy link
Collaborator

/retest

@ezr-ondrej
Copy link
Collaborator

The failures feel unrelated 🤔
Lets discuss this with osbuild QE tomorrow :)

@ezr-ondrej
Copy link
Collaborator

or @tkoscieln once you get to this, do you know what's going on here? 🤔

#tests.test_blueprints.test_blueprint_details[ViaREST] (from pytest)

>       assert expected_values["customizations"] == blueprint_details["customizations"]
E       AssertionError: assert {'filesystem': [{'min_size': 5368709120, 'mountpoint': '/home'}, {'min_size': 1572864000, 'mountpoint': '/var/log'}], 'packages': ['bash'], 'payload_repositories': []} == {'filesystem': [{'min_size': 5368709120, 'mountpoint': '/home'}, {'min_size': 1572864000, 'mountpoint': '/var/log'}], 'hostname': '', 'locale': {}, 'packages': ['bash'], 'payload_repositories': [], 'timezone': {}}

@lzap
Copy link
Collaborator Author

lzap commented Feb 19, 2025

Ephemeral failure. /retest

@tkoscieln
Copy link
Contributor

@ezr-ondrej hello, this is my mistake and I know exactly what broke here. I accidentally forgot to push one commit before merging new changes to our plugin yesterday, @lzap the missing commit is a fix for the issues I had with what API returns that we discussed last week. Will fix this asap.

@tkoscieln
Copy link
Contributor

@ezr-ondrej @lzap sorry for the delay, was facing some errors from Quay during the IQE container push. Should be fixed now.
/retest

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

Successfully merging this pull request may close these issues.

3 participants