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

Fix distro name for ubuntu-20.04 in arm release #1355

Merged
merged 1 commit into from Oct 11, 2022

Conversation

williancolognesitrimble
Copy link
Contributor

@williancolognesitrimble williancolognesitrimble commented Oct 7, 2022

Database name

postgresql

Pull request description

I was trying to use checksum in my ansible pipeline but fall down in checksum problem

- name: Download wal-g.tar.gz with checksum testing
  get_url:
    url: "https://github.com/wal-g/wal-g/releases/download/v2.0.1/wal-g-pg-ubuntu-20.04-aarch64.tar.gz"
    dest: "{{ ansible_env.HOME }}"
    checksum: "sha256:https://github.com/wal-g/wal-g/releases/download/v2.0.1/wal-g-pg-ubuntu-20.04-aarch64.tar.gz.sha256"
  register: walg_download

so I find out that the checksum file is invalid due to invalid filename.

Describe what this PR fix

Add dash in release filename for ubuntu 20.04.

Please provide steps to reproduce (if it's a bug)

➜  ~ wget -o -s https://github.com/wal-g/wal-g/releases/download/v2.0.1/wal-g-pg-ubuntu-20.04-aarch64.tar.gz
➜  ~ wget -o -s https://github.com/wal-g/wal-g/releases/download/v2.0.1/wal-g-pg-ubuntu-20.04-aarch64.tar.gz.sha256
➜  ~ sha256sum wal-g-pg-ubuntu-20.04-aarch64.tar.gz
9782bd6f4f08ec26d0f2f5f8fd8f9531e4fe39f14ef5f764cbec08e93da2bbcc  wal-g-pg-ubuntu-20.04-aarch64.tar.gz
➜  ~ cat wal-g-pg-ubuntu-20.04-aarch64.tar.gz.sha256
9782bd6f4f08ec26d0f2f5f8fd8f9531e4fe39f14ef5f764cbec08e93da2bbcc  wal-g-pg-ubuntu20.04-aarch64.tar.gz

➜  ~ sha256sum wal-g-pg-ubuntu-20.04-aarch64.tar.gz| diff wal-g-pg-ubuntu-20.04-aarch64.tar.gz.sha256 -
< 9782bd6f4f08ec26d0f2f5f8fd8f9531e4fe39f14ef5f764cbec08e93da2bbcc  wal-g-pg-ubuntu20.04-aarch64.tar.gz
---
> 9782bd6f4f08ec26d0f2f5f8fd8f9531e4fe39f14ef5f764cbec08e93da2bbcc  wal-g-pg-ubuntu-20.04-aarch64.tar.gz

@williancolognesitrimble williancolognesitrimble requested a review from a team as a code owner October 7, 2022 13:48
serprex
serprex previously approved these changes Oct 7, 2022
@usernamedt
Copy link
Member

Have you tried to run a release pipeline with this change?

@serprex
Copy link
Contributor

serprex commented Oct 7, 2022

No

@usernamedt
Copy link
Member

I think it might be a good idea to run it by creating a test release on the forked repo.

@serprex
Copy link
Contributor

serprex commented Oct 7, 2022

@williancolognesitrimble you can trigger this workflow by tagging the commit as v*

@serprex
Copy link
Contributor

serprex commented Oct 7, 2022

https://github.com/wcoc/wal-g/actions/runs/3205334398

Looks like build-on-arch requires the hyphen to be missing

@serprex
Copy link
Contributor

serprex commented Oct 7, 2022

@williancolognesitrimble could you explain why the hyphen is needed in filename? Reading over your description, why can't you remove the hyphen in the url you're using in pipeline?

@williancolognesitrimble
Copy link
Contributor Author

williancolognesitrimble commented Oct 7, 2022

@williancolognesitrimble could you explain why the hyphen is needed in filename? Reading over your description, why can't you remove the hyphen in the url you're using in pipeline?

Actually it's not needed, the problem is that the file has one name and inside the checksum file another, and it's failing in my pipeline that use a ansible playbook with checksum validation to download the binary file com github releases, as you can see here:
➜ ~ cat wal-g-pg-ubuntu-20.04-aarch64.tar.gz.sha256
9782bd6f4f08ec26d0f2f5f8fd8f9531e4fe39f14ef5f764cbec08e93da2bbcc wal-g-pg-ubuntu20.04-aarch64.tar.gz

but in the download has the dash in filename https://github.com/wal-g/wal-g/releases/download/v2.0.1/wal-g-pg-ubuntu-20.04-aarch64.tar.gz

we could just rename this download file, if the Dockerfile in arm distro just works with no dash Dockerfile.aarch64.ubuntu-20.04 :(, I was thinking that all releases followed a "pattern" for name, because for x86 ones, all of them has the dash.

@serprex serprex dismissed their stale review October 7, 2022 15:19

dash breaks workflow

@williancolognesitrimble
Copy link
Contributor Author

any idea to fix checksum file with wrong filename?

@usernamedt
Copy link
Member

usernamedt commented Oct 7, 2022

any idea to fix checksum file with wrong filename?

I think it might be enough to explicitly specify the ubuntu20.04 in distro setting, like this

        with:
          arch: ${{ matrix.arch }}
          distro: ubuntu20.04

@serprex
Copy link
Contributor

serprex commented Oct 11, 2022

@williancolognesitrimble please retrigger release actions on your fork

@williancolognesitrimble
Copy link
Contributor Author

williancolognesitrimble commented Oct 11, 2022

@williancolognesitrimble please retrigger release actions on your fork

Looks like it's everything fine... https://github.com/wcoc/wal-g/actions/runs/3228214003/jobs/5284009980

@serprex serprex self-requested a review October 11, 2022 17:06
@serprex serprex merged commit ed45cdd into wal-g:master Oct 11, 2022
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.

None yet

4 participants