-
-
Notifications
You must be signed in to change notification settings - Fork 224
Apply migrations based on migrator filename #2369
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
Draft
h-vetinari
wants to merge
2
commits into
conda-forge:main
Choose a base branch
from
h-vetinari:slash_timestamp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
news/2368-don't-use-timestamps-to-determine-migration-application.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| **Added:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Changed:** | ||
|
|
||
| * Avoid using migration timestamps to determine whether migrations should be applied. The logic for ``use_local`` and ``migration_number`` remains unchanged, but migrations are now uniformly applied based on the name of the migrator file, and timestamps are only used to order the application of migrators (#2368). | ||
|
|
||
| **Deprecated:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Removed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Fixed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Security:** | ||
|
|
||
| * <news item> | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use both the filename and the timestamp. It's hard to keep track of which filenames were used before, that's why the timestamp was used as a unique identifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain how you envision this? To me it still sounds like an inconsistent (or at least very hard-to-follow) mental model. What I'd like is a process that's as simple as:
.ci_support/migrations, then the respective migrator gets applied during rerendering.use_local:andmigration_numberon top of that)From what I can tell, we'd never need to care about filenames which occurred in the past, only those that are directly present in the current pinning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say we had a migrator
foo.yamlapplied in the past and still present in the feedstock. This migrator was closed and deleted in conda-forge-pinning-feedstock.Later, another migrator with the same name
foo.yamlis applied. Then conda-smithy will consider that oldfoo.yamlstill present in the feedstock is the same as the newfoo.yamland use the new migrator as that file is newer and has updates.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But isn't that how it should work? The
foo.yamlin the global pinning takes precedence, unless overridden byuse_local: true.If the feedstock had been rerendered between the deletion of the old
foo.yamland the creation of the newfoo.yaml(both from the POV of the global pinning), the old one would have been deleted in the feedstock anyway. So the fact that it gets replaced with the new one (if it exists) to me sounds like a feature, not a bugThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a feature, yes, but it also means that we have to keep track of what was used before to not accidentally use this feature. My example was about two completely different migrators with the same name
foo.yamland they should not override each other.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check would fail on a single hit in exactly the same way as for 10'000 hits. The upper limit is irrelevant for the check I have in mind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am almost 100% sure the text implies github won't search all of our repositories. It says
They are not limiting the results, but instead the number of repos searched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your interpretation is incorrect. The limitation is not about searching (which is based on a computed index), but about how many results can (reasonably) be fetched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It literally says "repositories a query will search through." I don't know how else to parse that very explicit statement about what is limited since it literally says they limit the number of repositories they search.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I parse this is that the first part is colloquial, and the second part actually reveals the limitation ("finding", not "searching"; that distinction is irrelevant in common parlance, but not here). That argument is bolstered by the fact that their search API even provides an explicit value for whether the results are complete
In your interpretation,
"incomplete_results"would always have to be true in orgs with more than 4000 repos. This is not what's observed in practice.Finally, my interpretation is consistent with the observation that searching a pre-computed index does not provide a way to tell the query "please stop at X repos" (because the index itself has no notion of individual repos, just an amalgamation of their contents), it only provides a way to limit how many results are returned.