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

Zache#clean is broken? #75

Closed
jviney opened this issue Mar 19, 2024 · 9 comments
Closed

Zache#clean is broken? #75

jviney opened this issue Mar 19, 2024 · 9 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jviney
Copy link

jviney commented Mar 19, 2024

https://github.com/yegor256/zache/blob/master/lib/zache.rb#L180 passes the value to #expired?, but it's expecting the key.

@yegor256
Copy link
Owner

@jviney most probably a bug. Can you please submit a pull request together with a unit test reproducing the issue? I will greatly appreciate it!

@yegor256 yegor256 added bug Something isn't working help wanted Extra attention is needed labels Jun 13, 2024
@miclast
Copy link

miclast commented Jul 18, 2024

class Zache
def clean
synchronized { @hash.delete_if { |key, _value| expired?(key) } } # key should be used instead value here
end
end

Fix for this bug.

@yegor256
Copy link
Owner

@rultor release, tag 0.13.2

@rultor
Copy link
Collaborator

rultor commented Jul 18, 2024

@rultor release, tag 0.13.2

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Jul 18, 2024

@rultor release, tag 0.13.2

@jviney @yegor256 Oops, I failed. You can see the full log here (spent 2min)

+ set -e
+ set -o pipefail
++ dirname ./run.sh
+ cd .
+ echo 1246
+ echo '2.0-SNAPSHOT BUILD'
2.0-SNAPSHOT BUILD
+ date
Thu Jul 18 12:04:30 UTC 2024
+ uptime
 12:04:30 up 1 min,  0 users,  load average: 1.19, 0.41, 0.15
+ head=git@github.com:yegor256/zache.git
+ ff=default
+ image=yegor256/rultor-image:1.23.1
+ rebase=false
+ squash=false
+ head_branch=master
+ author=yegor256
+ vars=('--env=head=git@github.com:yegor256/zache.git' '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:yegor256/zache.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=yegor256'\''\'\'''\'''\'' '\'';'\'' '\''pdd -f /dev/null'\'' '\'';'\'' '\''sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"'\'' '\'';'\'' '\''bundle exec rake'\'' '\'';'\'' '\''pdd -f /dev/null'\'' '\'';'\'' '\''rm -rf *.gem'\'' '\'';'\'' '\''sed -i "s/0\.0\.0/${tag}/g" zache.gemspec'\'' '\'';'\'' '\''git add zache.gemspec'\'' '\'';'\'' '\''git commit -m "Version set to ${tag}"'\'' '\'';'\'' '\''gem build zache.gemspec'\'' '\'';'\'' '\''chmod 0600 ../rubygems.yml'\'' '\'';'\'' '\''gem push *.gem --config-file ../rubygems.yml'\'' '\'';'\'' )' '--env=head_branch=master' '--env=author=yegor256')
+ scripts=('export '\''head=git@github.com:yegor256/zache.git'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''author=yegor256'\''' ';' 'pdd -f /dev/null' ';' 'sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"' ';' 'bundle exec rake' ';' 'pdd -f /dev/null' ';' 'rm -rf *.gem' ';' 'sed -i "s/0\.0\.0/${tag}/g" zache.gemspec' ';' 'git add zache.gemspec' ';' 'git commit -m "Version set to ${tag}"' ';' 'gem build zache.gemspec' ';' 'chmod 0600 ../rubygems.yml' ';' 'gem push *.gem --config-file ../rubygems.yml' ';')
+ directory=
+ container=yegor256_zache_75
+ as_root=false
+ hostname
ip-172-31-20-37
+ pwd
/tmp/rultor-9F4L
+ git --version
git version 2.34.1
+ docker --version
Docker version 25.0.3, build 4debf41
+ mkdir -p /home/ubuntu/.ssh
+ echo -e 'Host github.com\n\tStrictHostKeyChecking no\n'
+ chmod 600 /home/ubuntu/.ssh/config
+ git clone git@github.com:yegor256/zache.git repo
Cloning into 'repo'...
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
+ cd repo
+ git config user.email me@rultor.com
+ git config user.name rultor
+ '[' -z 'export '\''head=git@github.com:yegor256/zache.git'\''' ']'
+ cd ..
+ cat
+ '[' false = true ']'
+ cat
+ chmod a+x entry.sh
+ cat
+ echo 'export '\''head=git@github.com:yegor256/zache.git'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''author=yegor256'\''' ';' 'pdd -f /dev/null' ';' 'sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"' ';' 'bundle exec rake' ';' 'pdd -f /dev/null' ';' 'rm -rf *.gem' ';' 'sed -i "s/0\.0\.0/${tag}/g" zache.gemspec' ';' 'git add zache.gemspec' ';' 'git commit -m "Version set to ${tag}"' ';' 'gem build zache.gemspec' ';' 'chmod 0600 ../rubygems.yml' ';' 'gem push *.gem --config-file ../rubygems.yml' ';'
+ sensitive=()
+ rm -rf .gnupg
+ '[' -z '' ']'
+ echo 'tag name is not provided in the request, see http://doc.rultor.com/basics.html'
tag name is not provided in the request, see http://doc.rultor.com/basics.html
+ exit -1
'cid' file is absent, most probably the Docker container wasn't started correctly

@yegor256
Copy link
Owner

@rultor release, tag is 0.13.2

@rultor
Copy link
Collaborator

rultor commented Jul 18, 2024

@rultor release, tag is 0.13.2

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Jul 18, 2024

@rultor release, tag is 0.13.2

@yegor256 Done! FYI, the full log is here (took me 8min)

@yegor256
Copy link
Owner

@jviney should be resolved, try version 0.13.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants