Permission Denied Error when Upgrading Facebook Marketing Connector

Summary

The user is facing a permission denied error when trying to upgrade the Facebook Marketing connector to the latest version. The error occurs when the job pod attempts to create the ‘source_config.json’ file in the local filesystem. The issue is suspected to be related to the securityContext of the job pods not allowing write access to the internal filesystem.


Question

Hey all! I’m trying to upgrade the Facebook Marketing connector to the latest version (v3.3.15) and I’m having a problem with the source check.

Apparently, the new version introduces a feature to persist the source_config.json in the local filesystem, during the check process. However, as I run Airbyte OSS on Kubernetes (EKS), I’m getting a permission denied when the job pod tries to create this file:

    with open(config_path, "w") as fh:
  File "/usr/local/lib/python3.10/site-packages/airbyte_cdk/connector.py", line 60, in write_config
    source.write_config(migrated_config, config_path)
  File "/airbyte/integration_code/source_facebook_marketing/config_migrations.py", line 186, in _modify_and_save
    cls._modify_and_save(config_path, source, config),
  File "/airbyte/integration_code/source_facebook_marketing/config_migrations.py", line 160, in migrate
    MigrateSecretsPathInConnector.migrate(sys.argv[1:], source)
  File "/airbyte/integration_code/source_facebook_marketing/run.py", line 18, in run
    run()
  File "/airbyte/integration_code/main.py", line 9, in <module>
Traceback (most recent call last):```
I suspect it has to do with the securityContext of the job pods, not allowing for write access to the internal filesystem. However, I don't see how we can update the security context of the job/check pods in the charts, only annotations, labels, etc. :<https://github.com/airbytehq/airbyte-platform/blob/4aa1fd563b22802d268febfc5f61bbc928c40b33/charts/airbyte/values.yaml#L136-L170>

Any ideas on how to solve this? Its blocking us from upgrading to the latest version :confused:

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1724924163108329) if you want 
to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["facebook-marketing-connector", "upgrade", "permission-denied", "source-config.json", "securitycontext", "kubernetes", "eks"]
</sub>