JIRA: RHELWF-389
Do you really need to check .yaml? Shouldn't this be the default of the url? The next 'if' branch makes totally sense, but I'm not sure about this one.
.yaml
Instead of these repeated lines you could consider using parametrized if possible.
parametrized
rebased onto fb3820679514b2cd2e519e57fab4353eae7b4312
rebased onto 827553596a63505dabf8cf5229bb51eeccb3afb6
The URL may not end with the file suffix. Can you instead add multiple URL templates to configuration (fallback URLs)?
rebased onto 8d689fede00bd9af6dee20d8dc36560652399941
Updated
+1
Commenting again (sorry, I was logged in as factory2jenkins before): The URL may not end with the file suffix. Can you instead add multiple URL templates to configuration (fallback URLs)?
It was added too, not instead of, but both features. I.e. URL template could now be a list.
Commenting again (sorry, I was logged in as factory2jenkins before): The URL may not end with the file suffix. Can you instead add multiple URL templates to configuration (fallback URLs)? It was added too, not instead of, but both features. I.e. URL template could now be a list.
What I meant is that the URL template in configuration may not end with yaml/yml so replacing the suffix won't work (e.g. dist-git URL ends with /plain/gating.yaml?id={rev}).
yaml
yml
/plain/gating.yaml?id={rev}
I would like to see this as a configuration---fallback URLs---instead of having this hardcoded (e.g. multiple dist-git URLs .../plain/gating.yaml?id={rev}, .../plain/gating.yml?id={rev}).
.../plain/gating.yaml?id={rev}
.../plain/gating.yml?id={rev}
Commenting again (sorry, I was logged in as factory2jenkins before): The URL may not end with the file suffix. Can you instead add multiple URL templates to configuration (fallback URLs)? It was added too, not instead of, but both features. I.e. URL template could now be a list. What I meant is that the URL template in configuration may not end with yaml/yml so replacing the suffix won't work (e.g. dist-git URL ends with /plain/gating.yaml?id={rev}). I would like to see this as a configuration---fallback URLs---instead of having this hardcoded (e.g. multiple dist-git URLs .../plain/gating.yaml?id={rev}, .../plain/gating.yml?id={rev}).
URLs in REMOTE_RULE_POLICIES in configuration can now be lists, so you can specify as many URLs as you want. No matter if they'll have an extension or not. Remote rules are determined by the first successful query.
Then let's change the configuration instead of adding new code.
URLs in REMOTE_RULE_POLICIES in configuration can now be lists, so you can specify as many URLs as you want. No matter if they'll have an extension or not. Remote rules are determined by the first successful query. Then let's change the configuration instead of adding new code.
But it's supported after this change :D
URLs in REMOTE_RULE_POLICIES in configuration can now be lists, so you can specify as many URLs as you want. No matter if they'll have an extension or not. Remote rules are determined by the first successful query. Then let's change the configuration instead of adding new code. But it's supported after this change :D
Please remove the unnecessary suffix magic - the yaml to/from yml transformations.
URLs in REMOTE_RULE_POLICIES in configuration can now be lists, so you can specify as many URLs as you want. No matter if they'll have an extension or not. Remote rules are determined by the first successful query. Then let's change the configuration instead of adding new code. But it's supported after this change :D Please remove the unnecessary suffix magic - the yaml to/from yml transformations.
Any reasons why it should be removed? I think it's useful in case when someone misspells the suffix in the repository, so there's no need to change the configuration just to remember small mistypes.
Please remove the unnecessary suffix magic - the yaml to/from yml transformations. Any reasons why it should be removed? I think it's useful in case when someone misspells the suffix in the repository, so there's no need to change the configuration just to remember small mistypes.
Why add additional code when it can be handled by the new configuration?
DIST_GIT_URL_TEMPLATE = [ "http://dist-git.example.com/cgit/{pkg_namespace}/{pkg_name}/plain/gating.yaml?id={rev}", "http://dist-git.example.com/cgit/{pkg_namespace}/{pkg_name}/plain/gating.yml?id={rev}", ]
In future we can easily change the configuration instead of changing/fixing code. The URL in the configuration doesn't end with the file suffix anyway.
rebased onto 3a77345c109ed038848ff8974ac5441fd935d16b
Please remove the unnecessary suffix magic - the yaml to/from yml transformations. Any reasons why it should be removed? I think it's useful in case when someone misspells the suffix in the repository, so there's no need to change the configuration just to remember small mistypes. Why add additional code when it can be handled by the new configuration?
Why do we need to change the configuration in order to fix a possible mistype in one letter?
Fixed. Now ".yml" / ".yaml" could be anywhere in URL.
I think both parts of this pull-request are useful, though each one has its own use case.
It's much easier and faster to change configuration. OTOH, if there is a problem with the code, we need additionally to release new version and it takes much longer.
I don't want to maintain more code than necessary, especially some hidden URL patching.
I thought this only handles incorrect file suffix in dist-git---.yml instead of .yaml---since only .yaml is in the URL template in documentation. Am I missing something?
.yml
rebased onto 4b0836ecf84294d1ca3cdb846d9f1f5f928a2a70
1 new commit added
Test for multiple URLs in REMOTE_RULE_POLICIES
Pull-Request has been merged by vmaljulin
JIRA: RHELWF-389