Skip to content

Conversation

@chatton
Copy link
Contributor

@chatton chatton commented Apr 21, 2021

All Submissions:

To be reviewed after: #432

This PR adds a release task for the version upgrade post start hook and readiness probe.

  • Have you signed our CLA?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

@chatton chatton marked this pull request as ready for review April 21, 2021 14:14
@chatton chatton requested review from bznein and rodrigovalin April 21, 2021 14:14
Comment on lines +30 to +31
"tools_distro": "rhel70-x86_64",
"agent_distro": "rhel7_x86_64",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the values of these fields were in the opposite distro!

Copy link
Contributor

@rodrigovalin rodrigovalin left a comment

Choose a reason for hiding this comment

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

I have one comment on that ensure_skip_tag function whose return value seems a bit odd.

return self._config["agent_image_ubi"]
return self._config["agent_image_ubuntu"]

def ensure_skip_tag(self, tag: str) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this return value is not being used anywhere, and it is not evident what it is suppoed to mean. Maybe remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was intended to return true if the value was modified - but you're right we don't actually need this! Will remove


# shellcheck disable=SC2154
python3 pipeline.py --image-name "${image_name}"
if [ -n "${release}" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this logic to the python script instead? Always do

python3 pipeline.py --image-name "${image_name}" --release "${release:-}"

And in the python script check for the value of the --release option (which should default to false)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes that's a lot cleaner!

pipeline.py Outdated
def _parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("--image-name", type=str)
parser.add_argument("--release", action="store_true")
Copy link
Contributor

Choose a reason for hiding this comment

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

type bool, default is False? Will be easier to call from shell script

Copy link
Contributor

@rodrigovalin rodrigovalin left a comment

Choose a reason for hiding this comment

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

LGTM

@chatton chatton merged commit af9674a into master Apr 22, 2021
@chatton chatton deleted the CLOUDP-83092_add_release_task_for_init_containers branch April 22, 2021 09:21
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