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

Fix bug with trailing slashes in xdmod_host. #24

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

RodneyCodess
Copy link

@RodneyCodess RodneyCodess commented Jun 3, 2024

Description

This PR fixes a bug when trailing slashes are in the xdmod_host parameter. For an example:

with DataWarehouse('https://xdmod.access-ci.org/') as dw:
    dw.get_raw_data(
        duration=('2024-01-01', '2024-01-01'),
        realm='Jobs',
    )

Because this 'https://xdmod.access-ci.org/' has a trailing slash that results in a
RuntimeError: Error 404: No route found for "GET //rest/v1/warehouse/export/realms".

Tests performed

This PR adds an automated integration test that runs every method in the API with 'https://xdmod.access-ci.org/'. In order to make that work this PR also adds the ability to pass in an invalid URL to dw_methods.

This PR also updates the sample values used when testing, specifically 'duration' so that fewer raw data are requested and 'show_progress' so that the output is easier to read.

This PR also fixes multiple style issues and reduces duplicated code.

Types of changes

  • Refactoring / documentation update (non-breaking change which does not change functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • CHANGELOG.md has been updated
  • The milestone is set correctly on the pull request
  • The appropriate labels have been added to the pull request
  • Running the automated tests (see docs/developing.md) produces no errors
  • Updates have been made to the xdmod-notebooks repository as necessary, and the notebooks all run successfully

@aaronweeden aaronweeden added this to the 1.1.0 milestone Jun 3, 2024
@aaronweeden aaronweeden added the bug Something isn't working label Jun 3, 2024
@aaronweeden aaronweeden removed this from the 1.1.0 milestone Jun 3, 2024
@aaronweeden aaronweeden changed the title Fix multiple slash problem Fix bug with trailing slashes in xdmod_host. Jun 4, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
@aaronweeden aaronweeden added this to the 1.0.1 milestone Jun 5, 2024
@aaronweeden aaronweeden merged commit 82edbdc into ubccr:main Jun 5, 2024
1 check passed
@RodneyCodess RodneyCodess deleted the Slash_fix branch June 5, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants