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

fix(6023): replace list with items #6437

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kaanyalti
Copy link
Contributor

@kaanyalti kaanyalti commented Dec 25, 2024

  • Bug

What does this PR do?

Replaces list with items from from kibanaFetchToken as the list is deprecated in the api response and will be removed.

Why is it important?

The list in the api response is going to be removed in favor of item

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 added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

There shouldn't be any user impact

How to test this PR locally

  • Deploy ESS
  • Build the agent by running the following command
SNAPSHOT=true PLATFORMS="linux/arm64" PACKAGES="docker" EXTERNAL=true mage -v package
  • Then get the image id for any of the created elastic-agent images and run the following command
docker run \
  --env FLEET_ENROLL=1 \
  --env KIBANA_HOST=<KIBANA HOST> \
  --env KIBANA_USERNAME=<KIBANA USER NAME> \
  --env KIBANA_PASSWORD=<KIBANA PASSWORD> \
  --env FLEET_TOKEN_POLICY_NAME=<POLICY NAME> \
  --env FLEET_URL=<FLEET URL> \
  --rm <IMAGE ID>
  • Validate that the agent is able to enroll

Related issues

Copy link
Contributor

mergify bot commented Dec 25, 2024

This pull request does not have a backport label. Could you fix it @kaanyalti? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Dec 25, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Dec 25, 2024
@kaanyalti kaanyalti marked this pull request as ready for review December 27, 2024 00:32
@kaanyalti kaanyalti requested a review from a team as a code owner December 27, 2024 00:32
@kaanyalti kaanyalti force-pushed the fix/6023-remove_deprecated_list_property_in_favor_of_items branch from 40d8fbc to 3d55a2b Compare December 27, 2024 00:36
Items []testKibanaApiKey `json:"items"`
}

// TODO: Remove test after list deprecation is complete
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like to add an issue link to remove the link from the kibana api, if anyone knows of such an issue please comment here.

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fleet deprecated list property when retrieving enrollment api keys
1 participant