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

Add a table for the paused migrators category #2262

Conversation

HaudinFlorence
Copy link
Contributor

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below

This PR aims at fixing task 9 of meta issue #2137. It adds a new category for paused migrations and add a new corresponding table.
It uses recent PR regro/cf-scripts#2886

Screenshot from 2024-08-12 16-52-30

@HaudinFlorence HaudinFlorence requested a review from a team as a code owner August 12, 2024 15:19
Copy link

netlify bot commented Aug 12, 2024

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit 322ac52
🔍 Latest deploy log https://app.netlify.com/sites/conda-forge-previews/deploys/66bb7bcfeba8b10008f98175
😎 Deploy Preview https://deploy-preview-2262--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HaudinFlorence HaudinFlorence force-pushed the add_a_table_for_the_paused_migrators_category branch from af06644 to 63d510a Compare August 13, 2024 08:34
if (redirect) return (<Redirect to={redirect} replace={false} push={true} />);
return (
<>
<thead>
<tr onClick={select}>
<th colSpan={8} className={collapsed ? styles.collapsed : undefined}>
{name}{" "}
<span className="badge badge--secondary">{rows.length || ""}</span>
<span className="badge badge--secondary">{name!=="Paused migrations" ? rows.length || "..." : rows.length || "0"}</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we special casing "Paused migrations" here? I would expect the code to be something like:

  • While fetching the remote JSON, the badge says (note this is the three period symbol, not three periods one after another like ...; this should be reverted).
  • Once fetched, we calculate the rows.length and then report the number.

Is this too late in the code to check for rows being fetched? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some logics was added to address the mentioned point.

@h-vetinari
Copy link
Member

Great to see this happening! FYI, as of conda-forge/conda-forge-pinning-feedstock#6292, you'll have a paused migrator to play with. ;-)

Copy link
Member

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this logic I added is not correct because long-running ones won't ever make it to the "is it paused" check. I need to adjust a couple things in the bot. I'll do it after lunch :D

@jaimergp
Copy link
Member

I submitted a couple fixes to the backend (regro/cf-scripts#2932, regro/cf-graph-countyfair#33) but the paused pypy migrator still doesn't show up as paused... I'll need to look into it.

@jaimergp
Copy link
Member

Yay, thanks to @beckermr's regro/cf-scripts#2940, the paused migrators file is now populated, which means that the table works:

image

The only thing I'm missing is some sort of indicator in the details page, like an admonition that says the migrator is paused or closed:

Note

This migration was recently closed.

Or

Note

This migration is currently paused.

The migration file does not include the information needed, but we can check whether the migrator name is in one of the already fetched closed/paused lists.

@jaimergp jaimergp merged commit 55a2f55 into conda-forge:main Aug 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants