-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: anchor upgrade with additional solana args #2998
Conversation
@tiamo is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
can we have this for other commands like |
The |
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.
Thanks, but are you using this command only to upgrade your program?
Lines 269 to 271 in 5601702
/// Deploys, initializes an IDL, and migrates all in one command. | |
/// Upgrades a single program. The configured wallet must be the upgrade | |
/// authority. |
Not sure what happened but this command basically only does the deployment part, and doesn't seem upgrade the IDL and run the migration script:
Lines 3697 to 3727 in 5601702
fn upgrade( | |
cfg_override: &ConfigOverride, | |
program_id: Pubkey, | |
program_filepath: String, | |
) -> Result<()> { | |
let path: PathBuf = program_filepath.parse().unwrap(); | |
let program_filepath = path.canonicalize()?.display().to_string(); | |
with_workspace(cfg_override, |cfg| { | |
let url = cluster_url(cfg, &cfg.test_validator); | |
let exit = std::process::Command::new("solana") | |
.arg("program") | |
.arg("deploy") | |
.arg("--url") | |
.arg(url) | |
.arg("--keypair") | |
.arg(&cfg.provider.wallet.to_string()) | |
.arg("--program-id") | |
.arg(strip_workspace_prefix(program_id.to_string())) | |
.arg(strip_workspace_prefix(program_filepath)) | |
.stdout(Stdio::inherit()) | |
.stderr(Stdio::inherit()) | |
.output() | |
.expect("Must deploy"); | |
if !exit.status.success() { | |
println!("There was a problem deploying: {exit:?}."); | |
std::process::exit(exit.status.code().unwrap_or(1)); | |
} | |
Ok(()) | |
}) | |
} |
So running regular anchor deploy
would achieve the same thing currently.
That being said, I don't see a problem getting this in. Could you note this feature in the CHANGELOG?
@acheroncrypto Thanks! It makes sense to use the |
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.
There is a small formatting error in CI: https://github.com/coral-xyz/anchor/actions/runs/9328631270/job/25707143836?pr=2998
Could you run cargo fmt
?
@dhruvja |
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.
Thank you!
Use
anchor upgrade
with additional solana arguments, for example: