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

Switch to manual docker #79

Merged
merged 55 commits into from
Sep 20, 2024
Merged

Conversation

samansmink
Copy link
Collaborator

This PR removes the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION flag from the Linux CI.

It achieves this by refactoring the linux jobs to manually invoke docker for the build and test steps effectively pulling out the github actions from the docker image. This has the following benefits:

  • The jobs will not fail when GH stops supporting the ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION flag
  • easier to reproduce the environment locally
  • more robust linux builds because we are not mixing github actions with a horribly old linux version anymore

Also during development I integrated #63 because I needed it, that saved me some CI cycles so I can just merge this PR and close the otherone.

There is quite some duplication between the dockerfiles, but I did not find a clean way to solve this yet, but any suggestions (or follow up PRs) are welcome ofc.

After this PR it makes sense to upstream this into duckdb/duckdb somehow because there we can reuse these images in CI as well to make things more robust and get rid of ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION

Another follow up is to finally enable the vcpkg build cache, because that seems to be able to make quite a difference as well judging from how long vcpkg runs in the delta extension build

@samansmink samansmink requested a review from carlopi September 19, 2024 09:45
@carlopi
Copy link
Collaborator

carlopi commented Sep 19, 2024

Thanks a lot from bringing this in.

At a first look, this looks very solid.

I will later do a proper review, then we can discuss what's the strategy for bringing this in.
I guess we likely can bring this in main, run tests in the various existing extensions (core or community ones) in preparation of the upcoming v1.1.1, then take it from there.

Copy link
Collaborator

@carlopi carlopi left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

This looks great, there are some improvements we can consider moving forward, but this does look solid, and I think it's worth having this merged in.

Question, should we do first this into a next branch, then testing, then into main branch, or directly into main and then testing?

@samansmink samansmink merged commit c5446f7 into duckdb:main Sep 20, 2024
19 checks passed
@samansmink samansmink deleted the switch-to-manual-docker branch September 20, 2024 10:38
carlopi added a commit to duckdb/community-extensions that referenced this pull request Sep 21, 2024
carlopi added a commit to carlopi/duckdb that referenced this pull request Nov 26, 2024
Idea is instead of executing whole workflow job containerized, that means that actions will
be run within the container, that in turn means it's hard to  use older images since they will
not have the required dependecies versions for the actions (in particular node 20).

Solution is to containerize explicitly the relevant tests in the workflow, invoking actions
outside of the container in the regular image that powers the workflow.

Heavy lifting has been done by @samansmink in duckdb/extension-ci-tools#79
and connected PRs.

This PR allows to avoid the need for ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION in Python CI.
Mytherin added a commit to duckdb/duckdb that referenced this pull request Nov 27, 2024
…RE_NODE_VERSION only on main/feature (#14998)

Idea for this PR is avoiding some noise in CI and the potential
confusion to DuckDB contributors.

For additional context:
* Using `container:` implies all actions are run within a given
containerized image
* for security & maintenance reasons, actions are required to use recent
tooling
* eventually those tools (like node 20) will not be supported on images
such as manylinux_2014

Solution is running the dockerized parts piece-by-piece, while
interacting with actions at the `native` layer.

This has been worked on in the duckdb/extension-ci-tools repository, via
duckdb/extension-ci-tools#79 and subsequent PRs,
now we need to port this to duckdb/duckdb.

This PR only avoid the noise in CI, given those workflow will fail
without fix, I don't see much value in running them at all.

Proper fix to be rolled piece-by-piece, Python for example will be
eventually solved via: #14987,
where this part has then to be reverted.
carlopi added a commit to carlopi/duckdb that referenced this pull request Nov 27, 2024
Idea is instead of executing whole workflow job containerized, that means that actions will
be run within the container, that in turn means it's hard to  use older images since they will
not have the required dependecies versions for the actions (in particular node 20).

Solution is to containerize explicitly the relevant tests in the workflow, invoking actions
outside of the container in the regular image that powers the workflow.

Heavy lifting has been done by @samansmink in duckdb/extension-ci-tools#79
and connected PRs.

This PR allows to avoid the need for ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION in Python CI.
carlopi added a commit to carlopi/duckdb that referenced this pull request Nov 27, 2024
Idea is instead of executing whole workflow job containerized, that means that actions will
be run within the container, that in turn means it's hard to  use older images since they will
not have the required dependecies versions for the actions (in particular node 20).

Solution is to containerize explicitly the relevant tests in the workflow, invoking actions
outside of the container in the regular image that powers the workflow.

Heavy lifting has been done by @samansmink in duckdb/extension-ci-tools#79
and connected PRs.

This PR allows to avoid the need for ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION in Python CI.
carlopi added a commit to carlopi/duckdb that referenced this pull request Nov 27, 2024
Idea is instead of executing whole workflow job containerized, that means that actions will
be run within the container, that in turn means it's hard to  use older images since they will
not have the required dependecies versions for the actions (in particular node 20).

Solution is to containerize explicitly the relevant tests in the workflow, invoking actions
outside of the container in the regular image that powers the workflow.

Heavy lifting has been done by @samansmink in duckdb/extension-ci-tools#79
and connected PRs.

This PR allows to avoid the need for ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION in Python CI.
carlopi added a commit to carlopi/duckdb that referenced this pull request Nov 27, 2024
Idea is instead of executing whole workflow job containerized, that means that actions will
be run within the container, that in turn means it's hard to  use older images since they will
not have the required dependecies versions for the actions (in particular node 20).

Solution is to containerize explicitly the relevant tests in the workflow, invoking actions
outside of the container in the regular image that powers the workflow.

Heavy lifting has been done by @samansmink in duckdb/extension-ci-tools#79
and connected PRs.

This PR allows to avoid the need for ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION in Python CI.
Mytherin added a commit to duckdb/duckdb that referenced this pull request Nov 27, 2024
…ons (#14987)

Idea is instead of executing whole workflow job containerized, that
means that actions will be run within the container, that in turn means
it's hard to use older images since they will not have the required
dependecies versions for the actions (in particular node 20).

Solution is to containerize explicitly the relevant tests in the
workflow, invoking actions outside of the container in the regular image
that powers the workflow.

Heavy lifting has been done by @samansmink in
duckdb/extension-ci-tools#79 and connected PRs.

This PR allows to avoid the need for
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION in Python CI.
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.

2 participants