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

[BUG] Domain Qualificiation failing #1599

Closed
roleyfoley opened this issue Mar 26, 2021 · 3 comments · Fixed by #1695
Closed

[BUG] Domain Qualificiation failing #1599

roleyfoley opened this issue Mar 26, 2021 · 3 comments · Fixed by #1695
Assignees
Labels

Comments

@roleyfoley
Copy link
Contributor

Current Behaviour

When processing a component which uses domain names and one of the domains have qualification enabled this appears to be ignored and the unqualified domains is returned

Expected Behaviour

The domain that has been configured through qualification should be returned

Possible Solution

Steps to Reproduce

  1. Create a domain structure like this
        "parks" : {
            "Stem" : "parks.exmaple.org"
        },
        "cp1" : {
            "Parent" : "parks",
            "Qualifiers" : {
                "prod" : {
                    "Name" : ""
                }
            }
        },
        "env" : {
            "Parent" : "cp1",
            "Name" : "np",
            "Qualifiers" : {
                "prod" : {
                    "Name" : ""
                },
                "preprod" : {
                    "Name" : ""
                }
            }
        },
        "ecommerce" : {
            "Parent" : "env",
            "Qualifiers" : {
                "prod" : {
                    "Name" : ""
                }
            }
        },
  1. Run a deployment for a component in the prod environment which uses the ecommerce domain name

The expected result is parks.exmaple.org the current result is ecommerce.np.cp1.parks.example.org

@roleyfoley roleyfoley added the bug label Mar 26, 2021
@roleyfoley roleyfoley self-assigned this Mar 26, 2021
@roleyfoley
Copy link
Contributor Author

Workaround in place to disable qualification on input processing

With @ml019 to fix the issue that both name and Id are used in the current qualification process but don't appear to be followed in the current input processing

@roleyfoley
Copy link
Contributor Author

roleyfoley commented Mar 30, 2021

PR #1600 is the workaround to revert qualification

@roleyfoley roleyfoley assigned ml019 and unassigned roleyfoley Mar 30, 2021
@roleyfoley
Copy link
Contributor Author

With @ml019
Need to tweak the way layers are loaded to get the Id and name values to then perform qualification on

ml019 added a commit to ml019/engine that referenced this issue May 30, 2021
Re-enable qualification

Fixes hamlet-io#1599

Reverses PR hamlet-io#1600

For backwards compatability, ensure input qualification checks for
ids and names of layers. Best practice should be to encourage the use of
names and long form qualification but a number of existing cmdbs use
ids and short form qualifiers.

This PR also adds some longer form alternatives for the `info` and `warn`
macros, as well as an alternative `fatal` macro which always stops
processing.

A followup PR will remove the use of specific checks for qualification
via the segmentQualifiers global variable.
ml019 added a commit to ml019/engine that referenced this issue Jun 9, 2021
Re-enable qualification

Fixes hamlet-io#1599

Reverses PR hamlet-io#1600

For backwards compatability, ensure input qualification checks for
ids and names of layers. Best practice should be to encourage the use of
names and long form qualification but a number of existing cmdbs use
ids and short form qualifiers.

This PR also adds some longer form alternatives for the `info` and `warn`
macros, as well as an alternative `fatal` macro which always stops
processing.

A followup PR will remove the use of specific checks for qualification
via the segmentQualifiers global variable.
roleyfoley pushed a commit that referenced this issue Jun 10, 2021
* feat: input qualification

Re-enable qualification

Fixes #1599

Reverses PR #1600

For backwards compatability, ensure input qualification checks for
ids and names of layers. Best practice should be to encourage the use of
names and long form qualification but a number of existing cmdbs use
ids and short form qualifiers.

This PR also adds some longer form alternatives for the `info` and `warn`
macros, as well as an alternative `fatal` macro which always stops
processing.

A followup PR will remove the use of specific checks for qualification
via the segmentQualifiers global variable.

* refactor: Capture qualification outcomes

Add an annotated copy of the state to the inputState showing which
qualifiers were or weren't applied.

This is intended to form the basis of tooling to assist users determine
the effect of the provided qualifiers where the results produced are
unexpected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants