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

fix: update flags for the enroll command#804

Merged
mdelapenya merged 2 commits intoelastic:masterfrom
mdelapenya:803-enroll-flags
Feb 23, 2021
Merged

fix: update flags for the enroll command#804
mdelapenya merged 2 commits intoelastic:masterfrom
mdelapenya:803-enroll-flags

Conversation

@mdelapenya
Copy link
Copy Markdown
Contributor

@mdelapenya mdelapenya commented Feb 23, 2021

What does this PR do?

This PR appends the --url= flag to the Kibana URL and the --enrollment-token= flag to the API token arguments when enrolling an agent using Fleet mode.

As it's used in three different places, we are extracting the array representing the arguments to a builder method (it requires a token), so that further updates will affect only one place.

Why is it important?

The enrollment command changed in elastic/beats#24155

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the Unit tests for the CLI, and they are passing locally
  • I have run the End-2-End tests for the suite I'm working on, and they are passing locally
  • I have noticed new Go dependencies (run make notice in the proper directory)

Author's checklist

  • @michalpristas does the install command call need to be updated?
  • For install command, Kibana flag uses --kibana-url, while for the enroll command uses --url. Is this inconsistency on purpose?

How to test this PR locally

SUITE="fleet" TAGS="fleet_mode_agent && install" TIMEOUT_FACTOR=3 LOG_LEVEL=TRACE DEVELOPER_MODE=true ELASTIC_APM_ACTIVE=false make -C e2e functional-test

Related issues

@mdelapenya mdelapenya self-assigned this Feb 23, 2021
@mdelapenya mdelapenya requested review from a team and michalpristas February 23, 2021 12:20
@mdelapenya mdelapenya marked this pull request as ready for review February 23, 2021 12:21
Copy link
Copy Markdown
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

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

seems ok

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Feb 23, 2021

💚 Build Succeeded

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

Expand to view the summary

Build stats

  • Build Cause: mdelapenya commented: jenkins run the tests please

  • Start Time: 2021-02-23T14:08:01.845+0000

  • Duration: 24 min 59 sec

  • Commit: a2e3b0c

Test stats 🧪

Test Results
Failed 0
Passed 117
Skipped 0
Total 117

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 117
Skipped 0
Total 117

@mdelapenya
Copy link
Copy Markdown
Contributor Author

jenkins run the tests please

@mdelapenya
Copy link
Copy Markdown
Contributor Author

I experimented some inconsistencies in the artifactory: https://artifacts-api.elastic.co/v1/search/8.0.0-SNAPSHOT/elastic-agent?x-elastic-no-kpi=true was not retrieving artifacts at the moment the CI requested the resource. Now it's available again

@mdelapenya mdelapenya merged commit 5925335 into elastic:master Feb 23, 2021
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Feb 23, 2021
* fix: update enroll command flags

* chore: extract flags generation to a method
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Feb 23, 2021
* fix: update enroll command flags

* chore: extract flags generation to a method
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Feb 23, 2021
* fix: update enroll command flags

* chore: extract flags generation to a method
mdelapenya added a commit to mdelapenya/e2e-testing that referenced this pull request Feb 23, 2021
* fix: update enroll command flags

* chore: extract flags generation to a method
mdelapenya added a commit that referenced this pull request Feb 23, 2021
* fix: update enroll command flags

* chore: extract flags generation to a method
mdelapenya added a commit that referenced this pull request Feb 23, 2021
* fix: update enroll command flags

* chore: extract flags generation to a method
@mdelapenya mdelapenya deleted the 803-enroll-flags branch March 8, 2021 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update enrollment command

4 participants