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

Dolt reset should stage working set #8548

Open
max-hoffman opened this issue Nov 12, 2024 · 5 comments
Open

Dolt reset should stage working set #8548

max-hoffman opened this issue Nov 12, 2024 · 5 comments
Labels
good first issue Good for newcomers good repro Easily reproducible bugs version control

Comments

@max-hoffman
Copy link
Contributor

dolt reset --soft should move HEAD to the destination address, but the WORKING and STAGED heads should stay the same. Currently the STAGED head is also moved to the destination address:

> dolt init
Successfully initialized dolt data repository.
> dolt sql -q "Create table xy (x int primary key, y int)"
> dolt add xy
> dolt commit -m "add xy"
commit u4mp02cb4freimq2217fus2pig558abp (HEAD -> main)
Author: Max Hoffman <[email protected]>
Date:  Tue Nov 12 10:16:45 -0800 2024

        add xy

> dolt reset --soft head~
> dolt status
On branch main
Untracked tables:
  (use "dolt add <table>" to include in what will be committed)
	new table:        xy
@max-hoffman max-hoffman added the good first issue Good for newcomers label Nov 12, 2024
@sidkhuntia
Copy link

I would like to take up this issue.

@timsehn timsehn added good repro Easily reproducible bugs version control labels Nov 12, 2024
@timsehn
Copy link
Contributor

timsehn commented Nov 12, 2024

Give it a shot! Good repro.

https://docs.dolthub.com/guides/contributing

@sidkhuntia
Copy link

Hey, i am getting few error while setting up the dev environment, specifically running go test ./... on ~/dolt_workspace/dolt/go

I think dolt requires mysql to be installed and running on local machine.
I did that, but they i was getting port 3306 already in use.

When i stopped my mysql server I started getting bunch of other errors

2024-11-16T18:31:09.365225Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/folders/13/gwd76prd2w57pxzwr7hvngm00000gq/T/TestBinlogPrimary_BinlogNotEnabled-1731781868/mysql/mysql_data/ is case insensitive
        	            	2024-11-16T18:31:09.509851Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
        	            	2024-11-16T18:31:09.718789Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
        	            	2024-11-16T18:31:10.339282Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=mysql_native_password'.
        	            	2024-11-16T18:31:10.339565Z 0 [ERROR] [MY-013455] [Server] The newly created data directory /var/folders/13/gwd76prd2w57pxzwr7hvngm00000gq/T/TestBinlogPrimary_BinlogNotEnabled-1731781868/mysql/mysql_data/ by --initialize is unusable. You can remove it.
        	            	2024-11-16T18:31:10.339693Z 0 [ERROR] [MY-010119] [Server] Aborting
        	            	2024-11-16T18:31:11.138430Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
        	Test:       	TestBinlogPrimary_BinlogNotEnabled

i think the error might be due to authentication. Any suggestions how i can resolve this ?

Thanks

@max-hoffman
Copy link
Contributor Author

Dolt is it's own stack and has no MySQL dependency. Above Dolt is attempting to start a server on port 3306 and the MySQL instance is conflicting. I'd target updating and running go test -run TestDoltReset ./....

@sidkhuntia
Copy link

I was running into this issue even before mysql was installed on my system. This error shows up when mysql into not running as a service on port :3306.

But when i start my sql service. a different error comes up which says port :3306 already in use

I will try out your suggested method. Also I think it may take time for me to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers good repro Easily reproducible bugs version control
Projects
None yet
Development

No branches or pull requests

3 participants