-
Notifications
You must be signed in to change notification settings - Fork 650
Used crate ID for background jobs #11455
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
base: main
Are you sure you want to change the base?
Conversation
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.
Fixes #11349
I will remove that part of the issue description, since a) this is only covering one of the problematic jobs, and b) this job will also need a follow-up PR to migrate away from Option<i32>
to i32
.
let version_updates = load_version_updates(name, &mut conn).await?; | ||
let version_updates = load_version_updates(crate_id, &mut conn).await?; |
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's probably easiest to keep using name
for now and migrate over to crate_id
in the next PR when this PR here has been deployed to production. That way we won't need the load_crate_id()
fn at all :)
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.
So, the first step is only for adding identifiers to the jobs without changing how they work, right?
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.
yeah, exactly. that should make it easier to migrate them.
That's why it's only a draft. I have some questions and would like to deal with them first on a single job, and then do the same for the rest. |
A side question. Does it makes sense to provide configuration files for the analyzer as it's done in Miri and Rust itself? An example: rust-lang/miri@d835aee. |
idk, I use the JetBrains IDEs, so I don't use rust-analyzer 😅 |
If I'm not wrong then it's still rust-analyzer based, but it can be provided by the IDE itself. Anyway, we can live without adding these configs as no one complained except me, and I fixed it locally. |
So, crates.io/src/bin/crates-admin/delete_crate.rs Lines 106 to 112 in 7722638
Is it a bug or a feature? |
a54fba2
to
c8cdb58
Compare
hmm, I guess in that case we should probably keep using the name since we can't delete by ID anyway.
that is actually intentional. we had a couple of cases in the past where a crate was deleted from the database by our support team but wasn't removed from S3 storage. this implementation allowed us to remove it from storage even though it didn't exist in the database anymore. |
@@ -1,2 +1,3 @@ | |||
[toolchain] | |||
channel = "1.88.0" | |||
components = ["rust-analyzer"] |
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.
That's unintentional and will be removed. It fixes the issue with helix at least.
Should the jobs store crate names for logging purposes? Or should they just show the provided ID instead?