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

Azure platform: fix getting the console output #113

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

margamanterola
Copy link
Contributor

Fix getting the console output

The regex patterns to process the URL were assuming that the test names would all start with "kola-", which is not true when running Jenkins tests. This caused the container and blobName variables to be empty, making it impossible to get the console output.

On top of this, the function that reads the data was always returning an error, which meant that the data was never written, even if it could be obtained successfully.

This change fixes the regex patterns, adds a lot more error handling, and returns non-error when the function succeeds

How to use / Testing done

bin/kola run --parallel=1 --basename=marga-test --board=amd64-usr --channel=beta --platform=azure '--azure-blob-url=https://flatcar.blob.core.windows.net/publish/flatcar-linux-2512.1.1-beta.vhd?se=2099-12-31T23%3A59%3A59Z&sig=FAiqfI5MVw7b11kNc%2Bfb7OMQjphiUHuLnMEzNhOHh9g%3D&sp=rl&sr=b&sv=2015-02-21' --azure-location=francecentral --azure-profile=~/.creds/azureProfile.json --azure-auth=~/.creds/azureCredentials.json --tapfile=azure.tap --torcx-manifest=torcx_manifest.json kubernetes.kubelet_wrapper.var-log-mount

Before this change, this would print errors and not generate any console output files. With this change, running this test will end up generating a console.txt file, like this one: _kola_temp/azure-2020-06-17-1544-8943/kubernetes.kubelet_wrapper.var-log-mount/marga-test-fb-b811232835/console.txt

Fixes: kinvolk/PROJECT-flatcar-linux#284

The regex patterns to process the URL were assuming that the test names
would all start with "kola-", which is not true when running Jenkins
tests. This caused the container and blobName variables to be empty,
making it impossible to get the console output.

On top of this, the function that reads the data was always returning
an error, which meant that the data was never written, even if it could
be obtained successfully.

This change fixes the regex patterns, adds a lot more error handling,
and returns non-error when the function succeeds
@margamanterola margamanterola requested a review from a team June 17, 2020 14:10
Copy link
Member

@pothos pothos left a comment

Choose a reason for hiding this comment

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

Thanks!

@margamanterola margamanterola merged commit c0bb135 into flatcar-master Jun 17, 2020
@margamanterola margamanterola deleted the marga-kinvolk/fix-azure-console branch July 3, 2020 13:52
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