question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API "PUT" method for variables endpoint fails to update variables.yml

See original GitHub issue

Expected behaviour: The variables.yml file to be updated to reflect the json payload sent via curl.

Actual behaviour: No updates are made.

Steps to reproduce:

  • Step 1: Create variables.yml file with only the following single line:

a:b

  • Step 2: From terminal, execute: curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Token TOKEN_REDACTED' -d '{"a":"c"}' 'http://localhost:5050/api/variables/'

  • Step 3: Observe output as: a:b

Config:

variables: /path/to/flexget/variables.yml
web_server: yes
templates:
  dl:
    deluge: yes
....
...
...

Variables:

a: b

Log:

No information was added to the log after the API call.

Additional information:

  • FlexGet version: 2.21.25
  • Python version: 3.7.3
  • Installation method: pip3
  • Using daemon (yes/no): yes
  • OS and version: Kubuntu 19.04
  • Link to crash log: null

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
gazpachokingcommented, Oct 25, 2019

I see variables as a single object

I see them as separate… variables. 😉

I still like the path idea, but I also like keeping it simple unless we have some demand for it, so I’m good with your solution.

0reactions
liiightcommented, Oct 26, 2019

What I meant is since variables are not bound to any structure, I think the user should have the responsibility of managing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Impossible to update Variable from Variable Group (Library)
az pipelines variable-group variable update --group-id --name [--detect {false, ... Another option is to use REST API and this endpoint: PUT ...
Read more >
Project-level CI/CD variables API - GitLab Docs
Update a variable. Update a project's variable. If there are multiple variables with the same key, use filter to select the correct environment_scope...
Read more >
Understanding Azure DevOps Variables [Complete Guide]
Learn just about every concept variables in this article and apply this knowledge to your Azure DevOps Pipelines to automate all the things....
Read more >
Setting up stage variables for a REST API deployment
Stage variables are name-value pairs that you can define as configuration attributes associated with a deployment stage of a REST API.
Read more >
Set secret variables - Azure Pipelines | Microsoft Learn
To set secrets in the web interface, follow these steps: Go to the Pipelines page, select the appropriate pipeline, and then select Edit....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found