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

wrongly set mountpoint in qiita.data_directory when different roots in settings #3248

Open
antgonza opened this issue Feb 10, 2023 · 0 comments

Comments

@antgonza
Copy link
Member

The original code, see below, assumes that qc.working_dir and qc.base_data_dir have the same "root", so when they don't it creates a "weird" base. This happened in qiita-rc: ('/a/b/working_directory/', '/c/d/'), repestibly.

            # When creating a type is expected that a new mountpoint is created
            # for that type, note that we are going to check if there is an
            # extra path for the mountpoint, which is useful for the test
            # environment
            qc = qiita_config
            mp = relpath(qc.working_dir, qc.base_data_dir).replace(
                'working_dir', '')
            mp = mp + name if mp != '/' and mp != '' else name
            sql = """INSERT INTO qiita.data_directory
                        (data_type, mountpoint, subdirectory, active)
                        VALUES (%s, %s, %s, %s)"""
            qdb.sql_connection.TRN.add(sql, [name, mp, True, True])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant