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) Google cloud storage retriever only gets the file in the first attempt #310

Closed
jferrl opened this issue Aug 20, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers p1 High priority

Comments

@jferrl
Copy link
Contributor

jferrl commented Aug 20, 2022

Observed behavior

It was not possible to use an instance of gcstorageretriever.Retriever{} since it is only able to get the file on the initial bootstrap of go-feature-flag instance. After feature flag client is up and running, the internal flags cache is no longer updated when gcstorageretriever is used.

Expected Behavior

gcstorageretriever.Retriever{} should be able to the flags when the file stored in google cloud storage changes.

Steps to reproduce

Using the following code(just an exaple):

ffcli, err := ffclient.New(ffclient.Config{
  PollingInterval: 3 * time.Second,
  Retriever: &gcstorageretriever.Retriever{
      Options: []option.ClientOption{option.WithoutAuthentication()},
  Bucket: "my-bucket",
  Object: "flags.yaml",
  }
})
defer ffcli.Close()

After the bootstrap, we are able to get current flags data, for example using the following func:

flags := ffcli.AllFlagsState(user)

But, if the file is updated in google cloud storage, go-feature-flag is not able to retrieve the current config.

Moreover, We can see several log traces that refer to the following line of code(saying file not found)

fmt.Errorf("unable to read from GCP Object %s in Bucket %s, error: %s", retriever.Bucket, retriever.Object, err)
@jferrl jferrl added bug Something isn't working needs-triage A priority should be added to the issue labels Aug 20, 2022
@thomaspoignant
Copy link
Owner

@jferrl thanks for reporting this issue.

I am sorry that it is not working as expected 😓
I am currently on PTO so I am not able to check this before next week.

In the mean time if you want to work on resolving this issue it will be much appreciated.

@thomaspoignant thomaspoignant added p1 High priority good first issue Good for newcomers and removed needs-triage A priority should be added to the issue labels Aug 20, 2022
@jferrl
Copy link
Contributor Author

jferrl commented Aug 20, 2022

@jferrl thanks for reporting this issue.

I am sorry that it is not working as expected 😓 I am currently on PTO so I am not able to check this before next week.

In the mean time if you want to work on resolving this issue it will be much appreciated.

No worries! I'm working on the fix!
Thanks! 😄

@thomaspoignant
Copy link
Owner

thomaspoignant commented Aug 31, 2022

Resolved by #311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers p1 High priority
Projects
None yet
Development

No branches or pull requests

2 participants