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

Correct some e2e behavior #7564

Merged
merged 2 commits into from
Mar 19, 2020
Merged

Correct some e2e behavior #7564

merged 2 commits into from
Mar 19, 2020

Conversation

smacfarlane
Copy link
Contributor

This PR addresses a few issues discovered while attempting to test packages built against the upcoming refresh.

A number of tests will timeout if the dependencies for the packages aren't already on disk. This can occur if the base image chefes/buildkite doesn't already have the packages cached. Since these tests aren't specifically testing install logic, it should be safe to pre-install them using the specified $HAB_BLDR_CHANNEL. An alternative approach would be to increase the timeout values, but they'd have to be made arbitrarily large to minimize the risk of timeout.

This also disables the promotion step via Buildkite, if the creator isn't Chef Expeditor. This gives us an extra level of safety beyond maybe_run from an accidental promotion.

The final change is to remove hard-coded HAB_BLDR_CHANNEL in tests, in favor of letting the environment drive that. This moves us close to being able to run these e2e tests against an arbitrary channel in Builder, which will be useful for validation of pre-release changes.

Signed-off-by: Scott Macfarlane smacfarlane@chef.io

* Add additional saftey check to promotion
* Install packages to prevent timeouts
* Remove hard-coded channels from tests

Signed-off-by: Scott Macfarlane <smacfarlane@chef.io>
@smacfarlane
Copy link
Contributor Author

@@ -1,5 +1,3 @@
$env:HAB_INTERNAL_BLDR_CHANNEL = "dev"
$env:HAB_BLDR_CHANNEL = "dev"
Copy link
Contributor

Choose a reason for hiding this comment

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

OMG

# These tests will timeout unless the launcher and all of its dependencies
# are already on disk.
hab pkg install core/hab-launcher --channel $HAB_BLDR_CHANNEL

Copy link
Contributor

Choose a reason for hiding this comment

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

This is good but it makes me wonder if we should be adding the sup and launcher to the setup_environment.ps1 and .sh e2e scripts.

Copy link
Contributor Author

@smacfarlane smacfarlane Mar 18, 2020

Choose a reason for hiding this comment

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

I thought about that, but thought it best to avoid installing most components in the shared scripts for now in favor of being explicit about what we expect on the system.

I don't have super strong feelings either way though.

Signed-off-by: Scott Macfarlane <smacfarlane@chef.io>
@smacfarlane smacfarlane merged commit f25c893 into master Mar 19, 2020
@chef-expeditor chef-expeditor bot deleted the sm/e2e-changes branch March 19, 2020 17:37
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