Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Conversation

@v1v
Copy link
Member

@v1v v1v commented Apr 21, 2022

What does this PR do?

Standardise the below tags/labels in the terraform resources for AWS/GCP:

  • environment => static value
  • repo. => static value
  • branch => dynamic value
  • build => dynamic value
  • created_date => dynamic value

Why is it important?

Help with tearing down any of the ephemeral resources which were not successfully removed as part of the system tests.

Implementation details

  • Those tag/labels are lowercase based to be GCP/AWS compliance
  • environment=ci will allow to filter all those cloud resources which were created in the CI
  • While created_date will help to filter those which were older than X days or X hours, since it's Unix epoch time based.
  • branch and build will help to identify what build in the CI and what PR, Branch or Tag created those resources.

Further details

BUILD_ID
The current build ID, identical to BUILD_NUMBER for builds created in 1.597+, but a YYYY-MM-DD_hh-mm-ss timestamp for older builds.

BRANCH_NAME
For a multibranch project, this will be set to the name of the branch being built, for example in case you wish to deploy to production from master but not from feature branches; if corresponding to some kind of change request, the name is generally arbitrary (refer to CHANGE_ID and CHANGE_TARGET).

Test

image

@v1v v1v added automation backport-v8.3.0 Automated backport with mergify backport-v8.2.0 Automated backport with mergify backport-v7.17.0 Automated backport with mergify labels Apr 21, 2022
@v1v v1v requested a review from a team April 21, 2022 17:12
@v1v v1v self-assigned this Apr 21, 2022
tags:
branch: "{{branch | default('Not running on CI')}}"
build: "{{build | default('Not running on CI')}}"
created_date: "{{ansible_date_time.epoch}}"
Copy link
Member Author

@v1v v1v Apr 21, 2022

Choose a reason for hiding this comment

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

I've found this here

GitSHA: "{{ gitSha }}"
Kind: "{{nodeLabel}}"
Name: "e2e-{{nodeLabel}}-{{runId}}"
ReaperMark: "e2e-testing-vm"
Copy link
Member Author

Choose a reason for hiding this comment

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

Should I standardise the tag names with lowercase and _ separator?

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the preference/standard, sounds good to me. Please remember to update the reaper pipeline.

@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 21, 2022

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-04-22T09:08:46.337+0000

  • Duration: 80 min 57 sec

Test stats 🧪

Test Results
Failed 5
Passed 310
Skipped 0
Total 315

Test errors 5

Expand to view the tests failures

Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from running pod – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.pod.name:a-pod": context deadline exceeded 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from a pod with an init container – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.container.name:container-in-pod" 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from short-living cronjobs – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.container.name:cronjob-container": context deadline exceeded 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from failing pod – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.pod.name:a-failing-pod": context deadline exceeded 
    

  • no stacktrace
Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Metrics collection configured from targeted Redis Pod – elastic-agent standalone
    Expand to view the error details

     Step "elastic-agent" collects events with "kubernetes.pod.name:redis": context deadline exceeded 
    

  • no stacktrace

Steps errors 2

Expand to view the steps failures

Shell Script
  • Took 45 min 41 sec . View more details here
  • Description: ssh -tt -o TCPKeepAlive=yes -o ServerAliveInterval=60 -o ServerAliveCountMax=10 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /var/lib/jenkins/workspace/PR-2407-4-06b8b671-923d-478e-b1ed-b40d4568013d/e2essh [email protected] -- 'sudo bash /home/admin/e2e-testing/.ci/scripts/functional-test.sh "elastic-agent && ~@nightly" '
Archive the artifacts
  • Took 0 min 0 sec . View more details here
  • Description: [2022-04-22T10:28:34.265Z] Archiving artifacts script returned exit code 2

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 5

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from running pod – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from a pod with an init container – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from short-living cronjobs – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Logs collection from failing pod – elastic-agent standalone
  • Name: Initializing / End-To-End Tests / kubernetes-autodiscover_debian_amd64_elastic-agent / Metrics collection configured from targeted Redis Pod – elastic-agent standalone

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

- name: Create test environment
hosts: localhost
gather_facts: no
gather_facts: yes
Copy link
Member Author

Choose a reason for hiding this comment

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

ansible_date_time is part of the facts, otherwise:

[2022-04-21T17:19:09.430Z] fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible_date_time' is undefined

@v1v v1v added the backport-v8.1.0 Automated backport with mergify label Apr 25, 2022
@v1v v1v merged commit 5769e7f into elastic:main Apr 25, 2022
@v1v v1v deleted the feature/labels-cloud branch April 25, 2022 08:08
mergify bot pushed a commit that referenced this pull request Apr 25, 2022
(cherry picked from commit 5769e7f)
mergify bot pushed a commit that referenced this pull request Apr 25, 2022
(cherry picked from commit 5769e7f)
mergify bot pushed a commit that referenced this pull request Apr 25, 2022
(cherry picked from commit 5769e7f)

# Conflicts:
#	.ci/aws-instances-reaper.groovy
mdelapenya added a commit that referenced this pull request Apr 26, 2022
* Add metadata tags (#2407)

(cherry picked from commit 5769e7f)

# Conflicts:
#	.ci/aws-instances-reaper.groovy

* fix: resolve conflicts

Co-authored-by: Victor Martinez <[email protected]>
Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit that referenced this pull request Apr 26, 2022
(cherry picked from commit 5769e7f)

Co-authored-by: Victor Martinez <[email protected]>
Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit that referenced this pull request Apr 26, 2022
(cherry picked from commit 5769e7f)

Co-authored-by: Victor Martinez <[email protected]>
Co-authored-by: Manuel de la Peña <[email protected]>
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Apr 26, 2022
* main:
  fix: use empty string instead of null for ES' network.host (elastic#2429)
  ci: transform branch to allow the Google Labels naming (elastic#2419)
  Add metadata tags (elastic#2407)
  Add link to the users used to SSH into the Cloud EC2s (elastic#2392)
  fix: add EOF (elastic#2387)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automation backport-v7.17.0 Automated backport with mergify backport-v8.1.0 Automated backport with mergify backport-v8.2.0 Automated backport with mergify backport-v8.3.0 Automated backport with mergify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants