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

chore(pipeline): add deprecated PipelineConfigError #156

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

nritsche
Copy link
Contributor

PipelineConfigError was removed in 8f22399 but was still used outside of
caput. This adds a deprecated version.

BREAKING CHANGE: caput.pipeline.PipelineConfigError is deprecated and
will be removed in July 2021. Use caput.config.CaputConfigError instead.

Closes #155

@lgtm-com
Copy link

lgtm-com bot commented Jan 13, 2021

This pull request introduces 1 alert when merging 37b507a into 2a92a28 - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@tristpinsm
Copy link
Contributor

what is the reason for deprecating PipelineConfigError? Can't it just live on as a child of CaputConfigError?

@nritsche
Copy link
Contributor Author

what is the reason for deprecating PipelineConfigError? Can't it just live on as a child of CaputConfigError?

caput now prints line numbers and config file names when there is an error in a config. It didn't make sense to add this functionality to caput.pipeline and I added it to caput.config. Instead of having two redundant exception classes, I removed PipelineConfigError.

I found a total of 3 usages outside of caput. Is it used a lot in scripts people write, or what other reason is there not to remove it?

@nritsche nritsche force-pushed the rn/deprecatepipelineconfigerror branch from 37b507a to 3f4c002 Compare January 14, 2021 00:03
@tristpinsm
Copy link
Contributor

Well so far the change has broken a few things, which should now be fixed, but I don't think it's unreasonable to think other uses could have been overlooked. And we might consider that caput is a public repository, so we can't audit all the code that was based on it.

If there is no functional reason to avoid keeping this around and maintaining compatibility I guess my thought is why not?

@nritsche
Copy link
Contributor Author

nritsche commented Jan 14, 2021

Well so far the change has broken a few things, which should now be fixed, but I don't think it's unreasonable to think other uses could have been overlooked. And we might consider that caput is a public repository, so we can't audit all the code that was based on it.

We can keep it around for a while as deprecated, so other instances of it still being used can be fixed.

@tristpinsm
Copy link
Contributor

Sure, I just fail to see the harm in having an alias remain available. But I don't feel very strongly about it either way

@jrs65
Copy link
Contributor

jrs65 commented Jan 14, 2021

I agree with @tristpinsm that we probably need to be a little more conscious about not changing caput's public API. The FRB group makes fairly heavy use of caput, especially the pipeline functionality, and we have no way of knowing what they're doing.

@nritsche
Copy link
Contributor Author

I agree with @tristpinsm that we probably need to be a little more conscious about not changing caput's public API. The FRB group makes fairly heavy use of caput, especially the pipeline functionality, and we have no way of knowing what they're doing.

Do you want to give them more time but eventually remove it, or just keep an alias without deprecating it?

@jrs65
Copy link
Contributor

jrs65 commented Jan 14, 2021

I think deprecating it is fine, and the timescale of July seems reasonable, although I don't see why we need to be so aggressive, so maybe move it to December.

My point was mostly that for caput we can't assume that we are the only users and need to be more careful before introducing breaking changes to the public API, something for both people writing and reviewing code to be aware of.

PipelineConfigError was removed in 8f22399 but was still used outside of
caput. This adds a deprecated version.

BREAKING CHANGE: caput.pipeline.PipelineConfigError is deprecated and
will be removed in July 2021. Use caput.config.CaputConfigError instead.
@nritsche nritsche force-pushed the rn/deprecatepipelineconfigerror branch from 3f4c002 to 6c2da1e Compare January 14, 2021 21:14
@nritsche
Copy link
Contributor Author

Alright, thanks @jrs65 and @tristpinsm.
I set it to December 2021.

@nritsche nritsche merged commit 4635833 into master Jan 21, 2021
@nritsche nritsche deleted the rn/deprecatepipelineconfigerror branch January 21, 2021 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why did we rename PipelineConfigError ?
3 participants