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

Temporarily disable 0.5 since it's not collecting network_events #806

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

hellais
Copy link
Member

@hellais hellais commented Feb 21, 2024

While we work towards releasing a probe-engine release that addresses: ooni/probe#2674, we should disable 0.5 for all users.

@hellais
Copy link
Member Author

hellais commented Feb 22, 2024

I have validated this works as intended on backend-hel, so I am going to proceed with merging it and deploying into prod.

This is the python script I used to validate it's working:

import requests
SHOULD_HAVE_FLAG_IP = '1.34.1.1'
SHOULD_NOT_HAVE_FLAG_IP = '1.1.1.1'

def get_check_in_features(ip, backend_addr):
    req_json = {
        'probe_cc': 'IT',
        'probe_asn': 'AS8220',
        'platform': 'desktop',
        'software_name': 'notooniprobe',
        'software_version': '1.0.0',
        'on_wifi': False,
        'charging': False,
        'run_type': 'manual',
        'web_connectivity': {
            'category_codes': []
        }
    }
    
    r = requests.post(
        backend_addr, 
        headers={
            "X-Forwarded-For": ip
        }, 
        json=req_json
    )
    j = r.json()
    return j['conf']['features']

# Currently deployed instance behaves differently depending on the octet
assert get_check_in_features(
    SHOULD_NOT_HAVE_FLAG_IP, "https://backend-fsn.ooni.org/api/v1/check-in"
).get('webconnectivity_0.5', False) == False

assert get_check_in_features(
    SHOULD_HAVE_FLAG_IP, "https://backend-fsn.ooni.org/api/v1/check-in"
).get('webconnectivity_0.5', False) == True

# With the fix they should both be set to false
assert get_check_in_features(
    SHOULD_NOT_HAVE_FLAG_IP, "https://backend-hel.ooni.org/api/v1/check-in"
).get('webconnectivity_0.5', False) == False

assert get_check_in_features(
    SHOULD_HAVE_FLAG_IP, "https://backend-hel.ooni.org/api/v1/check-in"
).get('webconnectivity_0.5', False) == False

@hellais hellais merged commit b0677f3 into master Feb 22, 2024
3 checks passed
@hellais hellais deleted the disable-0.5 branch February 22, 2024 13:47
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.

1 participant