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

Add support for the aarch64 Hook #104

Merged
merged 2 commits into from
Sep 15, 2021

Conversation

jacobweinstock
Copy link
Member

Description

Hook repo just recently released support for aarch64.
This change adds support for downloading these files.

Why is this needed

Fixes: #

How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@jacobweinstock jacobweinstock added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 8, 2021
Comment on lines 68 to 69
echo "extracting hook..."
hook_extract "${extract_dir}" "${source_dir}" "${filename}"
Copy link
Contributor

Choose a reason for hiding this comment

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

did you mean to get rid of the check if already extracted?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah. This hinders switching between hook and osie as these files would need to be overwritten but wouldn't because of these checks.

Copy link
Contributor

Choose a reason for hiding this comment

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

how about adding a stamp file like ${extract_dir}/.hook-successfully-extracted and similar for osie. Then the if would also be simpler too. I don't want to force anyone to re-download hook/osie unnecessarily.

Copy link
Member Author

Choose a reason for hiding this comment

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

this is not for the download, just the archive extracting. The downloads will still be checked before trying again. see here

Copy link
Contributor

Choose a reason for hiding this comment

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

oops, right. But then does mean that osie/hook is going to be re-extracted everytime we run sandbox? If not, then why were the already-extracted-checks around for in the first place.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, an extract will happen with every docker-compose up. I removed them because the check for extracting based on files inside the archive feels unnecessary and couples this basic script to knowing what's inside the archive. For Hook there are 2 archives with 2 files in each, but OSIE has a lot of files. I don't know if it's worth checking. In my tests, the extract is normally only a few seconds.

Copy link
Contributor

Choose a reason for hiding this comment

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

you likely have a fast ssd/nvme machine right? IIRC this was put in because extracting osie over and over was very slow for some users and very much a waste of time. You don't need to know what the files are that exist in the archive if you add your own stamp file post-extraction and check for that.

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 originated this script a month ago with the idea to have it be as idempotent as possible, not to solve any slowness or other. I would like to see this pushed through so I have updated the PR to check based on the downloaded archive.

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm then I'm thinking of something else then. Thanks for that context. All good then!

else
echo "osie files already exist, not extracting"
fi
echo "extracting osie..."
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto, did you mean to get rid of the already extracted check?

deploy/compose/osie/lastmile.sh Outdated Show resolved Hide resolved
Hook repo just recently released support for aarch64.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
Copy link
Contributor

@mmlb mmlb left a comment

Choose a reason for hiding this comment

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

left a comment in reply box

Hook repo just recently released support for aarch64.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
fi
osie_move_helper_scripts "${source_dir}" "${dest_dir}"
else
echo "osie already downloaded"
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want to update the message here to be osie/hook?

Copy link
Contributor

@mmlb mmlb left a comment

Choose a reason for hiding this comment

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

lgtm to merge, there's the echo "osie already downloaded" that maybe you'd want to update but not worth blocking on.

@jacobweinstock jacobweinstock merged commit 37b7c7e into tinkerbell:main Sep 15, 2021
@jacobweinstock jacobweinstock deleted the add-aarch64-hook branch September 15, 2021 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants