potiuk commented on pull request #13440:
URL: https://github.com/apache/airflow/pull/13440#issuecomment-754015480


   @mik-laj - answering your comment here: 
   
   > This can cause some problems. Although it is a devel dependency, these 
dependencies appear in the constraints.txt file, which may make installing a 
new version of this library difficult in the future. Google has a slightly 
different policy on adding dependencies to their libraries, which seems 
sensible to apply to our project as well, as in some cases this is how our 
project should be treated.
   
   I think adding jsonpath-ng is pretty much equivalent of adding jsonschema - 
they are both part of the same set of standards that complement each other (and 
they both implement established and popular standards). JsonSchema and JSonPath 
are different side of the same coin (same as XMLSchema and XMLPath). And they 
go hand-in-hand. If we installed one, installing the other is no brainer.
   
   As far as old requirements - first of all, as a developer you are not 
supposed to install 'devel` in a released version, you only should use inĀ 
airflow code checked out from master. And the way our constraints work that 
when package gets no upper bound, the constraints will get updated rather 
quickly after new version of that package gets released and our tests in master 
pass. Without anyone's involvement. So what you can expect for such 
dependencies you will have always latest 'good' version in the master 
constraints.
   
   The 'jsonpath-ng' has no upper bound, so in this cases constraints mechanism 
will automatically upgrade "master' whenever the 'jsonpath-ng' new version will 
be released (and all tests pass). Which means that in master constraints we 
will not get "11 months old" requirements. 
   
   This is solution is really great - we have not only `latest` but also 
`tested` version of the software (And we have all dependencies tested in sync 
together). Usually you can get only latest when you use poetry or pip-tools, or 
single latest version PR when you use dependabot.
   
   What our system provides is better because it figures the "latest" set of 
constraints that includes all our requirements (both core and providers) and 
figures out the latest "set of those", Tests them, and only pushes them 
automatically when all tests passed. There is no other solution I looked at 
(and believe me I looked at many) that can provide that. Especially that 
dependabot does not cope well with the situation that we do not want to have 
fixed requirements but we generate the expected set of constraints via PIP 
automatically. None of the google libraries has this probl,
   
   What's even more, even if we want to add a patch to a released version, we 
will use (by using constraints) the version of devel dependency which was OK 
for that version. We can still upgrade it (and this BTW also happens in 
v1-10-test/stable branch) so that if we make a patch to an old version, new 
constraints (with possibly updated version of the dependency) will be updated 
(but again - only after all tests pass).  And if other packages/providers of 
our have another limitation here, this is also fine, because we should not have 
any dependency that community-managed providers should conflict with. It's 
community responsibility to keep both core and community managed providers 
working together without conflicts.
   
   > Another example is the `beautifulsoup4` library, which even has version 
requirements in `setup.py`
   
   The `beautifulsoup4==4.7.1` is only  that old in constraints because 
somebody put it like that in the devel requirements and it should be fixed. 
There is no need why devel requirements should have any limitations unless 
there is  a very good reason for (it and there is a condition in the comment on 
when we will be able to remove the limitation). I have no idea who and how 
added it this way, and I hope it can be removed (but I have no idea who and how 
added it - maybe you can try to fix that separately)?
   
   I think our solution is state of the art and we are solving a lot of 
problems with dependencies in a better way than many of other applications and 
librarieres. And the fact that we are both - applications and library, leads to 
custom, complex solution. But I have not seen any other (including pip-tools, 
or poetry) that would solve both approaches at the same time. Our solution does 
and rather reliably now.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to