Skip to content

Remove some feature flags #7846

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

Merged
merged 4 commits into from
Jan 20, 2021
Merged

Remove some feature flags #7846

merged 4 commits into from
Jan 20, 2021

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Jan 19, 2021

These features have been enabled on a large sample for a while now, and I also enabled them in all projects since last last week (~12 days ago).

The only problem found was with Sphinx itself #7816, but iit's all good now.
We use the subscription to decide if page views should be enabled in .com.

@stsewd stsewd changed the title Remove feature flags Remove some feature flags Jan 19, 2021
@stsewd stsewd force-pushed the remove-feature-flags branch from 717fd04 to dd0db1a Compare January 19, 2021 23:25
@stsewd stsewd requested a review from a team January 19, 2021 23:38
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Comment on lines 1132 to +1134
def _is_enabled(self, project):
"""Should we show traffic analytics for this project?"""
return project.has_feature(Feature.STORE_PAGEVIEWS)
return True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method overwritten in commercial taking into account the plan?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

@stsewd stsewd merged commit e5bd237 into master Jan 20, 2021
@stsewd stsewd deleted the remove-feature-flags branch January 20, 2021 14:29
@lpsinger
Copy link

lpsinger commented Feb 4, 2021

In this PR, the change from calling sphinx-build to calling python -m sphinx build broke my project: https://readthedocs.org/projects/gwcelery/builds/

@stsewd
Copy link
Member Author

stsewd commented Feb 5, 2021

@lpsinger from the build log, this looks like more a problem with your dependencies.

ModuleNotFoundError: No module named 'ligo'

Or are you able to replicate this locally in a clean environment? Like changing from calling sphinx-build to python -m sphinx

@lpsinger
Copy link

lpsinger commented Feb 5, 2021

Yes, I can replicate this in a clean environment. Changing sphinx-build to python -m sphinx breaks my build.

I narrowed it down to this by diffing the last successful build log and the first unsuccessful one.

@humitos
Copy link
Member

humitos commented Feb 8, 2021

I think it's because it's reading ligo package from the folder ligo/ even without being installed when using sphinx-build.

You need to install your project on Read the Docs using https://docs.readthedocs.io/en/stable/config-file/v2.html#python

python:
  install:
    - method: pip
      path: .

@stsewd
Copy link
Member Author

stsewd commented Feb 8, 2021

you can also inject the absolute path in sys.path https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc

@lpsinger
Copy link

lpsinger commented Feb 8, 2021

You need to install your project on Read the Docs using https://docs.readthedocs.io/en/stable/config-file/v2.html#python

Why do I need to install my project? I didn't need to install it before. I was mocking up all of the dependencies that are not actually used for generating docs and figures.

@stsewd
Copy link
Member Author

stsewd commented Feb 8, 2021

I think this is a problem with the implicit cwd

https://git.ligo.org/emfollow/gwcelery/-/blob/master/doc/conf.py#L26

you should use _file_ to resolve the absolute path to the current file instead of depending on the cwd.

lpsinger added a commit to lpsinger/gwcelery that referenced this pull request Feb 25, 2021
@lpsinger
Copy link

I think this is a problem with the implicit cwd

https://git.ligo.org/emfollow/gwcelery/-/blob/master/doc/conf.py#L26

you should use _file_ to resolve the absolute path to the current file instead of depending on the cwd.

That work. Thanks!

@lpsinger
Copy link

Wait, no, that didn't work. Same error message as before.

@lpsinger
Copy link

I've been staring at this all day, and I can't figure out how to work around it. Is it possible to revert this please? Otherwise we will have to stop using Readthedocs for hosting our documentation.

lpsinger added a commit to lpsinger/gwcelery that referenced this pull request Feb 28, 2021
Readthedocs has changed how it invokes sphinx. See
readthedocs/readthedocs.org#7846
@lpsinger
Copy link

Never mind! I found what was wrong: only my long term memory. I forgot that I had put in place some code to detect whether my modules were being imported under Sphinx, which I had failed to update... https://git.ligo.org/emfollow/gwcelery/-/commit/c9ab81b5d33718df7e8991752938e009e643a8f0

@humitos
Copy link
Member

humitos commented Mar 1, 2021

@lpsinger I'm happy that you figured it out!

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

Successfully merging this pull request may close these issues.

3 participants