-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Policy fields disappearing during upgrade process with conflict resolution #131251
Comments
Pinging @elastic/fleet (Team:Fleet) |
@endorama - I'm taking a look at this today, and I'm having trouble upgrading from GCP 1.6.1 to 2.0.0 in the Integrations UI because of some kind of saved objects error.
I unzipped the attached Any idea what I might be doing wrong here? |
We investigate it together and the error is related to a dashboard, I tried with a fresh install and starting from GCP 1.5.0 I did not see the mentioned error. (I also updated the issue reproduction steps locking version to 1.5.0 to avoid this reproduction error in the future, thanks @kpollich for reporting the error, I should have specified the version). Update: the dasbhoard has been added in 1.7.0 but a map named |
I wound up needing to run the attached
You should see a git diff as such in your
This will place the built version of the package in
# From the `integrations` repo
$ cp -r build/integrations/gcp/2.0.0/ ../package-registry/build/package-storage/packages/gcp/2.0.0
xpack.fleet.registryUrl: http://localhost:8080
Should be able to install the GCP package as normal. I did only try this with @endorama's recommendation of installing 1.5.0 first to resolve the potential issue with the dashboard/map, but I was able to successfully install 2.0.0 after doing so. The map issue may not even be a persistent problem. The main issue was I just missed the |
Think I've got a fix for this (see below screen recording). Somewhat fortunately, I believe this is a UI-only issue - our backend merge/upgrade logic works as expected, we're just not displaying the variable fields properly in the UI. Screen.Recording.2022-05-11.at.4.02.17.PM.movGetting a PR together now for the change. |
Display package-level variables even if they aren't defined on the existing package policy during an upgrade, honoring default values for all variables if they exist. Fixes elastic#131251
* Fix missing package-level vars in GCP policy editor Display package-level variables even if they aren't defined on the existing package policy during an upgrade, honoring default values for all variables if they exist. Fixes #131251 * Fix not persisting default values for new variables * Fix tests * Address PR feedback + update tests
…132068) * Fix missing package-level vars in GCP policy editor Display package-level variables even if they aren't defined on the existing package policy during an upgrade, honoring default values for all variables if they exist. Fixes elastic#131251 * Fix not persisting default values for new variables * Fix tests * Address PR feedback + update tests (cherry picked from commit 5fff510) # Conflicts: # x-pack/plugins/fleet/common/services/validate_package_policy.test.ts # x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.test.tsx
…132068) (#136289) * [Fleet] Fix missing package-level vars in GCP policy editor (#132068) * Fix missing package-level vars in GCP policy editor Display package-level variables even if they aren't defined on the existing package policy during an upgrade, honoring default values for all variables if they exist. Fixes #131251 * Fix not persisting default values for new variables * Fix tests * Address PR feedback + update tests (cherry picked from commit 5fff510) # Conflicts: # x-pack/plugins/fleet/common/services/validate_package_policy.test.ts # x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_define_package_policy.test.tsx * Remove incorrect test * Remove define package policy tests from 7.17.x Co-authored-by: Kibana Machine <[email protected]>
Kibana version: 8.1.0
Elasticsearch version: 8.1.0
Server OS version: NA
Browser version: Firefox 99
Browser OS version: NA
Original install method (e.g. download page, yum, from source, etc.):
elastic-package stack up
Describe the bug:
Some variables "disappear" from UI when using the conflict resolution UI to upgrade an Agent policy to a new version.
The same variables are not present anymore in the Agent policy.
The same variables are not shown anymore in the Agent policy editor.
Steps to reproduce:
Project ID
,Credentials File
andCredentials JSON
variables have disappeared and are not present, they should be at package level.Project ID
,Credentials File
andCredentials JSON
variables are not present anymore (this is confirmed also when looking at the policy YAML:project_id
isnull
,credentials_file
andcredentials_json
are not present)Expected behavior: Fields are shown in conflict resolution UI and in policy editor.
Screenshots (if relevant):
Any additional context:
This bug was identified in elastic/integrations#2987, with integrations developer oriented reproduction steps.
Issue #112272 is linked, as some discussion around this issue happened there.
Video showcasing the bug: https://user-images.githubusercontent.com/526307/165972437-b5c514bf-756f-4319-8ab0-fe5ba71c2b59.mp4
Agent Policy before upgrade: Agent policy before upgrade.yml.txt
Agent Policy after upgrade: Agent policy after upgrade.yml.txt
GCP v2.0.0 (unreleased) package: gcp-v2.0.0.zip
The text was updated successfully, but these errors were encountered: