Skip to content

[Collections] refreshCollection should have correct source config #3314

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

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

yim-lee
Copy link
Contributor

@yim-lee yim-lee commented Feb 27, 2021

Motivation:
refreshCollection relies on CollectionSource argument to provide the correct source config, but it should:

  1. Check that the source exists in the config
  2. Read latest source config from storage

Modifications:
Update refreshCollection to check that the given source exists in config file before actually doing a refresh. Also make sure that Collection's source is current before returning it.

Motivation:
`refreshCollection` relies on `CollectionSource` argument to provide the correct source config, but it should:
1. Check that the source exists in the config
2. Read latest source config from storage

Modifications:
Update `refreshCollection` to check that the given source exists in config file before actually doing a refresh. Also make sure that `Collection`'s `source` is current before returning it.
@yim-lee
Copy link
Contributor Author

yim-lee commented Feb 27, 2021

@swift-ci please smoke test

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Feb 28, 2021
@yim-lee yim-lee merged commit 426295a into swiftlang:main Mar 1, 2021
@yim-lee yim-lee deleted the trust-unsigned branch March 1, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants