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

Bug: Service config variables not updated when variables are updated #178

Open
ociappara opened this issue Jan 19, 2024 · 3 comments
Open
Labels
accepted This issue was accepted, we will work on this at some point assess We still haven't decided if this will be worked on or not bug Something isn't working

Comments

@ociappara
Copy link

  1. Create a service with below sample config variables
config:
  client_id: "abc"
  client_secret: "ThisIsMySecret"

  1. Add service to Assemblyline
  2. Update service config variables like below;
config:
  client_id: "def"
  client_secret: "NoLongerASecret"
  1. Add the new service to Assemblyline, without deleting the previous version
  2. Go to the service and pick the new service from the dropdown list
  3. New config should be available, however, old variables are still present
  4. Same if you add new configs.
@ociappara ociappara added assess We still haven't decided if this will be worked on or not bug Something isn't working labels Jan 19, 2024
@cccs-sgaron
Copy link
Collaborator

I'm not 100% sure if this is an issue or not and I think I'm going to need just a little more info. For starter I can explain you how the service diffing works so you can tell me if you see things happening differently.

When you register a service to AL, its default config get saved in the DB as SERVICENAME_vVERSION so for each service version that where ever installed on your instance, you get the default config for that service. But then we have a service_delta index which is the changes that you are making to the default config. The service delta changes completely override whatever the service default where.

Here's an exemple:

Service_v4.4.0,1 has the following config:

  client_id: 'abc'
  client_secret: "ThisIsMySecret"

Service_v4.4.0.2 has the following config:

config:
  client_id: 'def'
  client_secret: "NoLongerASecret"

If the service delta is empty (i.e. you did not change the config block from the UI, you will get the proper default for each service. If you changed the client_secret in the UI to "ThisIsAnUpdatedSecret", no matter which of the two service version you pick (4.4.0.1 or 4.4.0.2) the client_secret will always be "ThisIsAnUpdatedSecret".

Is this what you are observing right now in your system?

@ociappara
Copy link
Author

No, if I do not change the values in the UI they are still not updated, unless I delete the old service and install the new one.

So I install Service_v4.4.0.1 I don't change anything on the UI, I change the service manifest for Service_v4.4.0.2 and add that to the UI again, the values do not change unless I delete Service_v4.4.0.1 and add the service manifest again to install Service_v4.4.0.2.

This is also true for submission_params, If I add a new submission_params they are not changed on the UI until I delete the service and add it back in again.

Note: I only observed this happening when we paste in the service manifest, not when pressing the update button.

@cccs-sgaron
Copy link
Collaborator

Ok we can check the UI service manifest pasting path.

@cccs-sgaron cccs-sgaron added the accepted This issue was accepted, we will work on this at some point label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted This issue was accepted, we will work on this at some point assess We still haven't decided if this will be worked on or not bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants