GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cherry-picker: Remove BACKPORT_COMPLETE. UNSET state after finished. by Mariatta · Pull Request #315 · python/core-workflow

Conversation

@Mariatta

@Mariatta Mariatta commented Mar 15, 2019

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Mar 15, 2019
@Mariatta

Mariatta commented Mar 15, 2019

Copy link
Copy Markdown
Member Author

@webknjaz @asvetlov can you take a look. miss-islington is seeing the "BACKPORT_COMPLETE" status, but couldn't continue because it is not an allowed state. I think it should be an allowed state, or did you have different expectation.

webknjaz reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

Checking it now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

@Mariatta I expected that state would be reset if everything is completed successfully. How about calling reset_state() after line 391 instead?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

Any non-allowed states are supposed idicate that something went wrong.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta Mariatta changed the title Cherry-picker: make BACKPORT_COMPLETE an allowed state Cherry-picker: Remove BACKPORT_COMPLETE. UNSET state after finished. Mar 15, 2019
@Mariatta

Mariatta commented Mar 15, 2019

Copy link
Copy Markdown
Member Author

Ok I've removed BACKPORT_COMPLETE. unset will be called instead, and using the UNSET state.

webknjaz reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

webknjaz
webknjaz approved these changes Mar 15, 2019
View reviewed changes
@Mariatta

Mariatta commented Mar 15, 2019

Copy link
Copy Markdown
Member Author

uugh don't know what's the deal with travis 😟 Tests-passing-locally-for-me™️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

Oh, that's weird... Did you run all tests locally or just related?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta

Mariatta commented Mar 15, 2019

Copy link
Copy Markdown
Member Author

Hmm I ran everything pytest cherry_picker/test.py -v in the cherry_picker directory

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

I checked this branch locally as well and it passes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

@Mariatta just to be on the safe side, could you please clear the cache in Travis CI? It's here https://travis-ci.org/python/core-workflow/caches

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta

Mariatta commented Mar 15, 2019

Copy link
Copy Markdown
Member Author

I've cleared cache and restart the build, still no luck 🤕 Anyone else can try this locally?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta Mariatta added the black out Runs black on PR label Mar 15, 2019
@black-out

black-out Bot commented Mar 15, 2019

Copy link
Copy Markdown

🐍🌚🤖 @Mariatta, I've formatted these files using black:

  • cherry_picker/cherry_picker/cherry_picker.py
  • cherry_picker/cherry_picker/test.py
    (I'm a bot 🤖)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@black-out black-out Bot removed the black out Runs black on PR label Mar 15, 2019
@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

@Mariatta could you please merge #311 and then rebase this one? The test suite didn't use new fixtures in some tests and it could improve the situation, I think (hope).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@Mariatta I know what the problem is! 🎉

So git log -r dc896437c8efe5a4a5dfa50218b7a6dc0cbe2598 is executed to check the repo.
But Travis CI only gets 50 last commits by default, not the whole tree. So this commit is now further than 50 commits and the check fails.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 15, 2019

Copy link
Copy Markdown
Member

Solutions:

  1. Change the sha in config to something newer
  2. Find &install-and-test-cherry-picker on line 28 in .travis.yml and extend the mapping to contain Git config adjustment:
- &install-and-test-cherry-picker
  ...
  git:
    depth: 200
  ...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Mariatta and others added 4 commits March 16, 2019 12:46
@Mariatta
Cherry-picker: make BACKPORT_COMPLETE an allowed state
ad1e54a
@Mariatta
Remove backport_complete, and unset instead.
9cb6885
@Mariatta
🐍🌚🤖 Formatted using black.
3f29a0e
@Mariatta
🐍🌚🤖 Formatted using black.
e6e6c97
@Mariatta
Mariatta force-pushed the fix-state branch from f7f574f to e6e6c97 Compare March 16, 2019 19:50
@Mariatta Mariatta added the black out Runs black on PR label Mar 16, 2019
@Mariatta
🐍🌚🤖 Formatted using black.
1c816d0
@black-out

black-out Bot commented Mar 16, 2019

Copy link
Copy Markdown

🐍🌚🤖 @Mariatta, I've formatted these files using black:

  • cherry_picker/cherry_picker/test.py
    (I'm a bot 🤖)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@black-out black-out Bot removed the black out Runs black on PR label Mar 16, 2019
@Mariatta
mock the validate_sha
36f0732
webknjaz
webknjaz reviewed Mar 17, 2019
View reviewed changes
Comment thread cherry_picker/cherry_picker/cherry_picker.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

webknjaz
webknjaz reviewed Mar 17, 2019
View reviewed changes
Comment thread cherry_picker/cherry_picker/test.py Outdated
],
)
@mock.patch("os.path.exists")
@mock.patch("cherry_picker.cherry_picker.validate_sha")

@webknjaz webknjaz Mar 17, 2019

Copy link
Copy Markdown
Member

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.

Why?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Mariatta Mariatta Mar 17, 2019

Copy link
Copy Markdown
Member Author

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.

These tests aren't testing validate_sha itself, but the other functionalities. I think it is ok to be mocked.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@webknjaz webknjaz Mar 17, 2019

Copy link
Copy Markdown
Member

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 disagree: more integrated tests is better. Testing a combination of things makes it all more robust. Especially when it costs nothing.
As in

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Mariatta
mock the validate_sha
8acc8a1
@Mariatta
Mariatta force-pushed the fix-state branch from 377d27c to 8acc8a1 Compare March 17, 2019 22:25
webknjaz
webknjaz requested changes Mar 17, 2019
View reviewed changes

@webknjaz webknjaz left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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 that mocking validate_sha is wrong. This way you'll just completely disable testing of the specific code path. It doesn't cure the root of the issue but only symptoms. Along with that, it makes the project vulnerable to regressions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Mariatta

Mariatta commented Mar 17, 2019

Copy link
Copy Markdown
Member Author

hm, but changing it to recent sha also only delays the problem, same issue will happen again in the future.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta Mariatta added the black out Runs black on PR label Mar 17, 2019
@Mariatta
🐍🌚🤖 Formatted using black.
b90ac79
@black-out

black-out Bot commented Mar 17, 2019

Copy link
Copy Markdown

🐍🌚🤖 @Mariatta, I've formatted these files using black:

  • cherry_picker/cherry_picker/test.py
    (I'm a bot 🤖)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@black-out black-out Bot removed the black out Runs black on PR label Mar 17, 2019
@webknjaz

webknjaz commented Mar 17, 2019

Copy link
Copy Markdown
Member

@Mariatta I think you should just make git clone deeper. Or if you're worried about the delay, it's possible to disable --depth= in Travis CI so that it'd clone the whole thing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta
Disable git depth in travis
a97a4c8
@Mariatta Mariatta added the black out Runs black on PR label Mar 17, 2019
@Mariatta
🐍🌚🤖 Formatted using black.
24d5394
@black-out

black-out Bot commented Mar 17, 2019

Copy link
Copy Markdown

🐍🌚🤖 @Mariatta, I've formatted these files using black:

  • cherry_picker/cherry_picker/test.py
    (I'm a bot 🤖)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@black-out black-out Bot removed the black out Runs black on PR label Mar 17, 2019
@Mariatta

Mariatta commented Mar 17, 2019

Copy link
Copy Markdown
Member Author

Thanks, I've disabled git depth in travis CI and reverted the mocks.

webknjaz reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Mar 17, 2019

Copy link
Copy Markdown
Member

@Mariatta great!

P.S. One small feedback about black out: as you can see it messes up unrelated stuff making it impossible to track down (by looking at diff) what was the intended change in the PR. It's not completely non-atomic. I'd recommend applying black to the project separately and then when PR is on top of that, using back will only generate related changes :)

Mariatta reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta
Mariatta merged commit 04b6587 into master Mar 17, 2019
@Mariatta

Mariatta commented Mar 17, 2019

Copy link
Copy Markdown
Member Author

Thanks!

webknjaz reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Mariatta
Mariatta deleted the fix-state branch March 17, 2019 23:03
@webknjaz webknjaz mentioned this pull request Mar 29, 2019
cherry_picker 1.3.1 breaks miss islington #320
Closed
@Mariatta Mariatta added the cherry_picker.py label May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@webknjaz webknjaz webknjaz requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cherry_picker.py CLA signed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Mariatta @webknjaz @the-knights-who-say-ni
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.