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

GH-325: [Website] Update website deployment script to use latest LTS version of Node.js and Webpack 5.75.0 #326

Merged
merged 15 commits into from Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/deploy.yml
Expand Up @@ -27,17 +27,31 @@ jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
container:
image: ubuntu:22.04 # Ubuntu 22.04 is the latest LTS version as of April 21, 2022: https://wiki.ubuntu.com/Releases
Copy link
Member

@kou kou Mar 3, 2023

Choose a reason for hiding this comment

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

Can we try reverting this and changes related to this? (e.g.: explicit apt-get, ImageOS: ubuntu22 and so on)

If we can use the ubuntu-latest image directly, we can use simpler deploy.yml and don't need to maintain Ubuntu version for this.

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'm OK with just using ubuntu-latest and no container. However, I know there were some concerns about this approach expressed by @avantgardnerio (e.g. the proprietary nature and lack of debuggability of ubuntu-latest).

However, I can try this approach and if no one else in the community has reservations about it, then I am OK with it.

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'm testing out the workflow with no container now on https://github.com/mathworks/arrow-site/tree/GH-325-no-container.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I can understand the debuggability concern. If we make this job local debuggable, we should not use actions/* in ubuntu:XXX container like we did in apache/arrow: https://github.com/apache/arrow/blob/main/.github/workflows/cpp.yml#L92-L99

If we need local debuggability, we may need to choose another approach.

Copy link
Member

@kou kou Mar 3, 2023

Choose a reason for hiding this comment

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

Thanks.
It seems to work. I prefer the with container approach to the no container approach but I want to hear opinions from others.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for confirming this.

How about the following steps to improve the current situation?

  1. We merge "no container" version https://github.com/mathworks/arrow-site/tree/GH-325-no-container because it's simpler than this version
  2. We create a Dockerfile based on ubuntu:22.04 and use it in CI and https://github.com/apache/arrow-site#using-docker (This prevents breaking @alamb 's use case accidentally)
  3. We extract command lines used in 2. as a shell script and fine tune the shell script to work on host Ubuntu 22.04 too (@avantgardnerio 's use case)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @avantgardnerio and @kou for your sharing your thoughts! I agree. This sounds like a reasonable path forward.

Just to clarify:

"We create a Dockerfile based on ubuntu:22.04 and use it in CI"

By "use it in CI" do you mean that you would like the GitHub Actions workflow to run inside of a Docker container based on this Dockerfile? If so, doesn't this conflict with 1. (which is to use the "no container" workflow)?

Sorry for the confusion. I just want to make sure we are all on the same page before moving forward.

Copy link
Member

Choose a reason for hiding this comment

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

My idea is that we just use docker build && docker run in GitHub Actions instead of container:.

(More specifically, we will use docker/build-push-action instead of raw docker build and push a built image to ghcr.io to reuse the built image on local for https://github.com/apache/arrow-site#using-docker . https://github.com/groonga/groonga-delta/blob/main/.github/workflows/docker.yml is a bit old but may help you to understand my idea.)

Copy link
Member

Choose a reason for hiding this comment

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

If my explanation isn't enough, please ask me more!

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for clarifying @kou! This make sense!

I'll start working on these changes now.

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- name: Update package list
run: |
apt-get update -qq
- name: Install dependencies
run: |
apt-get install -qq -y jq rsync git libyaml-0-2 npm
- name: Checkout git repository
uses: actions/checkout@v3
- name: Set GitHub workspace as git safe.directory # Required to work around: https://github.com/actions/checkout/issues/766
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
env:
ImageOS: ubuntu22
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install dependencies
run: |
bundle install
- name: Configure for production
run: |
echo "JEKYLL_BASE_URL=" >> ${GITHUB_ENV}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
16
lts/hydrogen