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

Disallow updating regexes that have set number 0 and type HOST_REGEXP #5297

Merged
merged 9 commits into from
Dec 8, 2020

Conversation

srijeet0406
Copy link
Contributor

@srijeet0406 srijeet0406 commented Nov 17, 2020

What does this PR (Pull Request) do?

Which Traffic Control components are affected by this PR?

  • CDN in a Box
  • Traffic Ops

What is the best way to verify this PR?

Make sure all the unit/ API tests pass
Go to Traffic Portal
Try modifying a regex for any DS
This should be possible as long as the following two conditions are met:
1.) The regex in question does not have set number 0 and type HOST_REGEXP
2.) No other regex exists with the set number that you're trying to update the current regex to

If this is a bug fix, what versions of Traffic Control are affected?

  • master

The following criteria are ALL met by this PR

  • This PR includes tests
  • I have explained why documentation is unnecessary
  • This PR includes an update to CHANGELOG.md
  • This PR includes any and all required license headers
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@srijeet0406 srijeet0406 marked this pull request as draft November 18, 2020 00:04
@srijeet0406 srijeet0406 marked this pull request as ready for review November 18, 2020 16:47
@mitchell852
Copy link
Member

mitchell852 commented Nov 20, 2020

fyi the text in the description needs to look like this:

This PR fixes #2805 and fixes #5296

to autoclose both tickets.

@mitchell852 mitchell852 added Traffic Ops related to Traffic Ops bug something isn't working as intended labels Nov 20, 2020
Copy link
Member

@mitchell852 mitchell852 left a comment

Choose a reason for hiding this comment

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

I found a bug. I was able to change the regex type of the position 0 regex from HOST_REGEXP to:

image

@srijeet0406
Copy link
Contributor Author

@mitchell852 Fixed in the latest commit

Copy link
Member

@mitchell852 mitchell852 left a comment

Choose a reason for hiding this comment

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

LGTM!

@mitchell852 mitchell852 added the high impact impacts the basic function, deployment, or operation of a CDN label Dec 8, 2020
@mitchell852 mitchell852 merged commit aafb72c into apache:master Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended high impact impacts the basic function, deployment, or operation of a CDN Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot update any regex in Traffic Ops/ Traffic Portal
2 participants